Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of GMMP by
M2M GW/Device 등록 해지
해지 절차는 M2M Device가 더 이상 서비스를 수행하지 않음을 OMP에 알리는 절차로서 Device ID값이 OMP에 반납된다. More...
Functions | |
| int | GO_DeReg (const char *pszGWID, const char *pszDeviceID) |
| GW,Device 해지 절차 진행 명령 함수 | |
Detailed Description
해지 절차는 M2M Device가 더 이상 서비스를 수행하지 않음을 OMP에 알리는 절차로서 Device ID값이 OMP에 반납된다.
GMMP_Device_DeRegistration_Request 메시지를 이용하여 해지 요청을 수행하고,
GMMP_Device_DeRegistration_Response 메시지를 통해 해지 결과를 받는다.
현장에서 문제가 생기거나 또는 철거하는 경우 M2M 포털을 통해서 해지(DeRegistration)할 수 있다.
이때 M2M GW가 DeRegistration 하는 경우 하위 Device 정보도 모두 해제 된다.
전송 패킷 : Struct_DeReg_GW.h, Struct_DeReg_Device.h 참조
Function Documentation
| int GO_DeReg | ( | const char * | pszGWID, |
| const char * | pszDeviceID | ||
| ) |
GW,Device 해지 절차 진행 명령 함수
해지 절차는 등록 절차를 통해 OMP로 부터 제공 받은 GW ID, Device ID를 해지 한다.
- Warning:
- GW 등록 절차가 진행되어야만 Device 등록 절차를 진행 할 수 있다. GW 등록 해제 절차를 진행할 경우 하위 Device에 대해 자동 해지가 된다.
- OMP 연동을 통해 서비스를 재개하기 위해서는 다시 OMP를 통해 Auth Key, GW ID를 할당 받아야 한다.
- Parameters:
-
pszGWID OMP로 제공 받은 GW ID값. pszDeviceID OMP로 제공 받은 Device ID값.
- Returns:
- 성공 : GMMMP_SUCCESS, 실패 : ErrorCode.h 참조
GW/Device 등록 해지 샘플 코드 (Sample_DeRegistration 샘플 참조) 샘플코드 참조 int GW_DeReg() { int nRet = GMMP_SUCCESS; nRet = GO_DeReg(pszGWID, NULL); if(nRet < 0) { printf("GW GO_Reg Error : %d\n", nRet); return 1; } return 0; } int Device_DeReg() { int nRet = GMMP_SUCCESS; nRet = GO_DeReg(GetGWID (), pszDeviceID); if(nRet < 0) { printf("GW GO_Reg Error : %d\n", nRet); return 1; } return 0; } int Init() { if(Initialize(szServerIP, nServerPort, pszDomainCode , pszGWAuthID, GMMP_ON_LOG, nErrorLevel, GMMP_NETWORK_ALYWAYS_OFF, "Log") != 0) { printf("Server Connect Error\n"); return 1; } SetCallFunction( (void*)Recv); SetAuthKey(pszAuthKey); SetGWID(pszGWID); return 0; } int main() { if(Init() != 0) { printf("Init Error"); return -1; } if(GW_DeReg() != 0) { printf("GW_Reg Error"); return -1; } if(Device_DeReg() != 0) { printf("Device_Reg Error"); return -1; } return 0; }
Generated on Wed Jul 13 2022 20:31:57 by
1.7.2
