ESPHome  2022.11.3
Public Member Functions | Protected Member Functions | Protected Attributes
esphome::bluetooth_proxy::BluetoothProxy Class Reference

#include <bluetooth_proxy.h>

Inheritance diagram for esphome::bluetooth_proxy::BluetoothProxy:
esphome::esp32_ble_tracker::ESPBTDeviceListener esphome::Component

Public Member Functions

 BluetoothProxy ()
 
bool parse_device (const esp32_ble_tracker::ESPBTDevice &device) override
 
void dump_config () override
 
void loop () override
 
void register_connection (BluetoothConnection *connection)
 
void bluetooth_device_request (const api::BluetoothDeviceRequest &msg)
 
void bluetooth_gatt_read (const api::BluetoothGATTReadRequest &msg)
 
void bluetooth_gatt_write (const api::BluetoothGATTWriteRequest &msg)
 
void bluetooth_gatt_read_descriptor (const api::BluetoothGATTReadDescriptorRequest &msg)
 
void bluetooth_gatt_write_descriptor (const api::BluetoothGATTWriteDescriptorRequest &msg)
 
void bluetooth_gatt_send_services (const api::BluetoothGATTGetServicesRequest &msg)
 
void bluetooth_gatt_notify (const api::BluetoothGATTNotifyRequest &msg)
 
int get_bluetooth_connections_free ()
 
int get_bluetooth_connections_limit ()
 
void set_active (bool active)
 
bool has_active ()
 
- Public Member Functions inherited from esphome::esp32_ble_tracker::ESPBTDeviceListener
virtual void on_scan_end ()
 
void set_parent (ESP32BLETracker *parent)
 
- Public Member Functions inherited from esphome::Component
virtual void setup ()
 Where the component's initialization should happen. More...
 
virtual float get_setup_priority () const
 priority of setup(). More...
 
float get_actual_setup_priority () const
 
void set_setup_priority (float priority)
 
virtual float get_loop_priority () const
 priority of loop(). More...
 
void call ()
 
virtual void on_shutdown ()
 
virtual void on_safe_shutdown ()
 
uint32_t get_component_state () const
 
virtual void mark_failed ()
 Mark this component as failed. More...
 
bool is_failed ()
 
virtual bool can_proceed ()
 
bool status_has_warning ()
 
bool status_has_error ()
 
void status_set_warning ()
 
void status_set_error ()
 
void status_clear_warning ()
 
void status_clear_error ()
 
void status_momentary_warning (const std::string &name, uint32_t length=5000)
 
void status_momentary_error (const std::string &name, uint32_t length=5000)
 
bool has_overridden_loop () const
 
void set_component_source (const char *source)
 Set where this component was loaded from for some debug messages. More...
 
const char * get_component_source () const
 Get the integration where this component was declared as a string. More...
 

Protected Member Functions

void send_api_packet_ (const esp32_ble_tracker::ESPBTDevice &device)
 
BluetoothConnectionget_connection_ (uint64_t address, bool reserve)
 
- Protected Member Functions inherited from esphome::Component
virtual void call_loop ()
 
virtual void call_setup ()
 
virtual void call_dump_config ()
 
void set_interval (const std::string &name, uint32_t interval, std::function< void()> &&f)
 Set an interval function with a unique name. More...
 
void set_interval (uint32_t interval, std::function< void()> &&f)
 
bool cancel_interval (const std::string &name)
 Cancel an interval function. More...
 
void set_retry (const std::string &name, uint32_t initial_wait_time, uint8_t max_attempts, std::function< RetryResult()> &&f, float backoff_increase_factor=1.0f)
 Set an retry function with a unique name. More...
 
void set_retry (uint32_t initial_wait_time, uint8_t max_attempts, std::function< RetryResult()> &&f, float backoff_increase_factor=1.0f)
 
bool cancel_retry (const std::string &name)
 Cancel a retry function. More...
 
void set_timeout (const std::string &name, uint32_t timeout, std::function< void()> &&f)
 Set a timeout function with a unique name. More...
 
void set_timeout (uint32_t timeout, std::function< void()> &&f)
 
bool cancel_timeout (const std::string &name)
 Cancel a timeout function. More...
 
void defer (const std::string &name, std::function< void()> &&f)
 Defer a callback to the next loop() call. More...
 
void defer (std::function< void()> &&f)
 Defer a callback to the next loop() call. More...
 
bool cancel_defer (const std::string &name)
 Cancel a defer callback using the specified name, name must not be empty. More...
 

Protected Attributes

int16_t send_service_ {-1}
 
bool active_
 
std::vector< BluetoothConnection * > connections_ {}
 
- Protected Attributes inherited from esphome::esp32_ble_tracker::ESPBTDeviceListener
ESP32BLETrackerparent_ {nullptr}
 
- Protected Attributes inherited from esphome::Component
uint32_t component_state_ {0x0000}
 State of this component. More...
 
float setup_priority_override_ {NAN}
 
const char * component_source_ {nullptr}
 

Detailed Description

Definition at line 23 of file bluetooth_proxy.h.

Constructor & Destructor Documentation

◆ BluetoothProxy()

esphome::bluetooth_proxy::BluetoothProxy::BluetoothProxy ( )

Definition at line 14 of file bluetooth_proxy.cpp.

Member Function Documentation

◆ bluetooth_device_request()

void esphome::bluetooth_proxy::BluetoothProxy::bluetooth_device_request ( const api::BluetoothDeviceRequest msg)

Definition at line 114 of file bluetooth_proxy.cpp.

◆ bluetooth_gatt_notify()

void esphome::bluetooth_proxy::BluetoothProxy::bluetooth_gatt_notify ( const api::BluetoothGATTNotifyRequest msg)

Definition at line 226 of file bluetooth_proxy.cpp.

◆ bluetooth_gatt_read()

void esphome::bluetooth_proxy::BluetoothProxy::bluetooth_gatt_read ( const api::BluetoothGATTReadRequest msg)

Definition at line 154 of file bluetooth_proxy.cpp.

◆ bluetooth_gatt_read_descriptor()

void esphome::bluetooth_proxy::BluetoothProxy::bluetooth_gatt_read_descriptor ( const api::BluetoothGATTReadDescriptorRequest msg)

Definition at line 182 of file bluetooth_proxy.cpp.

◆ bluetooth_gatt_send_services()

void esphome::bluetooth_proxy::BluetoothProxy::bluetooth_gatt_send_services ( const api::BluetoothGATTGetServicesRequest msg)

Definition at line 210 of file bluetooth_proxy.cpp.

◆ bluetooth_gatt_write()

void esphome::bluetooth_proxy::BluetoothProxy::bluetooth_gatt_write ( const api::BluetoothGATTWriteRequest msg)

Definition at line 168 of file bluetooth_proxy.cpp.

◆ bluetooth_gatt_write_descriptor()

void esphome::bluetooth_proxy::BluetoothProxy::bluetooth_gatt_write_descriptor ( const api::BluetoothGATTWriteDescriptorRequest msg)

Definition at line 196 of file bluetooth_proxy.cpp.

◆ dump_config()

void esphome::bluetooth_proxy::BluetoothProxy::dump_config ( )
overridevirtual

Reimplemented from esphome::Component.

Definition at line 50 of file bluetooth_proxy.cpp.

◆ get_bluetooth_connections_free()

int esphome::bluetooth_proxy::BluetoothProxy::get_bluetooth_connections_free ( )
inline

Definition at line 43 of file bluetooth_proxy.h.

◆ get_bluetooth_connections_limit()

int esphome::bluetooth_proxy::BluetoothProxy::get_bluetooth_connections_limit ( )
inline

Definition at line 52 of file bluetooth_proxy.h.

◆ get_connection_()

BluetoothConnection * esphome::bluetooth_proxy::BluetoothProxy::get_connection_ ( uint64_t  address,
bool  reserve 
)
protected

Definition at line 95 of file bluetooth_proxy.cpp.

◆ has_active()

bool esphome::bluetooth_proxy::BluetoothProxy::has_active ( )
inline

Definition at line 55 of file bluetooth_proxy.h.

◆ loop()

void esphome::bluetooth_proxy::BluetoothProxy::loop ( )
overridevirtual

Reimplemented from esphome::Component.

Definition at line 55 of file bluetooth_proxy.cpp.

◆ parse_device()

bool esphome::bluetooth_proxy::BluetoothProxy::parse_device ( const esp32_ble_tracker::ESPBTDevice device)
overridevirtual

◆ register_connection()

void esphome::bluetooth_proxy::BluetoothProxy::register_connection ( BluetoothConnection connection)
inline

Definition at line 30 of file bluetooth_proxy.h.

◆ send_api_packet_()

void esphome::bluetooth_proxy::BluetoothProxy::send_api_packet_ ( const esp32_ble_tracker::ESPBTDevice device)
protected

Definition at line 26 of file bluetooth_proxy.cpp.

◆ set_active()

void esphome::bluetooth_proxy::BluetoothProxy::set_active ( bool  active)
inline

Definition at line 54 of file bluetooth_proxy.h.

Field Documentation

◆ active_

bool esphome::bluetooth_proxy::BluetoothProxy::active_
protected

Definition at line 63 of file bluetooth_proxy.h.

◆ connections_

std::vector<BluetoothConnection *> esphome::bluetooth_proxy::BluetoothProxy::connections_ {}
protected

Definition at line 65 of file bluetooth_proxy.h.

◆ send_service_

int16_t esphome::bluetooth_proxy::BluetoothProxy::send_service_ {-1}
protected

Definition at line 62 of file bluetooth_proxy.h.


The documentation for this class was generated from the following files: