this is using the mbed os version 5-13-1

Dependencies:   mbed-http

Revision:
83:9c271a50a70b
Parent:
81:637a87eb8170
Child:
84:7c7add00f4bf
--- a/source/common_types.h	Sun Mar 24 17:32:06 2019 +0000
+++ b/source/common_types.h	Tue Mar 26 23:33:51 2019 +0000
@@ -71,6 +71,17 @@
   AT_EXT_DATA_MODE
 }at_data_mode_t;
 
+typedef enum edm_payload_id
+{
+  CONNECT_EVENT    = 0x0011,
+  DISCONNECT_EVENT = 0x0021,
+  DATA_EVENT       = 0x0031,
+  DATA_COMMAND     = 0x0036,
+  AT_REQUEST       = 0x0044,
+  AT_CONFIRMATION  = 0x0045,
+  AT_EVENT         = 0x0041
+}edm_payload_id_t;
+
 typedef enum conn_scheme
 {
   INVALID_SCHEME,
@@ -107,6 +118,12 @@
 } http_post_request_t;
 
 typedef struct {
+    uint8_t       startByte;   /* start Byte 0xAA */
+    uint16_t      payloadLen;  /* payload Length */
+    uint16_t      payloadID;   /* payload identifier     */
+} edm_header_t;
+
+typedef struct {
     string        contentType;  /* content type */
     int           bodyLen;      /* body length     */
     uint8_t       body[900];    /* body     */
@@ -118,5 +135,9 @@
     string        url;          /* body     */
 } internet_config_t;
 
-
+#define EDM_START_BYTE       0xAA
+#define EDM_STOP_BYTE        0x55
+#define EDM_HDR_LEN          5
+#define MAX_EDM_PAYLOAD_LEN  (4096-1)
+#define MIN_EDM_PAYLOAD_LEN (2)
 #endif  // __COMMON_TYPES_H__
\ No newline at end of file