ESPHome 2026.10.0-dev
Loading...
Searching...
No Matches
modbus_controller.h File Reference

Go to the source code of this file.

Data Structures

class  esphome::modbus_controller::SensorItem
 
class  esphome::modbus_controller::SensorItemsComparator
 
struct  esphome::modbus_controller::RegisterRange
 
class  esphome::modbus_controller::ControllerDevice
 The shared feedback half of a controller-owned hub device: online/offline tracking, retry counting and the on_command_sent trigger all route to the controller from here. More...
 
class  esphome::modbus_controller::WriterDevice
 The write side of a ControllerDevice, owned by the writer entities through WriterEntity, whose forwarders re-expose exactly the request API a write lambda may use and record every dispatch. More...
 
class  esphome::modbus_controller::WriterEntity
 Gives a writer entity the write API of the WriterDevice it owns. More...
 
class  esphome::modbus_controller::PollingDevice
 A persistent hub device that polls one register range - the read-side mirror of WriterDevice. More...
 
class  esphome::modbus_controller::ModbusController
 Modbus controller class. More...
 

Namespaces

namespace  esphome
 
namespace  esphome::modbus_controller
 

Typedefs

using esphome::modbus_controller::SensorSet = std::set<SensorItem *, SensorItemsComparator>
 

Enumerations

enum class  esphome::modbus_controller::RangeReuse : uint8_t { esphome::modbus_controller::AUTO = 0 , esphome::modbus_controller::ALWAYS = 1 , esphome::modbus_controller::NEVER = 2 }
 How an item relates to the register range built just before it (same register type, address order). More...
 

Functions

 esphome::modbus_controller::ESPDEPRECATED ("Use modbus::helpers::value_type_is_float() instead. Removed in 2026.10.0", "2026.4.0") inline bool value_type_is_float(SensorValueType v)
 
 esphome::modbus_controller::ESPDEPRECATED ("Use modbus::helpers::modbus_register_read_function() instead. Removed in 2026.10.0", "2026.4.0") inline FunctionCode modbus_register_read_function(modbus
 
 esphome::modbus_controller::ESPDEPRECATED ("Use modbus::helpers::modbus_register_write_function() instead. Removed in 2026.10.0", "2026.4.0") inline FunctionCode modbus_register_write_function(modbus
 
 esphome::modbus_controller::ESPDEPRECATED ("Use modbus::helpers::c_to_hex() instead. Removed in 2026.10.0", "2026.4.0") inline uint8_t c_to_hex(char c)
 
 esphome::modbus_controller::ESPDEPRECATED ("Use modbus::helpers::byte_from_hex_str() instead. Removed in 2026.10.0", "2026.4.0") inline uint8_t byte_from_hex_str(const std
 
 esphome::modbus_controller::ESPDEPRECATED ("Use modbus::helpers::word_from_hex_str() instead. Removed in 2026.10.0", "2026.4.0") inline uint16_t word_from_hex_str(const std
 
 esphome::modbus_controller::ESPDEPRECATED ("Use modbus::helpers::dword_from_hex_str() instead. Removed in 2026.10.0", "2026.4.0") inline uint32_t dword_from_hex_str(const std
 
 esphome::modbus_controller::ESPDEPRECATED ("Use modbus::helpers::qword_from_hex_str() instead. Removed in 2026.10.0", "2026.4.0") inline uint64_t qword_from_hex_str(const std
 
template<typename T >
 esphome::modbus_controller::ESPDEPRECATED ("Use modbus::helpers::get_data() instead. Removed in 2026.10.0", "2026.4.0") T get_data(const std
 
template<typename T >
 esphome::modbus_controller::ESPDEPRECATED ("Use modbus::helpers::get_data() instead. Removed in 2027.2.0", "2026.8.0") T get_data(std
 
 esphome::modbus_controller::ESPDEPRECATED ("Use modbus::helpers::bit_from_packed() instead. Removed in 2027.2.0", "2026.4.0") inline bool coil_from_vector(int coil
 
 esphome::modbus_controller::ESPDEPRECATED ("Use modbus::helpers::bit_from_packed() instead. Removed in 2027.2.0", "2026.8.0") inline bool coil_from_vector(int coil
 
template<typename N >
 esphome::modbus_controller::ESPDEPRECATED ("Use modbus::helpers::mask_and_shift_by_rightbit() instead. Removed in 2026.10.0", "2026.4.0") N mask_and_shift_by_rightbit(N data
 
 esphome::modbus_controller::ESPDEPRECATED ("Use modbus::helpers::number_to_payload() instead. Removed in 2026.10.0", "2026.4.0") inline void number_to_payload(std
 
 esphome::modbus_controller::ESPDEPRECATED ("Use modbus::helpers::payload_to_number() instead. Removed in 2026.10.0", "2026.4.0") inline int64_t payload_to_number(const std
 
 esphome::modbus_controller::ESPDEPRECATED ("Use modbus::helpers::float_to_payload() instead. Removed in 2026.10.0", "2026.4.0") inline std
 
class ESPDEPRECATED("One-shot writes go through the entity write helpers (WriterDevice) or the modbus_client actions, and " "polling runs through PollingDevice. Removed in 2027.3.0", "2026.9.0") ModbusCommandItem bool esphome::modbus_controller::offline_retry_due (uint16_t update_counter, uint16_t module_offline_at, uint16_t offline_skip_updates)
 A single modbus command.
 
float esphome::modbus_controller::payload_to_float (std::span< const uint8_t > data, const SensorItem &item, uint8_t offset)
 Convert vector<uint8_t> response payload to float.
 
 esphome::modbus_controller::ESPDEPRECATED ("Pass the offset explicitly: payload_to_float(data, item, item.offset). Removed in 2027.2.0", "2026.8.0") inline float payload_to_float(std
 

Variables

const std::vector< uint8_t > & esphome::modbus_controller::data
 
uint32_t esphome::modbus_controller::mask