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

Dependencies:   mbed-http

Revision:
81:637a87eb8170
Parent:
80:e8f0e92e3ac9
Child:
82:10072c1794d3
--- a/source/ATCmdManager.h	Thu Mar 21 22:17:28 2019 +0000
+++ b/source/ATCmdManager.h	Sat Mar 23 16:28:34 2019 +0000
@@ -19,12 +19,12 @@
                  events::EventQueue &event_queue, WiFiManager *wifi, 
                  MemoryPool<wifi_cmd_message_t, 16> *aT2WiFimPool, 
                  Queue<wifi_cmd_message_t, 16> *aT2WiFiCmdQueue, 
-                 MemoryPool<wifi_cmd_message_t, 16> *wiFi2ATmPool, 
-                 Queue<wifi_cmd_message_t, 16> *wiFi2ATCmdQueue, 
+                 MemoryPool<at_resp_message_t, 16> *wiFi2ATmPool, 
+                 Queue<at_resp_message_t, 16> *wiFi2ATCmdQueue, 
                  MemoryPool<wifi_data_msg_t, 4> *aT2WiFiDatamPool, 
                  Queue<wifi_data_msg_t, 4> *aT2WiFiDataQueue, 
-                 MemoryPool<wifi_data_msg_t, 4> *wiFi2ATDatamPool, 
-                 Queue<wifi_data_msg_t, 4> *wiFi2ATDataQueue, 
+                 MemoryPool<at_data_msg_t, 4> *wiFi2ATDatamPool, 
+                 Queue<at_data_msg_t, 4> *wiFi2ATDataQueue, 
                  bool debug = false);
 public:
     void runMain();
@@ -42,15 +42,15 @@
     ATCmdParser _parser;
     SMDevicePeripheral *blePeripheral;
     WiFiManager *wiFiManager;
-   
-    
+    at_cmd_resp_t at_resp;
+    at_data_mode_t dataMode;
     /*  Queue and memory pool for AT to Wifi commands */
     MemoryPool<wifi_cmd_message_t, 16> *_aT2WiFimPool;
     Queue<wifi_cmd_message_t, 16> *_aT2WiFiCmdQueue;
     
     /*  Queue and memory pool for WiFi to AT commands */
-    MemoryPool<wifi_cmd_message_t, 16> *_wiFi2ATmPool;
-    Queue<wifi_cmd_message_t, 16> *_wiFi2ATCmdQueue;
+    MemoryPool<at_resp_message_t, 16> *_wiFi2ATmPool;
+    Queue<at_resp_message_t, 16> *_wiFi2ATCmdQueue;
     
     /*  Queue and memory pool for AT to WiFi data */
     MemoryPool<wifi_data_msg_t, 4> *_aT2WiFiDatamPool;
@@ -58,14 +58,18 @@
     
     
     /*  Queue and memory pool for WiFi to AT data */
-    MemoryPool<wifi_data_msg_t, 4> *_wiFi2ATDatamPool;
-    Queue<wifi_data_msg_t, 4> *_wiFi2ATDataQueue;
+    MemoryPool<at_data_msg_t, 4> *_wiFi2ATDatamPool;
+    Queue<at_data_msg_t, 4> *_wiFi2ATDataQueue;
+    
+    //pointer to response data - should be deleted after processing
+    at_data_msg_t *resp_data;
 
     
     // OOB processing
     void _process_oob(uint32_t timeout, bool all);
     // OOB message handlers
     void _oob_startup_hdlr();
+    void _oob_ok_hdlr();
     void _oob_bleRole_hdlr();
     void _oob_wifiMode_err();
     void _oob_conn_already();
@@ -82,8 +86,15 @@
     void _oob_scanWiFiNetworks();
     void _oob_connect2WiFiNetwork();
     void _oob_disconnectWiFiNetwork();
+    void _oob_setupInternetConnection();
     const char * sec2str(nsapi_security_t sec);
     bool  queueWiFiCommand(wifi_cmd_t cmd);
+    bool  dequeueATresponse();
+    bool  queueWiFiDataRequest(wifi_data_msg_t cmd);
+    bool  dequeueATdataResponse();
+    void  processResponses();
+    bool  setNextResponse(at_cmd_resp_t resp);
+
     
     /**
     * Allows timeout to be changed between commands