ThingPlug GMMP library for mbed

Dependents:   ThingPlug_WiFi_Example

Committer:
lesmin
Date:
Thu Jul 23 00:55:15 2015 +0000
Revision:
0:32c20cfb2b30
initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
lesmin 0:32c20cfb2b30 1 /** GMMP 내부함수 및 변수 설명
lesmin 0:32c20cfb2b30 2 * @date 2013/11/21
lesmin 0:32c20cfb2b30 3 * @version 0.0.0.1
lesmin 0:32c20cfb2b30 4 * @file GMMP_Operation.h
lesmin 0:32c20cfb2b30 5 **/
lesmin 0:32c20cfb2b30 6
lesmin 0:32c20cfb2b30 7 #ifndef GMMP_OPERATION_H_
lesmin 0:32c20cfb2b30 8 #define GMMP_OPERATION_H_
lesmin 0:32c20cfb2b30 9
lesmin 0:32c20cfb2b30 10 #include "GMMP_Control.h"
lesmin 0:32c20cfb2b30 11 #include "GMMP_Delivery.h"
lesmin 0:32c20cfb2b30 12 #include "GMMP_Heartbeat.h"
lesmin 0:32c20cfb2b30 13 #include "GMMP_Notification.h"
lesmin 0:32c20cfb2b30 14 #include "GMMP_ProfileInfo.h"
lesmin 0:32c20cfb2b30 15 #include "GMMP_Reg.h"
lesmin 0:32c20cfb2b30 16 #include "Network.h"
lesmin 0:32c20cfb2b30 17 #include "GMMP.h"
lesmin 0:32c20cfb2b30 18
lesmin 0:32c20cfb2b30 19 /**
lesmin 0:32c20cfb2b30 20 * @brief GW/Device 등록/해지 Request 기능
lesmin 0:32c20cfb2b30 21 * @param pszAuthID Auth ID 문자열 입력
lesmin 0:32c20cfb2b30 22 * @param pszAuthKey Auth Key 문자열 입력
lesmin 0:32c20cfb2b30 23 * @param pszDomainCode Domain Code
lesmin 0:32c20cfb2b30 24 * @param pszGWID GW ID
lesmin 0:32c20cfb2b30 25 * @param pszManufactureID
lesmin 0:32c20cfb2b30 26 * @return
lesmin 0:32c20cfb2b30 27 */
lesmin 0:32c20cfb2b30 28 int GMMP_SetReg(const char* pszAuthID,
lesmin 0:32c20cfb2b30 29 const char* pszAuthKey,
lesmin 0:32c20cfb2b30 30 const char* pszDomainCode,
lesmin 0:32c20cfb2b30 31 const char* pszGWID,
lesmin 0:32c20cfb2b30 32 const char* pszManufactureID);
lesmin 0:32c20cfb2b30 33
lesmin 0:32c20cfb2b30 34 /**
lesmin 0:32c20cfb2b30 35 *
lesmin 0:32c20cfb2b30 36 * @param pszAuthID
lesmin 0:32c20cfb2b30 37 * @param pszAuthKey
lesmin 0:32c20cfb2b30 38 * @param pszDomainCode
lesmin 0:32c20cfb2b30 39 * @param pszGWID
lesmin 0:32c20cfb2b30 40 * @param pszDeviceID
lesmin 0:32c20cfb2b30 41 * @return
lesmin 0:32c20cfb2b30 42 */
lesmin 0:32c20cfb2b30 43 /**
lesmin 0:32c20cfb2b30 44 *
lesmin 0:32c20cfb2b30 45 * @param pszAuthID
lesmin 0:32c20cfb2b30 46 * @param pszAuthKey
lesmin 0:32c20cfb2b30 47 * @param pszDomainCode
lesmin 0:32c20cfb2b30 48 * @param pszGWID
lesmin 0:32c20cfb2b30 49 * @param pszDeviceID
lesmin 0:32c20cfb2b30 50 * @return
lesmin 0:32c20cfb2b30 51 */
lesmin 0:32c20cfb2b30 52 /**
lesmin 0:32c20cfb2b30 53 *
lesmin 0:32c20cfb2b30 54 * @param pszAuthID
lesmin 0:32c20cfb2b30 55 * @param pszAuthKey
lesmin 0:32c20cfb2b30 56 * @param pszDomainCode
lesmin 0:32c20cfb2b30 57 * @param pszGWID
lesmin 0:32c20cfb2b30 58 * @param pszDeviceID
lesmin 0:32c20cfb2b30 59 * @return
lesmin 0:32c20cfb2b30 60 */
lesmin 0:32c20cfb2b30 61 /**
lesmin 0:32c20cfb2b30 62 *
lesmin 0:32c20cfb2b30 63 * @param pszAuthID
lesmin 0:32c20cfb2b30 64 * @param pszAuthKey
lesmin 0:32c20cfb2b30 65 * @param pszDomainCode
lesmin 0:32c20cfb2b30 66 * @param pszGWID
lesmin 0:32c20cfb2b30 67 * @param pszDeviceID
lesmin 0:32c20cfb2b30 68 * @return
lesmin 0:32c20cfb2b30 69 */
lesmin 0:32c20cfb2b30 70 int GMMP_SetDeReg(const char* pszAuthID,
lesmin 0:32c20cfb2b30 71 const char* pszAuthKey,
lesmin 0:32c20cfb2b30 72 const char* pszDomainCode,
lesmin 0:32c20cfb2b30 73 const char* pszGWID,
lesmin 0:32c20cfb2b30 74 const char* pszDeviceID);
lesmin 0:32c20cfb2b30 75 /**
lesmin 0:32c20cfb2b30 76 *
lesmin 0:32c20cfb2b30 77 * @param pstGwRegist_Rsp
lesmin 0:32c20cfb2b30 78 * @param pstDeviceRegist_Rsp
lesmin 0:32c20cfb2b30 79 * @return
lesmin 0:32c20cfb2b30 80 */
lesmin 0:32c20cfb2b30 81 int GMMP_GetReg(GwRegist_Rsp* pstGwRegist_Rsp, DeviceRegist_Rsp* pstDeviceRegist_Rsp);
lesmin 0:32c20cfb2b30 82
lesmin 0:32c20cfb2b30 83 /**
lesmin 0:32c20cfb2b30 84 *
lesmin 0:32c20cfb2b30 85 * @param pstGwRegist_Rsp
lesmin 0:32c20cfb2b30 86 * @param pstDeviceDeRegist_Rsp
lesmin 0:32c20cfb2b30 87 * @return
lesmin 0:32c20cfb2b30 88 */
lesmin 0:32c20cfb2b30 89 int GMMP_GetDeReg(GwDeRegist_Rsp* pstGwRegist_Rsp, DeviceDeRegist_Rsp* pstDeviceDeRegist_Rsp);
lesmin 0:32c20cfb2b30 90
lesmin 0:32c20cfb2b30 91 /**
lesmin 0:32c20cfb2b30 92 *
lesmin 0:32c20cfb2b30 93 * @param pszAuthID
lesmin 0:32c20cfb2b30 94 * @param pszAuthKey
lesmin 0:32c20cfb2b30 95 * @param pszDomainCode
lesmin 0:32c20cfb2b30 96 * @param pszGWID
lesmin 0:32c20cfb2b30 97 * @param pszDeviceID
lesmin 0:32c20cfb2b30 98 * @return
lesmin 0:32c20cfb2b30 99 */
lesmin 0:32c20cfb2b30 100 int GMMP_SetProfile(const char* pszAuthID,
lesmin 0:32c20cfb2b30 101 const char* pszAuthKey,
lesmin 0:32c20cfb2b30 102 const char* pszDomainCode,
lesmin 0:32c20cfb2b30 103 const char* pszGWID,
lesmin 0:32c20cfb2b30 104 const char* pszDeviceID);
lesmin 0:32c20cfb2b30 105 /**
lesmin 0:32c20cfb2b30 106 *
lesmin 0:32c20cfb2b30 107 * @param pstProfile_Rsp
lesmin 0:32c20cfb2b30 108 * @return
lesmin 0:32c20cfb2b30 109 */
lesmin 0:32c20cfb2b30 110 int GMMP_GetProfile(Profile_Rsp* pstProfile_Rsp);
lesmin 0:32c20cfb2b30 111 /**
lesmin 0:32c20cfb2b30 112 *
lesmin 0:32c20cfb2b30 113 * @param pszAuthID
lesmin 0:32c20cfb2b30 114 * @param pszAuthKey
lesmin 0:32c20cfb2b30 115 * @param pszDomainCode
lesmin 0:32c20cfb2b30 116 * @param pszGWID
lesmin 0:32c20cfb2b30 117 * @param pszDeviceID
lesmin 0:32c20cfb2b30 118 * @param cReportType
lesmin 0:32c20cfb2b30 119 * @param cMediaType
lesmin 0:32c20cfb2b30 120 * @param pszMessageBody
lesmin 0:32c20cfb2b30 121 * @param nTotalCount
lesmin 0:32c20cfb2b30 122 * @param nCurrentCount
lesmin 0:32c20cfb2b30 123 * @return
lesmin 0:32c20cfb2b30 124 */
lesmin 0:32c20cfb2b30 125 int GMMP_SetDelivery(const char* pszAuthID,
lesmin 0:32c20cfb2b30 126 const char* pszAuthKey,
lesmin 0:32c20cfb2b30 127 const char* pszDomainCode,
lesmin 0:32c20cfb2b30 128 const char* pszGWID,
lesmin 0:32c20cfb2b30 129 const char* pszDeviceID,
lesmin 0:32c20cfb2b30 130 const char cReportType,
lesmin 0:32c20cfb2b30 131 const char cMediaType,
lesmin 0:32c20cfb2b30 132 const char* pszMessageBody,
lesmin 0:32c20cfb2b30 133 const int nTotalCount,
lesmin 0:32c20cfb2b30 134 const int nCurrentCount);
lesmin 0:32c20cfb2b30 135 /**
lesmin 0:32c20cfb2b30 136 *
lesmin 0:32c20cfb2b30 137 * @param pstDelivery_Rsp
lesmin 0:32c20cfb2b30 138 * @return
lesmin 0:32c20cfb2b30 139 */
lesmin 0:32c20cfb2b30 140 int GMMP_GetDelivery(Delivery_Rsp* pstDelivery_Rsp);
lesmin 0:32c20cfb2b30 141
lesmin 0:32c20cfb2b30 142 /**
lesmin 0:32c20cfb2b30 143 *
lesmin 0:32c20cfb2b30 144 * @param pszAuthID
lesmin 0:32c20cfb2b30 145 * @param pszAuthKey
lesmin 0:32c20cfb2b30 146 * @param pszDomainCode
lesmin 0:32c20cfb2b30 147 * @param pszGWID
lesmin 0:32c20cfb2b30 148 * @param pszDeviceID
lesmin 0:32c20cfb2b30 149 * @param cControlType
lesmin 0:32c20cfb2b30 150 * @param cResultCode
lesmin 0:32c20cfb2b30 151 * @return
lesmin 0:32c20cfb2b30 152 */
lesmin 0:32c20cfb2b30 153 int GMMP_SetControl(const char* pszAuthID,
lesmin 0:32c20cfb2b30 154 const char* pszAuthKey,
lesmin 0:32c20cfb2b30 155 const char* pszDomainCode,
lesmin 0:32c20cfb2b30 156 const char* pszGWID,
lesmin 0:32c20cfb2b30 157 const char* pszDeviceID,
lesmin 0:32c20cfb2b30 158 const char cControlType,
lesmin 0:32c20cfb2b30 159 const char cResultCode);
lesmin 0:32c20cfb2b30 160
lesmin 0:32c20cfb2b30 161 /**
lesmin 0:32c20cfb2b30 162 *
lesmin 0:32c20cfb2b30 163 * @param pszAuthID
lesmin 0:32c20cfb2b30 164 * @param pszAuthKey
lesmin 0:32c20cfb2b30 165 * @param pszDomainCode
lesmin 0:32c20cfb2b30 166 * @param pszGWID
lesmin 0:32c20cfb2b30 167 * @param pszDeviceID
lesmin 0:32c20cfb2b30 168 * @param cControlType
lesmin 0:32c20cfb2b30 169 * @param cResultCode
lesmin 0:32c20cfb2b30 170 * @param pszMessageBody
lesmin 0:32c20cfb2b30 171 * @param nMessageSize
lesmin 0:32c20cfb2b30 172 * @return
lesmin 0:32c20cfb2b30 173 */
lesmin 0:32c20cfb2b30 174 int GMMP_SetNotifi(const char* pszAuthID,
lesmin 0:32c20cfb2b30 175 const char* pszAuthKey,
lesmin 0:32c20cfb2b30 176 const char* pszDomainCode,
lesmin 0:32c20cfb2b30 177 const char* pszGWID,
lesmin 0:32c20cfb2b30 178 const char* pszDeviceID,
lesmin 0:32c20cfb2b30 179 const char cControlType,
lesmin 0:32c20cfb2b30 180 const char cResultCode,
lesmin 0:32c20cfb2b30 181 const char* pszMessageBody,
lesmin 0:32c20cfb2b30 182 const int nMessageSize);
lesmin 0:32c20cfb2b30 183
lesmin 0:32c20cfb2b30 184 /**
lesmin 0:32c20cfb2b30 185 *
lesmin 0:32c20cfb2b30 186 * @param pstNotifi_Rsp
lesmin 0:32c20cfb2b30 187 * @return
lesmin 0:32c20cfb2b30 188 */
lesmin 0:32c20cfb2b30 189 int GMMP_GetNotifi(Notifi_Rsp* pstNotifi_Rsp);
lesmin 0:32c20cfb2b30 190
lesmin 0:32c20cfb2b30 191 /**
lesmin 0:32c20cfb2b30 192 *
lesmin 0:32c20cfb2b30 193 * @param pszAuthID
lesmin 0:32c20cfb2b30 194 * @param pszAuthKey
lesmin 0:32c20cfb2b30 195 * @param pszDomainCode
lesmin 0:32c20cfb2b30 196 * @param pszGWID
lesmin 0:32c20cfb2b30 197 * @return
lesmin 0:32c20cfb2b30 198 */
lesmin 0:32c20cfb2b30 199 int GMMP_SetHB(const char* pszAuthID,
lesmin 0:32c20cfb2b30 200 const char* pszAuthKey,
lesmin 0:32c20cfb2b30 201 const char* pszDomainCode,
lesmin 0:32c20cfb2b30 202 const char* pszGWID);
lesmin 0:32c20cfb2b30 203
lesmin 0:32c20cfb2b30 204 /**
lesmin 0:32c20cfb2b30 205 *
lesmin 0:32c20cfb2b30 206 * @param pstHB_Rsp
lesmin 0:32c20cfb2b30 207 * @return
lesmin 0:32c20cfb2b30 208 */
lesmin 0:32c20cfb2b30 209 int GMMP_GetHB(HB_Rsp* pstHB_Rsp);
lesmin 0:32c20cfb2b30 210
lesmin 0:32c20cfb2b30 211 /**
lesmin 0:32c20cfb2b30 212 *
lesmin 0:32c20cfb2b30 213 * @param pstGMMPHeader
lesmin 0:32c20cfb2b30 214 * @param pBody
lesmin 0:32c20cfb2b30 215 * @return
lesmin 0:32c20cfb2b30 216 */
lesmin 0:32c20cfb2b30 217 int GMMP_Read(GMMPHeader* pstGMMPHeader, void** pBody);
lesmin 0:32c20cfb2b30 218 int GMMP_Read2(GMMPHeader* pstGMMPHeader, void** pBody, byte blocking);
lesmin 0:32c20cfb2b30 219 /**
lesmin 0:32c20cfb2b30 220 *
lesmin 0:32c20cfb2b30 221 * @param pstGMMPHeader
lesmin 0:32c20cfb2b30 222 * @param pBody
lesmin 0:32c20cfb2b30 223 * @return
lesmin 0:32c20cfb2b30 224 */
lesmin 0:32c20cfb2b30 225 int GMMP_Recv(GMMPHeader* pstGMMPHeader, void* pBody);
lesmin 0:32c20cfb2b30 226 /**
lesmin 0:32c20cfb2b30 227 *
lesmin 0:32c20cfb2b30 228 * @param pstGMMPHeader
lesmin 0:32c20cfb2b30 229 * @param pstRspHdr
lesmin 0:32c20cfb2b30 230 * @return
lesmin 0:32c20cfb2b30 231 */
lesmin 0:32c20cfb2b30 232 int GMMP_Ctrl_Recv(GMMPHeader* pstGMMPHeader, stControlReqHdr* pstRspHdr);
lesmin 0:32c20cfb2b30 233 /**
lesmin 0:32c20cfb2b30 234 *
lesmin 0:32c20cfb2b30 235 * @param pstGMMPHeader
lesmin 0:32c20cfb2b30 236 * @param pBody
lesmin 0:32c20cfb2b30 237 * @return
lesmin 0:32c20cfb2b30 238 */
lesmin 0:32c20cfb2b30 239 int GMMP_Trace(GMMPHeader* pstGMMPHeader, void* pBody);
lesmin 0:32c20cfb2b30 240
lesmin 0:32c20cfb2b30 241 /**
lesmin 0:32c20cfb2b30 242 *
lesmin 0:32c20cfb2b30 243 * @param nTid
lesmin 0:32c20cfb2b30 244 */
lesmin 0:32c20cfb2b30 245 void SetTID(long nTid);
lesmin 0:32c20cfb2b30 246 /**
lesmin 0:32c20cfb2b30 247 *
lesmin 0:32c20cfb2b30 248 * @return
lesmin 0:32c20cfb2b30 249 */
lesmin 0:32c20cfb2b30 250 long GetTID();
lesmin 0:32c20cfb2b30 251
lesmin 0:32c20cfb2b30 252 /**
lesmin 0:32c20cfb2b30 253 *
lesmin 0:32c20cfb2b30 254 * @param pData
lesmin 0:32c20cfb2b30 255 * @param nPacketSize
lesmin 0:32c20cfb2b30 256 * @param nTotalCount
lesmin 0:32c20cfb2b30 257 * @param nCurrentCount
lesmin 0:32c20cfb2b30 258 * @param cMessageType
lesmin 0:32c20cfb2b30 259 * @param pszAuthID
lesmin 0:32c20cfb2b30 260 * @param pszAuthKey
lesmin 0:32c20cfb2b30 261 * @return
lesmin 0:32c20cfb2b30 262 */
lesmin 0:32c20cfb2b30 263 int SetHeader(void* pData,
lesmin 0:32c20cfb2b30 264 int nPacketSize,
lesmin 0:32c20cfb2b30 265 int nTotalCount,
lesmin 0:32c20cfb2b30 266 int nCurrentCount,
lesmin 0:32c20cfb2b30 267 const char cMessageType,
lesmin 0:32c20cfb2b30 268 const char* pszAuthID,
lesmin 0:32c20cfb2b30 269 const char* pszAuthKey);
lesmin 0:32c20cfb2b30 270
lesmin 0:32c20cfb2b30 271 /**
lesmin 0:32c20cfb2b30 272 *
lesmin 0:32c20cfb2b30 273 * @return
lesmin 0:32c20cfb2b30 274 */
lesmin 0:32c20cfb2b30 275 int SetIntiSocket(void);
lesmin 0:32c20cfb2b30 276
lesmin 0:32c20cfb2b30 277 /**
lesmin 0:32c20cfb2b30 278 *
lesmin 0:32c20cfb2b30 279 * @param Type
lesmin 0:32c20cfb2b30 280 * @param nOutBufferSize
lesmin 0:32c20cfb2b30 281 * @return
lesmin 0:32c20cfb2b30 282 */
lesmin 0:32c20cfb2b30 283 char* MallocBody(const char Type, int* nOutBufferSize);
lesmin 0:32c20cfb2b30 284
lesmin 0:32c20cfb2b30 285 #endif /* GMMP_OPERATION_H_ */