Okundu Omeni
/
wifi-https-ble-sm-uart-atcmd-5-13-1
Diff: source/ATCmdManager.h
- Branch:
- PassingRegression
- Revision:
- 118:8df0e9c2ee3f
- Parent:
- 117:8fd05113efc1
- Child:
- 119:8d939a902333
diff -r 8fd05113efc1 -r 8df0e9c2ee3f source/ATCmdManager.h --- a/source/ATCmdManager.h Sun May 19 16:22:59 2019 +0000 +++ b/source/ATCmdManager.h Sat May 25 16:25:42 2019 +0000 @@ -6,6 +6,7 @@ #include "ATCmdParser.h" #include "BleManager.h" #include "WiFiManager.h" +#include "common_config.h" #define NUM_UART_OPTIONS 6 #ifndef UBLOX_ODIN_W2_MISC_TIMEOUT @@ -30,6 +31,10 @@ Queue<wifi_data_msg_t, PQDSZ> *aT2WiFiDataQueue, MemoryPool<at_data_msg_t, PQDSZ> *wiFi2ATDatamPool, Queue<at_data_msg_t, PQDSZ> *wiFi2ATDataQueue, + MemoryPool<at_ble_msg_t, PQDSZ_BLE> *aT2BleDatamPool, + Queue<at_ble_msg_t, PQDSZ_BLE> *aT2BleDataQueue, + MemoryPool<ble_at_msg_t, PQDSZ_BLE> *ble2ATDatamPool, + Queue<ble_at_msg_t, PQDSZ_BLE> *ble2ATDataQueue, bool debug = false); public: void runMain(); @@ -50,6 +55,8 @@ WiFiManager *wiFiManager; at_cmd_resp_t at_resp; at_data_mode_t dataMode; + uint32_t lastHttpRespTime; + uint8_t lastCloudMsgType; /* Queue and memory pool for AT to Wifi commands */ MemoryPool<wifi_cmd_message_t, 16> *_aT2WiFimPool; Queue<wifi_cmd_message_t, 16> *_aT2WiFiCmdQueue; @@ -66,6 +73,16 @@ /* Queue and memory pool for WiFi to AT data */ MemoryPool<at_data_msg_t, PQDSZ> *_wiFi2ATDatamPool; Queue<at_data_msg_t, PQDSZ> *_wiFi2ATDataQueue; + + /* Queue and memory pool for AT to BLE data */ + MemoryPool<at_ble_msg_t, PQDSZ_BLE> *_aT2BleDatamPool; + Queue<at_ble_msg_t, PQDSZ_BLE> *_aT2BleDataQueue; + + + /* Queue and memory pool for BLE to AT data */ + MemoryPool<ble_at_msg_t, PQDSZ_BLE> *_ble2ATDatamPool; + Queue<ble_at_msg_t, PQDSZ_BLE> *_ble2ATDataQueue; + //pointer to response data - should be deleted after processing at_data_msg_t *resp_data; @@ -90,6 +107,8 @@ void _oob_echo_off(); void _oob_uart_setup(); void _oob_echo_on(); + void _oob_debug_logs_on(); + void _oob_debug_logs_off(); void _oob_data_mode(); void _oob_get_mac_addr(); void _oob_get_ble_role(); @@ -132,6 +151,7 @@ void sendConnectEvent(const uint8_t *buf, int len); int readAtCommandString(char *strbuf, size_t bufLen); void updateWiFiMgrStatus(); + void sendBleDataEvent(const char *buf, int len); /** * Allows timeout to be changed between commands