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
GMMP_ProfileInfo.cpp
00001 /* 00002 * GMMP_ProfileInfo.c 00003 * 00004 * Created on: 2013. 11. 18. 00005 * Author: root 00006 */ 00007 00008 #include "GMMP_ProfileInfo.h" 00009 00010 int GMMP_Profile_Req(Profile_Req* pstProfile_Req) 00011 { 00012 if(pstProfile_Req == NULL) 00013 { 00014 return SERVER_INFO_NOT_FOUND; 00015 } 00016 00017 if(CheckSocket() != 0) 00018 { 00019 return SERVER_INFO_NOT_FOUND; 00020 } 00021 00022 return WriteTCP( (char*)pstProfile_Req, sizeof(Profile_Req) ); 00023 } 00024 00025 int GMMP_Profile_Rsp(Profile_Rsp* pstProfile_Rsp) 00026 { 00027 if(pstProfile_Rsp == NULL) 00028 { 00029 return SERVER_INFO_NOT_FOUND; 00030 } 00031 00032 if(CheckSocket() != 0) 00033 { 00034 return SERVER_INFO_NOT_FOUND; 00035 } 00036 00037 int nRet = ReadTCP( (char*)&pstProfile_Rsp->header , sizeof(pstProfile_Rsp->header) ); 00038 if(nRet != GMMP_SUCCESS) 00039 { 00040 return nRet; 00041 } 00042 00043 ConvertShort cvtshort; 00044 cvtshort.sU8 = 0; 00045 memcpy(cvtshort.usShort, pstProfile_Rsp->header.usMessageLength, sizeof(pstProfile_Rsp->header.usMessageLength) ); 00046 00047 int nReadSize = ltobs(cvtshort.sU8)- sizeof(pstProfile_Rsp->header); 00048 00049 return ReadTCP( (char*)&pstProfile_Rsp->body, nReadSize); 00050 }
Generated on Tue Jul 12 2022 21:35:52 by
