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.
Dependents: ThingPlug_Ethernet_Example
Fork of GMMP_mbed by
M2M GW/Device Profile Info
M2M GW에 Profile 정보가 없는 경우에 또는 일부 존재 하지 않는 경우 OMP에 Profile 정보를 요청한다. More...
Functions | |
| int | GO_Profile (const char *pszGWID, const char *pszDeviceID, const long nTID) |
Detailed Description
M2M GW에 Profile 정보가 없는 경우에 또는 일부 존재 하지 않는 경우 OMP에 Profile 정보를 요청한다.
Profile 정보가 미리 설정되어 있는 경우에는 Profile 요청 절차를 수행하지 않는다.
M2M GW의 등록 절차 또는 M2M Device 등록 절차 이후에 수행될 수 있다.
또한 OMP로부터 제어 명령(M2M GW/Device 단말 제어, Control Type CONTROL_Profile_Reset)을 수신한 경우 Profile 정보 Operation을 수행한다.
전송 패킷 : Struct_ProfileInfo.h 참조
Function Documentation
| int GO_Profile | ( | const char * | pszGWID, |
| const char * | pszDeviceID, | ||
| const long | nTID | ||
| ) |
- Parameters:
-
pszGWID OMP로 제공 받은 GW ID값. pszDeviceID OMP로 제공 받은 Device ID값. nTID T-ID는 M2M GW와 OMP 간의 트랜잭션을 구분하기 위한 값으로서 Request 요청하는 곳에서 할당하며 Response 받은 곳에서는 해당 T-ID 값을 그대로 반환한다.
M2M GW와 OMP에서 T-ID 사용 범위는 다음과 같다.
※ M2M GW T-ID : 0 ~ 99,999 (10만개)
※ OMP T-ID : M2M GW가 사용 이외의 값
- Returns:
- 성공 : GMMMP_SUCCESS, 실패 : ErrorCode.h 참조
GW/Device Profile Info 요청 샘플 코드 (Sample_Profile 샘플 참조) int GW_Profile() { int nRet = GMMP_SUCCESS; nRet = GO_Profile (pszGWID, NULL, nTID); if(nRet < 0) { printf("GW GO_Profile Error : %d\n", nRet); return 1; } return 0; } int Device_Profile() { int nRet = GMMP_SUCCESS; nRet = GO_Profile (pszGWID, pszDeviceID, nTID); if(nRet < 0) { printf("GW GO_Profile 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); return 0; } int main() { if(Init() != 0) { printf("Init Error"); return -1; } if(GW_Profile() != 0) { printf("GW_Profile Error"); return -1; } if(Device_Profile() != 0) { printf("Device_Profile Error"); return -1; } return 0; }
Generated on Tue Jul 12 2022 21:35:52 by
1.7.2
