18#include <esp_gap_ble_api.h>
19#include <esp_gattc_api.h>
20#include <esp_gatts_api.h>
57 virtual void gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param) = 0;
63 esp_ble_gattc_cb_param_t *param) = 0;
69 esp_ble_gatts_cb_param_t *param) = 0;
89 void setup()
override;
112 static void gatts_event_handler(esp_gatts_cb_event_t event, esp_gatt_if_t gatts_if, esp_ble_gatts_cb_param_t *param);
113 static void gattc_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_t gattc_if, esp_ble_gattc_cb_param_t *param);
114 static void gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param);
Base class for all automation conditions.
void play(Ts... x) override
void play(Ts... x) override
bool check(Ts... x) override
virtual void ble_before_disabled_event_handler()=0
std::vector< GATTsEventHandler * > gatts_event_handlers_
void advertising_set_manufacturer_data(const std::vector< uint8_t > &data)
void register_gap_event_handler(GAPEventHandler *handler)
void set_enable_on_boot(bool enable_on_boot)
static void gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param)
optional< std::string > name_
BLEAdvertising * advertising_
void register_gattc_event_handler(GATTcEventHandler *handler)
static void gattc_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_t gattc_if, esp_ble_gattc_cb_param_t *param)
void advertising_register_raw_advertisement_callback(std::function< void(bool)> &&callback)
std::vector< GAPEventHandler * > gap_event_handlers_
void real_gap_event_handler_(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param)
void set_advertising_cycle_time(uint32_t advertising_cycle_time)
void register_ble_status_event_handler(BLEStatusEventHandler *handler)
uint32_t advertising_cycle_time_
void advertising_add_service_uuid(ESPBTUUID uuid)
void dump_config() override
std::vector< BLEStatusEventHandler * > ble_status_event_handlers_
void real_gattc_event_handler_(esp_gattc_cb_event_t event, esp_gatt_if_t gattc_if, esp_ble_gattc_cb_param_t *param)
static void gatts_event_handler(esp_gatts_cb_event_t event, esp_gatt_if_t gatts_if, esp_ble_gatts_cb_param_t *param)
void register_gatts_event_handler(GATTsEventHandler *handler)
Queue< BLEEvent > ble_events_
void advertising_set_service_data(const std::vector< uint8_t > &data)
void set_io_capability(IoCapability io_capability)
void advertising_set_appearance(uint16_t appearance)
void real_gatts_event_handler_(esp_gatts_cb_event_t event, esp_gatt_if_t gatts_if, esp_ble_gatts_cb_param_t *param)
float get_setup_priority() const override
void set_name(const std::string &name)
std::vector< GATTcEventHandler * > gattc_event_handlers_
uint32_t get_advertising_cycle_time() const
void advertising_remove_service_uuid(ESPBTUUID uuid)
virtual void gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param)=0
virtual void gattc_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_t gattc_if, esp_ble_gattc_cb_param_t *param)=0
virtual void gatts_event_handler(esp_gatts_cb_event_t event, esp_gatt_if_t gatts_if, esp_ble_gatts_cb_param_t *param)=0
uint64_t ble_addr_to_uint64(const esp_bd_addr_t address)
@ BLE_COMPONENT_STATE_DISABLE
BLE should be disabled on next loop.
@ BLE_COMPONENT_STATE_OFF
Nothing has been initialized yet.
@ BLE_COMPONENT_STATE_ENABLE
BLE should be enabled on next loop.
@ BLE_COMPONENT_STATE_DISABLED
BLE is disabled.
@ BLE_COMPONENT_STATE_ACTIVE
BLE is active.
Providing packet encoding functions for exchanging data with a remote host.