ESPHome  2024.10.2
Public Member Functions
esphome::ble_client::BLEClientWriteAction< Ts > Class Template Reference

#include <automation.h>

Inheritance diagram for esphome::ble_client::BLEClientWriteAction< Ts >:
esphome::Action< Ts... > esphome::ble_client::BLEClientNode

Public Member Functions

 BLEClientWriteAction (BLEClient *ble_client)
 
void set_service_uuid16 (uint16_t uuid)
 
void set_service_uuid32 (uint32_t uuid)
 
void set_service_uuid128 (uint8_t *uuid)
 
void set_char_uuid16 (uint16_t uuid)
 
void set_char_uuid32 (uint32_t uuid)
 
void set_char_uuid128 (uint8_t *uuid)
 
void set_value_template (std::function< std::vector< uint8_t >(Ts...)> func)
 
void set_value_simple (const std::vector< uint8_t > &value)
 
void play (Ts... x) override
 
void play_complex (Ts... x) override
 
bool write (const std::vector< uint8_t > &value)
 Note about logging: the esph_log_X macros are used here because the CI checks complain about use of the ESP LOG macros in header files (Can't even write it in a comment!) Not sure why, because they seem to work just fine. More...
 
void gattc_event_handler (esp_gattc_cb_event_t event, esp_gatt_if_t gattc_if, esp_ble_gattc_cb_param_t *param) override
 
- Public Member Functions inherited from esphome::Action< Ts... >
virtual void stop_complex ()
 
virtual bool is_running ()
 Check if this or any of the following actions are currently running. More...
 
int num_running_total ()
 The total number of actions that are currently running in this plus any of the following actions in the chain. More...
 
- Public Member Functions inherited from esphome::ble_client::BLEClientNode
virtual void gap_event_handler (esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param)
 
virtual void loop ()
 
void set_address (uint64_t address)
 
BLEClientparent ()
 
void set_ble_client_parent (BLEClient *parent)
 

Additional Inherited Members

- Data Fields inherited from esphome::ble_client::BLEClientNode
espbt::ESPBTClientclient
 
espbt::ClientState node_state
 
- Protected Member Functions inherited from esphome::Action< Ts... >
void play_next_ (Ts... x)
 
void play_next_tuple_ (const std::tuple< Ts... > &tuple, seq< S... >)
 
void play_next_tuple_ (const std::tuple< Ts... > &tuple)
 
virtual void stop ()
 
void stop_next_ ()
 
bool is_running_next_ ()
 
- Protected Attributes inherited from esphome::Action< Ts... >
friend ActionList< Ts... >
 
Action< Ts... > * next_
 
int num_running_
 The number of instances of this sequence in the list of actions that is currently being executed. More...
 
- Protected Attributes inherited from esphome::ble_client::BLEClientNode
BLEClientparent_
 
uint64_t address_
 

Detailed Description

template<typename... Ts>
class esphome::ble_client::BLEClientWriteAction< Ts >

Definition at line 94 of file automation.h.

Constructor & Destructor Documentation

◆ BLEClientWriteAction()

template<typename... Ts>
esphome::ble_client::BLEClientWriteAction< Ts >::BLEClientWriteAction ( BLEClient ble_client)
inline

Definition at line 96 of file automation.h.

Member Function Documentation

◆ gattc_event_handler()

template<typename... Ts>
void esphome::ble_client::BLEClientWriteAction< Ts >::gattc_event_handler ( esp_gattc_cb_event_t  event,
esp_gatt_if_t  gattc_if,
esp_ble_gattc_cb_param_t *  param 
)
inlineoverridevirtual

Reimplemented from esphome::ble_client::BLEClientNode.

Definition at line 155 of file automation.h.

◆ play()

template<typename... Ts>
void esphome::ble_client::BLEClientWriteAction< Ts >::play ( Ts...  x)
inlineoverridevirtual

Implements esphome::Action< Ts... >.

Definition at line 119 of file automation.h.

◆ play_complex()

template<typename... Ts>
void esphome::ble_client::BLEClientWriteAction< Ts >::play_complex ( Ts...  x)
inlineoverridevirtual

Reimplemented from esphome::Action< Ts... >.

Definition at line 121 of file automation.h.

◆ set_char_uuid128()

template<typename... Ts>
void esphome::ble_client::BLEClientWriteAction< Ts >::set_char_uuid128 ( uint8_t *  uuid)
inline

Definition at line 107 of file automation.h.

◆ set_char_uuid16()

template<typename... Ts>
void esphome::ble_client::BLEClientWriteAction< Ts >::set_char_uuid16 ( uint16_t  uuid)
inline

Definition at line 105 of file automation.h.

◆ set_char_uuid32()

template<typename... Ts>
void esphome::ble_client::BLEClientWriteAction< Ts >::set_char_uuid32 ( uint32_t  uuid)
inline

Definition at line 106 of file automation.h.

◆ set_service_uuid128()

template<typename... Ts>
void esphome::ble_client::BLEClientWriteAction< Ts >::set_service_uuid128 ( uint8_t *  uuid)
inline

Definition at line 103 of file automation.h.

◆ set_service_uuid16()

template<typename... Ts>
void esphome::ble_client::BLEClientWriteAction< Ts >::set_service_uuid16 ( uint16_t  uuid)
inline

Definition at line 101 of file automation.h.

◆ set_service_uuid32()

template<typename... Ts>
void esphome::ble_client::BLEClientWriteAction< Ts >::set_service_uuid32 ( uint32_t  uuid)
inline

Definition at line 102 of file automation.h.

◆ set_value_simple()

template<typename... Ts>
void esphome::ble_client::BLEClientWriteAction< Ts >::set_value_simple ( const std::vector< uint8_t > &  value)
inline

Definition at line 114 of file automation.h.

◆ set_value_template()

template<typename... Ts>
void esphome::ble_client::BLEClientWriteAction< Ts >::set_value_template ( std::function< std::vector< uint8_t >(Ts...)>  func)
inline

Definition at line 109 of file automation.h.

◆ write()

template<typename... Ts>
bool esphome::ble_client::BLEClientWriteAction< Ts >::write ( const std::vector< uint8_t > &  value)
inline

Note about logging: the esph_log_X macros are used here because the CI checks complain about use of the ESP LOG macros in header files (Can't even write it in a comment!) Not sure why, because they seem to work just fine.

The problem is that the implementation of a templated class can't be placed in a .cpp file when using C++ less than 17, so the methods have to be here. The esph_log_X macros are equivalent in function, but don't trigger the CI errors.

Definition at line 139 of file automation.h.


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