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

Dependencies:   mbed-http

Revision:
81:637a87eb8170
Parent:
80:e8f0e92e3ac9
Child:
83:9c271a50a70b
--- a/source/common_types.h	Thu Mar 21 22:17:28 2019 +0000
+++ b/source/common_types.h	Sat Mar 23 16:28:34 2019 +0000
@@ -1,6 +1,7 @@
 #ifndef __COMMON_TYPES_H__
 #define __COMMON_TYPES_H__
 #include <mbed.h>
+#include <string>
 #include "ble/BLE.h"
 #include "SecurityManager.h"
 #include "common_config.h"
@@ -37,22 +38,85 @@
 typedef enum wifi_cmd
 {
   WIFI_CMD_NONE,
+  WIFI_CMD_CONFIG,
+  WIFI_CMD_INTERNET_CONFIG,
   WIFI_CMD_SCAN,
+  WIFI_CMD_DETAILED_SCAN,
   WIFI_CMD_CONNECT,
   WIFI_CMD_DISCONNECT,
   WIFI_CMD_SEND_HTTPS_REQ,
   WIFI_CMD_SEND_HTTP_REQ
 }wifi_cmd_t;
 
+typedef enum at_cmd_resp
+{
+  AT_RESP_NONE,
+  AT_SCAN_RESP,
+  AT_DETAILED_SCAN_RESP,
+  AT_CONNECT_RESP,
+  AT_DISCONNECT_RESP,
+  WIFI_RECONNECT_INFO,
+  WIFI_DISCONNECT_INFO,
+  AT_CONFIG_RESP,
+  AT_INTERNET_CONFIG_RESP,
+  AT_HTTPS_RESP,
+  AT_HTTP_RESP
+}at_cmd_resp_t;
+
+
+typedef enum at_data_mode
+{
+  AT_CMD_DATA_MODE,
+  AT_STD_DATA_MODE,
+  AT_EXT_DATA_MODE
+}at_data_mode_t;
+
+typedef enum conn_scheme
+{
+  INVALID_SCHEME,
+  ALWAYS_CONNECTED,
+  EXTERNAL_CONNECT
+}conn_scheme_t;
+
 
 typedef struct {
     wifi_cmd_t    wifi_cmd;   /* wifi command */
 } wifi_cmd_message_t;
 
 typedef struct {
+    at_cmd_resp_t    at_resp;   /* AT response */
+} at_resp_message_t;
+
+typedef struct {
     wifi_cmd_t    wifi_cmd;              /* wifi data command */
-    uint8_t       Buffer[TX_BUFFER_LEN]; /* buffer length     */
+    int           dataLen;              /* size of data in buffer */
+    uint8_t       buffer[TX_BUFFER_LEN]; /* buffer length     */
 } wifi_data_msg_t;
 
+typedef struct {
+    at_cmd_resp_t at_resp;              /* AT response */
+    int           dataLen;              /* size of data in buffer */
+    uint8_t       buffer[TX_BUFFER_LEN]; /* buffer length     */
+} at_data_msg_t;
+
+typedef struct {
+    string        hostName;     /* host name */
+    string        contentType;  /* content type */
+    int           bodyLen;      /* body length     */
+    uint8_t       body[900];    /* body     */
+} http_post_request_t;
+
+typedef struct {
+    string        contentType;  /* content type */
+    int           bodyLen;      /* body length     */
+    uint8_t       body[900];    /* body     */
+} http_response_t;
+
+typedef struct {
+    uint8_t       peer_id          ;  /* peer id */
+    conn_scheme_t connectionScheme;   /* connection scheme     */
+    string        url;          /* body     */
+} internet_config_t;
+
 
 #endif  // __COMMON_TYPES_H__
\ No newline at end of file