ThingPlug GMMP library for mbed
Dependents: ThingPlug_WiFi_Example
Operation/Delivery/Struct_Delivery.h@4:bb6c1ee1d5f0, 2015-08-13 (annotated)
- Committer:
- lesmin
- Date:
- Thu Aug 13 07:04:29 2015 +0000
- Revision:
- 4:bb6c1ee1d5f0
- Parent:
- 0:32c20cfb2b30
added NTP error return
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
lesmin | 0:32c20cfb2b30 | 1 | /** GMMP Operation 중 주기보고 명령에 사용되는 구조체 |
lesmin | 0:32c20cfb2b30 | 2 | * @file Struct_Delivery.h |
lesmin | 0:32c20cfb2b30 | 3 | * @date 2013/11/21 |
lesmin | 0:32c20cfb2b30 | 4 | * @version 0.0.0.1 |
lesmin | 0:32c20cfb2b30 | 5 | * @ref GMMPHeader참조 |
lesmin | 0:32c20cfb2b30 | 6 | **/ |
lesmin | 0:32c20cfb2b30 | 7 | |
lesmin | 0:32c20cfb2b30 | 8 | #ifndef STRUCT_DELIVERY_H_ |
lesmin | 0:32c20cfb2b30 | 9 | #define STRUCT_DELIVERY_H_ |
lesmin | 0:32c20cfb2b30 | 10 | |
lesmin | 0:32c20cfb2b30 | 11 | |
lesmin | 0:32c20cfb2b30 | 12 | #include "Define.h" |
lesmin | 0:32c20cfb2b30 | 13 | #include "Struct_Common.h" |
lesmin | 0:32c20cfb2b30 | 14 | |
lesmin | 0:32c20cfb2b30 | 15 | #pragma pack(1) |
lesmin | 0:32c20cfb2b30 | 16 | |
lesmin | 0:32c20cfb2b30 | 17 | /** |
lesmin | 0:32c20cfb2b30 | 18 | * @struct stPacketDeliveryReqHdr |
lesmin | 0:32c20cfb2b30 | 19 | * @brief GMMP TCP Packet 구조 중 Request 수행 시 Message Header와 Message Body 영역 |
lesmin | 0:32c20cfb2b30 | 20 | * OMP에 주기 보고 명령을 전송 시 사용된다. |
lesmin | 0:32c20cfb2b30 | 21 | */ |
lesmin | 0:32c20cfb2b30 | 22 | typedef struct { |
lesmin | 0:32c20cfb2b30 | 23 | /** |
lesmin | 0:32c20cfb2b30 | 24 | *@var usDomainCode |
lesmin | 0:32c20cfb2b30 | 25 | *@brief 서비스 영역별 구분 코드\n |
lesmin | 0:32c20cfb2b30 | 26 | - AlphaNumeric : 문자,숫자 조합, 특수문자제외, SPACE 허용 안하며 빈자리는 0x00(NULL)로 채운다.\n |
lesmin | 0:32c20cfb2b30 | 27 | */ |
lesmin | 0:32c20cfb2b30 | 28 | /** |
lesmin | 0:32c20cfb2b30 | 29 | *@var usGWID |
lesmin | 0:32c20cfb2b30 | 30 | *@brief M2M GW ID |
lesmin | 0:32c20cfb2b30 | 31 | */ |
lesmin | 0:32c20cfb2b30 | 32 | /** |
lesmin | 0:32c20cfb2b30 | 33 | *@var usDeviceID |
lesmin | 0:32c20cfb2b30 | 34 | *@brief M2M Device ID, 값이 0x0이면 GW 명령이다. |
lesmin | 0:32c20cfb2b30 | 35 | */ |
lesmin | 0:32c20cfb2b30 | 36 | /** |
lesmin | 0:32c20cfb2b30 | 37 | *@var ucReportType |
lesmin | 0:32c20cfb2b30 | 38 | *@brief 주기 보고 명령 구분자 |
lesmin | 0:32c20cfb2b30 | 39 | *@ref Define_Delivery.h 참조 |
lesmin | 0:32c20cfb2b30 | 40 | */ |
lesmin | 0:32c20cfb2b30 | 41 | /** |
lesmin | 0:32c20cfb2b30 | 42 | *@var ucMediaType |
lesmin | 0:32c20cfb2b30 | 43 | *@brief 주기 보고 하는 데이터의 타입\n |
lesmin | 0:32c20cfb2b30 | 44 | *아래 표 참조\n |
lesmin | 0:32c20cfb2b30 | 45 | *@image html mediatype.JPG Media Type 표 |
lesmin | 0:32c20cfb2b30 | 46 | */ |
lesmin | 0:32c20cfb2b30 | 47 | /** |
lesmin | 0:32c20cfb2b30 | 48 | *@var usMessageBody |
lesmin | 0:32c20cfb2b30 | 49 | *@brief Data [2048byte] |
lesmin | 0:32c20cfb2b30 | 50 | */ |
lesmin | 0:32c20cfb2b30 | 51 | U8 usDomainCode[LEN_DOMAIN_CODE]; |
lesmin | 0:32c20cfb2b30 | 52 | U8 usGWID[LEN_GW_ID]; |
lesmin | 0:32c20cfb2b30 | 53 | U8 usDeviceID[LEN_DEVICE_ID]; |
lesmin | 0:32c20cfb2b30 | 54 | U8 ucReportType; |
lesmin | 0:32c20cfb2b30 | 55 | U8 ucMediaType; |
lesmin | 0:32c20cfb2b30 | 56 | U8 usMessageBody[MAX_MSG_BODY]; |
lesmin | 0:32c20cfb2b30 | 57 | }stPacketDeliveryReqHdr; //Delivery Request |
lesmin | 0:32c20cfb2b30 | 58 | |
lesmin | 0:32c20cfb2b30 | 59 | /** |
lesmin | 0:32c20cfb2b30 | 60 | * @struct stPacketDeliveryRspHdr |
lesmin | 0:32c20cfb2b30 | 61 | * @brief GMMP TCP Packet 구조 중 Response 수행 시 Message Header와 Message Body 영역 |
lesmin | 0:32c20cfb2b30 | 62 | * OMP에서 주기 보고 명령 응답 완료 수신 시 사용된다. |
lesmin | 0:32c20cfb2b30 | 63 | */ |
lesmin | 0:32c20cfb2b30 | 64 | typedef struct { |
lesmin | 0:32c20cfb2b30 | 65 | /** |
lesmin | 0:32c20cfb2b30 | 66 | *@var usDomainCode |
lesmin | 0:32c20cfb2b30 | 67 | *@brief 서비스 영역별 구분 코드\n |
lesmin | 0:32c20cfb2b30 | 68 | - AlphaNumeric : 문자,숫자 조합, 특수문자제외, SPACE 허용 안하며 빈자리는 0x00(NULL)로 채운다.\n |
lesmin | 0:32c20cfb2b30 | 69 | */ |
lesmin | 0:32c20cfb2b30 | 70 | /** |
lesmin | 0:32c20cfb2b30 | 71 | *@var usGWID |
lesmin | 0:32c20cfb2b30 | 72 | *@brief M2M GW ID |
lesmin | 0:32c20cfb2b30 | 73 | */ |
lesmin | 0:32c20cfb2b30 | 74 | /** |
lesmin | 0:32c20cfb2b30 | 75 | *@var usDeviceID |
lesmin | 0:32c20cfb2b30 | 76 | *@brief M2M Device ID, 값이 0x0이면 GW 명령이다. |
lesmin | 0:32c20cfb2b30 | 77 | */ |
lesmin | 0:32c20cfb2b30 | 78 | /** |
lesmin | 0:32c20cfb2b30 | 79 | *@var ucResultCode |
lesmin | 0:32c20cfb2b30 | 80 | *@brief Result Code (0x00 : Success, other : Fail Reason) @ref OMPErrorCode.h 참조 |
lesmin | 0:32c20cfb2b30 | 81 | */ |
lesmin | 0:32c20cfb2b30 | 82 | /** |
lesmin | 0:32c20cfb2b30 | 83 | *@var unBackOffTime |
lesmin | 0:32c20cfb2b30 | 84 | *@brief Result Code가 STATUS_NOT_ACCEPTABLE(OMP 과부하) 인 경우 해당 시간 값 만큼 이후 시간에 주기보고를 재시도 해야 한다.\n |
lesmin | 0:32c20cfb2b30 | 85 | * Optional (선택적인 필드임을 의미한다) |
lesmin | 0:32c20cfb2b30 | 86 | */ |
lesmin | 0:32c20cfb2b30 | 87 | U8 usDomainCode[LEN_DOMAIN_CODE]; |
lesmin | 0:32c20cfb2b30 | 88 | U8 usGWID[LEN_GW_ID]; |
lesmin | 0:32c20cfb2b30 | 89 | U8 usDeviceID[LEN_DEVICE_ID]; |
lesmin | 0:32c20cfb2b30 | 90 | U8 ucResultCode; |
lesmin | 0:32c20cfb2b30 | 91 | U8 unBackOffTime[4]; |
lesmin | 0:32c20cfb2b30 | 92 | }stPacketDeliveryRspHdr; //Delivery Response |
lesmin | 0:32c20cfb2b30 | 93 | |
lesmin | 0:32c20cfb2b30 | 94 | /** |
lesmin | 0:32c20cfb2b30 | 95 | * @struct Delivery_Req |
lesmin | 0:32c20cfb2b30 | 96 | * @brief GMMP TCP Packet 구조 중 Request Delivery 구조체 |
lesmin | 0:32c20cfb2b30 | 97 | * OMP에 주기보고 데이터를 전송한다. |
lesmin | 0:32c20cfb2b30 | 98 | */ |
lesmin | 0:32c20cfb2b30 | 99 | typedef struct { |
lesmin | 0:32c20cfb2b30 | 100 | /** |
lesmin | 0:32c20cfb2b30 | 101 | *@var header |
lesmin | 0:32c20cfb2b30 | 102 | *@brief @ref GMMPHeader 참조 |
lesmin | 0:32c20cfb2b30 | 103 | */ |
lesmin | 0:32c20cfb2b30 | 104 | /** |
lesmin | 0:32c20cfb2b30 | 105 | *@var body |
lesmin | 0:32c20cfb2b30 | 106 | *@brief @ref stPacketDeliveryReqHdr 참조 |
lesmin | 0:32c20cfb2b30 | 107 | */ |
lesmin | 0:32c20cfb2b30 | 108 | GMMPHeader header; |
lesmin | 0:32c20cfb2b30 | 109 | stPacketDeliveryReqHdr body; |
lesmin | 0:32c20cfb2b30 | 110 | }Delivery_Req; |
lesmin | 0:32c20cfb2b30 | 111 | |
lesmin | 0:32c20cfb2b30 | 112 | /** |
lesmin | 0:32c20cfb2b30 | 113 | * @struct Delivery_Rsp |
lesmin | 0:32c20cfb2b30 | 114 | * @brief GMMP TCP Packet 구조 중 Response Delivery 구조체 |
lesmin | 0:32c20cfb2b30 | 115 | * OMP에 주기보고 데이터 전송 응답을 수신한다. |
lesmin | 0:32c20cfb2b30 | 116 | */ |
lesmin | 0:32c20cfb2b30 | 117 | typedef struct { |
lesmin | 0:32c20cfb2b30 | 118 | /** |
lesmin | 0:32c20cfb2b30 | 119 | *@var header |
lesmin | 0:32c20cfb2b30 | 120 | *@brief @ref GMMPHeader 참조 |
lesmin | 0:32c20cfb2b30 | 121 | */ |
lesmin | 0:32c20cfb2b30 | 122 | /** |
lesmin | 0:32c20cfb2b30 | 123 | *@var body |
lesmin | 0:32c20cfb2b30 | 124 | *@brief @ref stPacketDeliveryRspHdr 참조 |
lesmin | 0:32c20cfb2b30 | 125 | */ |
lesmin | 0:32c20cfb2b30 | 126 | GMMPHeader header; |
lesmin | 0:32c20cfb2b30 | 127 | stPacketDeliveryRspHdr body; |
lesmin | 0:32c20cfb2b30 | 128 | }Delivery_Rsp; |
lesmin | 0:32c20cfb2b30 | 129 | #pragma pack(0) |
lesmin | 0:32c20cfb2b30 | 130 | |
lesmin | 0:32c20cfb2b30 | 131 | #endif /* STRUCT_DELIVERY_H_ */ |
lesmin | 0:32c20cfb2b30 | 132 |