ESPHome  2024.10.2
Public Member Functions | Data Fields
esphome::modbus_controller::SensorItem Class Referenceabstract

#include <modbus_controller.h>

Inheritance diagram for esphome::modbus_controller::SensorItem:
esphome::modbus_controller::ModbusBinaryOutput esphome::modbus_controller::ModbusBinarySensor esphome::modbus_controller::ModbusFloatOutput esphome::modbus_controller::ModbusNumber esphome::modbus_controller::ModbusSelect esphome::modbus_controller::ModbusSensor esphome::modbus_controller::ModbusSwitch esphome::modbus_controller::ModbusTextSensor

Public Member Functions

virtual void parse_and_publish (const std::vector< uint8_t > &data)=0
 
void set_custom_data (const std::vector< uint8_t > &data)
 
virtual size_t get_register_size () const
 
void set_register_size (uint8_t register_size)
 

Data Fields

ModbusRegisterType register_type
 
SensorValueType sensor_value_type
 
uint16_t start_address
 
uint32_t bitmask
 
uint8_t offset
 
uint8_t register_count
 
uint8_t response_bytes {0}
 
uint16_t skip_updates
 
std::vector< uint8_t > custom_data {}
 
bool force_new_range {false}
 

Detailed Description

Definition at line 229 of file modbus_controller.h.

Member Function Documentation

◆ get_register_size()

virtual size_t esphome::modbus_controller::SensorItem::get_register_size ( ) const
inlinevirtual

Definition at line 234 of file modbus_controller.h.

◆ parse_and_publish()

virtual void esphome::modbus_controller::SensorItem::parse_and_publish ( const std::vector< uint8_t > &  data)
pure virtual

◆ set_custom_data()

void esphome::modbus_controller::SensorItem::set_custom_data ( const std::vector< uint8_t > &  data)
inline

Definition at line 233 of file modbus_controller.h.

◆ set_register_size()

void esphome::modbus_controller::SensorItem::set_register_size ( uint8_t  register_size)
inline

Definition at line 242 of file modbus_controller.h.

Field Documentation

◆ bitmask

uint32_t esphome::modbus_controller::SensorItem::bitmask

Definition at line 246 of file modbus_controller.h.

◆ custom_data

std::vector<uint8_t> esphome::modbus_controller::SensorItem::custom_data {}

Definition at line 251 of file modbus_controller.h.

◆ force_new_range

bool esphome::modbus_controller::SensorItem::force_new_range {false}

Definition at line 252 of file modbus_controller.h.

◆ offset

uint8_t esphome::modbus_controller::SensorItem::offset

Definition at line 247 of file modbus_controller.h.

◆ register_count

uint8_t esphome::modbus_controller::SensorItem::register_count

Definition at line 248 of file modbus_controller.h.

◆ register_type

ModbusRegisterType esphome::modbus_controller::SensorItem::register_type

Definition at line 243 of file modbus_controller.h.

◆ response_bytes

uint8_t esphome::modbus_controller::SensorItem::response_bytes {0}

Definition at line 249 of file modbus_controller.h.

◆ sensor_value_type

SensorValueType esphome::modbus_controller::SensorItem::sensor_value_type

Definition at line 244 of file modbus_controller.h.

◆ skip_updates

uint16_t esphome::modbus_controller::SensorItem::skip_updates

Definition at line 250 of file modbus_controller.h.

◆ start_address

uint16_t esphome::modbus_controller::SensorItem::start_address

Definition at line 245 of file modbus_controller.h.


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