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