diff options
author | Neil Kolban <kolban1@kolban.com> | 2017-11-21 09:51:03 -0600 |
---|---|---|
committer | Neil Kolban <kolban1@kolban.com> | 2017-11-21 09:51:03 -0600 |
commit | 4a781e01832176d61af010669b8c362f5a777768 (patch) | |
tree | 6a7a16309d61c4728512f5eb632d3ad565288c36 /src/BLEClient.h | |
parent | Fixes for #121 (diff) | |
download | thermostat-4a781e01832176d61af010669b8c362f5a777768.tar.gz thermostat-4a781e01832176d61af010669b8c362f5a777768.tar.bz2 thermostat-4a781e01832176d61af010669b8c362f5a777768.zip |
Updates 2017-11-21 0950
Diffstat (limited to 'src/BLEClient.h')
-rw-r--r-- | src/BLEClient.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/BLEClient.h b/src/BLEClient.h index 494f51d..b24c71a 100644 --- a/src/BLEClient.h +++ b/src/BLEClient.h @@ -15,7 +15,7 @@ #include <string.h> #include <map> #include <string> -#include <BLERemoteService.h> +#include "BLERemoteService.h" #include "BLEService.h" #include "BLEAddress.h" @@ -32,9 +32,14 @@ public: bool connect(BLEAddress address); void disconnect(); BLEAddress getPeerAddress(); + int getRssi(); std::map<std::string, BLERemoteService*>* getServices(); BLERemoteService* getService(const char* uuid); BLERemoteService* getService(BLEUUID uuid); + void handleGAPEvent( + esp_gap_ble_cb_event_t event, + esp_ble_gap_cb_param_t* param); + bool isConnected(); void setClientCallbacks(BLEClientCallbacks *pClientCallbacks); std::string toString(); @@ -55,11 +60,13 @@ private: uint16_t m_conn_id; // int m_deviceType; esp_gatt_if_t m_gattc_if; + bool m_isConnected; BLEClientCallbacks* m_pClientCallbacks; FreeRTOS::Semaphore m_semaphoreRegEvt = FreeRTOS::Semaphore("RegEvt"); FreeRTOS::Semaphore m_semaphoreOpenEvt = FreeRTOS::Semaphore("OpenEvt"); FreeRTOS::Semaphore m_semaphoreSearchCmplEvt = FreeRTOS::Semaphore("SearchCmplEvt"); + FreeRTOS::Semaphore m_semaphoreRssiCmplEvt = FreeRTOS::Semaphore("RssiCmplEvt"); std::map<std::string, BLERemoteService*> m_servicesMap; bool m_haveServices; // Have we previously obtain the set of services. }; // class BLEDevice |