ESPHome  2024.4.1
Public Member Functions | Protected Attributes
esphome::nextion::NextionComponentBase Class Reference

#include <nextion_component_base.h>

Inheritance diagram for esphome::nextion::NextionComponentBase:
esphome::nextion::NextionComponent esphome::nextion::NextionBinarySensor esphome::nextion::NextionSensor esphome::nextion::NextionSwitch esphome::nextion::NextionTextSensor

Public Member Functions

virtual ~NextionComponentBase ()=default
 
void set_variable_name (const std::string &variable_name, const std::string &variable_name_to_send="")
 
virtual void update_component_settings ()
 
virtual void update_component_settings (bool force_update)
 
virtual void update_component ()
 
virtual void process_sensor (const std::string &variable_name, int state)
 
virtual void process_touch (uint8_t page_id, uint8_t component_id, bool on)
 
virtual void process_text (const std::string &variable_name, const std::string &text_value)
 
virtual void process_bool (const std::string &variable_name, bool on)
 
virtual void set_state (float state)
 
virtual void set_state (float state, bool publish)
 
virtual void set_state (float state, bool publish, bool send_to_nextion)
 
virtual void set_state (bool state)
 
virtual void set_state (bool state, bool publish)
 
virtual void set_state (bool state, bool publish, bool send_to_nextion)
 
virtual void set_state (const std::string &state)
 
virtual void set_state (const std::string &state, bool publish)
 
virtual void set_state (const std::string &state, bool publish, bool send_to_nextion)
 
uint8_t get_component_id ()
 
void set_component_id (uint8_t component_id)
 
uint8_t get_wave_channel_id ()
 
void set_wave_channel_id (uint8_t wave_chan_id)
 
std::vector< uint8_t > get_wave_buffer ()
 
size_t get_wave_buffer_size ()
 
void clear_wave_buffer (size_t buffer_sent)
 
std::string get_variable_name ()
 
std::string get_variable_name_to_send ()
 
virtual NextionQueueType get_queue_type ()
 
virtual std::string get_queue_type_string ()
 
virtual void set_state_from_int (int state_value, bool publish, bool send_to_nextion)
 
virtual void set_state_from_string (const std::string &state_value, bool publish, bool send_to_nextion)
 
virtual void send_state_to_nextion ()
 
bool get_needs_to_send_update ()
 
uint8_t get_wave_chan_id ()
 
void set_wave_max_length (int wave_max_length)
 

Protected Attributes

std::string variable_name_
 
std::string variable_name_to_send_
 
uint8_t component_id_ = 0
 
uint8_t wave_chan_id_ = UINT8_MAX
 
std::vector< uint8_t > wave_buffer_
 
int wave_max_length_ = 255
 
bool needs_to_send_update_
 

Detailed Description

Definition at line 30 of file nextion_component_base.h.

Constructor & Destructor Documentation

◆ ~NextionComponentBase()

virtual esphome::nextion::NextionComponentBase::~NextionComponentBase ( )
virtualdefault

Member Function Documentation

◆ clear_wave_buffer()

void esphome::nextion::NextionComponentBase::clear_wave_buffer ( size_t  buffer_sent)
inline

Definition at line 72 of file nextion_component_base.h.

◆ get_component_id()

uint8_t esphome::nextion::NextionComponentBase::get_component_id ( )
inline

Definition at line 64 of file nextion_component_base.h.

◆ get_needs_to_send_update()

bool esphome::nextion::NextionComponentBase::get_needs_to_send_update ( )
inline

Definition at line 87 of file nextion_component_base.h.

◆ get_queue_type()

virtual NextionQueueType esphome::nextion::NextionComponentBase::get_queue_type ( )
inlinevirtual

◆ get_queue_type_string()

virtual std::string esphome::nextion::NextionComponentBase::get_queue_type_string ( )
inlinevirtual

Definition at line 83 of file nextion_component_base.h.

◆ get_variable_name()

std::string esphome::nextion::NextionComponentBase::get_variable_name ( )
inline

Definition at line 80 of file nextion_component_base.h.

◆ get_variable_name_to_send()

std::string esphome::nextion::NextionComponentBase::get_variable_name_to_send ( )
inline

Definition at line 81 of file nextion_component_base.h.

◆ get_wave_buffer()

std::vector<uint8_t> esphome::nextion::NextionComponentBase::get_wave_buffer ( )
inline

Definition at line 70 of file nextion_component_base.h.

◆ get_wave_buffer_size()

size_t esphome::nextion::NextionComponentBase::get_wave_buffer_size ( )
inline

Definition at line 71 of file nextion_component_base.h.

◆ get_wave_chan_id()

uint8_t esphome::nextion::NextionComponentBase::get_wave_chan_id ( )
inline

Definition at line 88 of file nextion_component_base.h.

◆ get_wave_channel_id()

uint8_t esphome::nextion::NextionComponentBase::get_wave_channel_id ( )
inline

Definition at line 67 of file nextion_component_base.h.

◆ process_bool()

virtual void esphome::nextion::NextionComponentBase::process_bool ( const std::string &  variable_name,
bool  on 
)
inlinevirtual

◆ process_sensor()

virtual void esphome::nextion::NextionComponentBase::process_sensor ( const std::string &  variable_name,
int  state 
)
inlinevirtual

Reimplemented in esphome::nextion::NextionSensor.

Definition at line 47 of file nextion_component_base.h.

◆ process_text()

virtual void esphome::nextion::NextionComponentBase::process_text ( const std::string &  variable_name,
const std::string &  text_value 
)
inlinevirtual

Reimplemented in esphome::nextion::NextionTextSensor.

Definition at line 49 of file nextion_component_base.h.

◆ process_touch()

virtual void esphome::nextion::NextionComponentBase::process_touch ( uint8_t  page_id,
uint8_t  component_id,
bool  on 
)
inlinevirtual

Reimplemented in esphome::nextion::NextionBinarySensor.

Definition at line 48 of file nextion_component_base.h.

◆ send_state_to_nextion()

virtual void esphome::nextion::NextionComponentBase::send_state_to_nextion ( )
inlinevirtual

◆ set_component_id()

void esphome::nextion::NextionComponentBase::set_component_id ( uint8_t  component_id)
inline

Definition at line 65 of file nextion_component_base.h.

◆ set_state() [1/9]

virtual void esphome::nextion::NextionComponentBase::set_state ( float  state)
inlinevirtual

Reimplemented in esphome::nextion::NextionSensor.

Definition at line 52 of file nextion_component_base.h.

◆ set_state() [2/9]

virtual void esphome::nextion::NextionComponentBase::set_state ( float  state,
bool  publish 
)
inlinevirtual

Reimplemented in esphome::nextion::NextionSensor.

Definition at line 53 of file nextion_component_base.h.

◆ set_state() [3/9]

virtual void esphome::nextion::NextionComponentBase::set_state ( float  state,
bool  publish,
bool  send_to_nextion 
)
inlinevirtual

Reimplemented in esphome::nextion::NextionSensor.

Definition at line 54 of file nextion_component_base.h.

◆ set_state() [4/9]

virtual void esphome::nextion::NextionComponentBase::set_state ( bool  state)
inlinevirtual

◆ set_state() [5/9]

virtual void esphome::nextion::NextionComponentBase::set_state ( bool  state,
bool  publish 
)
inlinevirtual

◆ set_state() [6/9]

virtual void esphome::nextion::NextionComponentBase::set_state ( bool  state,
bool  publish,
bool  send_to_nextion 
)
inlinevirtual

◆ set_state() [7/9]

virtual void esphome::nextion::NextionComponentBase::set_state ( const std::string &  state)
inlinevirtual

Reimplemented in esphome::nextion::NextionTextSensor.

Definition at line 60 of file nextion_component_base.h.

◆ set_state() [8/9]

virtual void esphome::nextion::NextionComponentBase::set_state ( const std::string &  state,
bool  publish 
)
inlinevirtual

Reimplemented in esphome::nextion::NextionTextSensor.

Definition at line 61 of file nextion_component_base.h.

◆ set_state() [9/9]

virtual void esphome::nextion::NextionComponentBase::set_state ( const std::string &  state,
bool  publish,
bool  send_to_nextion 
)
inlinevirtual

Reimplemented in esphome::nextion::NextionTextSensor.

Definition at line 62 of file nextion_component_base.h.

◆ set_state_from_int()

virtual void esphome::nextion::NextionComponentBase::set_state_from_int ( int  state_value,
bool  publish,
bool  send_to_nextion 
)
inlinevirtual

◆ set_state_from_string()

virtual void esphome::nextion::NextionComponentBase::set_state_from_string ( const std::string &  state_value,
bool  publish,
bool  send_to_nextion 
)
inlinevirtual

◆ set_variable_name()

void esphome::nextion::NextionComponentBase::set_variable_name ( const std::string &  variable_name,
const std::string &  variable_name_to_send = "" 
)
inline

Definition at line 34 of file nextion_component_base.h.

◆ set_wave_channel_id()

void esphome::nextion::NextionComponentBase::set_wave_channel_id ( uint8_t  wave_chan_id)
inline

Definition at line 68 of file nextion_component_base.h.

◆ set_wave_max_length()

void esphome::nextion::NextionComponentBase::set_wave_max_length ( int  wave_max_length)
inline

Definition at line 89 of file nextion_component_base.h.

◆ update_component()

virtual void esphome::nextion::NextionComponentBase::update_component ( )
inlinevirtual

◆ update_component_settings() [1/2]

virtual void esphome::nextion::NextionComponentBase::update_component_settings ( )
inlinevirtual

Reimplemented in esphome::nextion::NextionComponent.

Definition at line 43 of file nextion_component_base.h.

◆ update_component_settings() [2/2]

virtual void esphome::nextion::NextionComponentBase::update_component_settings ( bool  force_update)
inlinevirtual

Reimplemented in esphome::nextion::NextionComponent.

Definition at line 44 of file nextion_component_base.h.

Field Documentation

◆ component_id_

uint8_t esphome::nextion::NextionComponentBase::component_id_ = 0
protected

Definition at line 95 of file nextion_component_base.h.

◆ needs_to_send_update_

bool esphome::nextion::NextionComponentBase::needs_to_send_update_
protected

Definition at line 100 of file nextion_component_base.h.

◆ variable_name_

std::string esphome::nextion::NextionComponentBase::variable_name_
protected

Definition at line 92 of file nextion_component_base.h.

◆ variable_name_to_send_

std::string esphome::nextion::NextionComponentBase::variable_name_to_send_
protected

Definition at line 93 of file nextion_component_base.h.

◆ wave_buffer_

std::vector<uint8_t> esphome::nextion::NextionComponentBase::wave_buffer_
protected

Definition at line 97 of file nextion_component_base.h.

◆ wave_chan_id_

uint8_t esphome::nextion::NextionComponentBase::wave_chan_id_ = UINT8_MAX
protected

Definition at line 96 of file nextion_component_base.h.

◆ wave_max_length_

int esphome::nextion::NextionComponentBase::wave_max_length_ = 255
protected

Definition at line 98 of file nextion_component_base.h.


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