8 #include "ble_service.h" 14 #include <esp_bt_defs.h> 15 #include <esp_gap_ble_api.h> 16 #include <esp_gatt_common_api.h> 17 #include <esp_gattc_api.h> 20 namespace esp32_ble_client {
26 void setup()
override;
30 void run_later(std::function<
void()> &&f);
34 esp_ble_gattc_cb_param_t *param)
override;
35 void gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param)
override;
58 (uint8_t) (this->
address_ >> 32) & 0xff, (uint8_t) (this->
address_ >> 24) & 0xff,
59 (uint8_t) (this->
address_ >> 16) & 0xff, (uint8_t) (this->
address_ >> 8) & 0xff,
60 (uint8_t) (this->
address_ >> 0) & 0xff);
BLEDescriptor * get_descriptor(espbt::ESPBTUUID service, espbt::ESPBTUUID chr, espbt::ESPBTUUID descr)
void on_scan_end() override
BLEService * get_service(espbt::ESPBTUUID uuid)
void log_event_(const char *name)
std::vector< BLEService * > services_
uint8_t * get_remote_bda()
float get_setup_priority() const override
bool check_addr(esp_bd_addr_t &addr)
void run_later(std::function< void()> &&f)
uint16_t get_conn_id() const
std::string address_str() const
BLEDescriptor * get_config_descriptor(uint16_t handle)
esp_bd_addr_t remote_bda_
void set_remote_addr_type(esp_ble_addr_type_t address_type)
uint8_t connection_index_
espbt::ConnectionType connection_type_
esp_ble_addr_type_t remote_addr_type_
uint8_t get_connection_index() const
virtual void set_connection_type(espbt::ConnectionType ct)
void set_auto_connect(bool auto_connect)
esp_ble_addr_type_t get_remote_addr_type() const
void gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param) override
BLECharacteristic * get_characteristic(espbt::ESPBTUUID service, espbt::ESPBTUUID chr)
void set_address(uint64_t address)
Implementation of SPI Controller mode.
bool parse_device(const espbt::ESPBTDevice &device) override
bool gattc_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_t gattc_if, esp_ble_gattc_cb_param_t *param) override
float parse_char_value(uint8_t *value, uint16_t length)
uint64_t get_address() const
std::string str_snprintf(const char *fmt, size_t len,...)