this is using the mbed os version 5-13-1
Diff: source/common_types.h
- Revision:
- 90:ed0267eca7b5
- Parent:
- 89:45f6db09a76d
- Child:
- 92:ec9550034276
--- a/source/common_types.h Mon Apr 01 08:00:41 2019 +0000
+++ b/source/common_types.h Sun Apr 07 10:52:37 2019 +0000
@@ -11,7 +11,7 @@
#define MAX_PASSKEY_LEN 32
#define EDM_START_BYTE 0xAA
#define EDM_STOP_BYTE 0x55
-#define EDM_HDR_LEN 5
+#define EDM_HDR_LEN 6
#define MAX_EDM_PAYLOAD_LEN (4096-1)
#define MIN_EDM_PAYLOAD_LEN (2)
#define MAX_HTTP_HEADER_LINES
@@ -73,6 +73,32 @@
AT_HTTP_RESP_DOWNLOAD
}at_cmd_resp_t;
+typedef enum edm_msg_id
+{
+ CONNECT_MSG_ID = 0x0010,
+ DISCONNECT_MSG_ID = 0x0020,
+ DATA_MSG_ID = 0x0030,
+ AT_MSG_ID = 0x0040
+}edm_msg_id_t;
+
+
+typedef enum edm_msg_type
+{
+ EVENT_MSG_TYPE = 0x01,
+ INDICATION_MSG_TYPE = 0x02,
+ RESPONSE_MSG_TYPE = 0x03,
+ REQUEST_MSG_TYPE = 0x04,
+ CONFIRMATION_MSG_TYPE = 0x05,
+ COMMAND_MSG_TYPE = 0x06
+}edm_msg_type_t;
+
+typedef enum channel_id
+{
+ WIFI_CHANNEL = 0x00,
+ BLE_CHANNEL = 0x01
+}channel_id_t;
+
+
typedef enum at_data_mode
{
@@ -122,19 +148,22 @@
typedef struct {
http_method method; /* POST/GET etc... */
- std::string request_URI; /* request URI/path */
- std::string http_version; /* http verstion HTTP/1.1 */
- std::string hostName; /* host name */
- std::string AcceptVal; /* types accepted */
- std::string contentType; /* content type */
- std::string contentLen; /* content length as string */
- uint8_t body[900]; /* body */
+ char * request_URI; /* request URI/path */
+ char * http_version; /* http verstion HTTP/1.1 */
+ char * hostName; /* host name */
+ char * AcceptVal; /* types accepted */
+ char * contentType; /* content type */
+ char * contentLen; /* content length */
+ uint8_t * body; /* body */
+ uint8_t buffer[TX_BUFFER_LEN - 8*sizeof(char *)
+ - sizeof(http_method)]; // buffer
} http_request_t;
typedef struct {
uint8_t startByte; /* start Byte 0xAA */
uint16_t payloadLen; /* payload Length */
uint16_t payloadID; /* payload identifier */
+ channel_id_t channel_id; /* channel_id_t*/
} edm_header_t;
typedef struct {
@@ -146,8 +175,7 @@
typedef struct {
uint8_t peer_id ; /* peer id */
conn_scheme_t connectionScheme; /* connection scheme */
- //string * url; /* body */
- char url[MAX_URL_LEN]; /* body */
+ char url[MAX_URL_LEN]; /* url string */
} internet_config_t;
#endif // __COMMON_TYPES_H__
\ No newline at end of file