ESPHome 2026.8.0b4
Loading...
Searching...
No Matches
esphome::modbus::ModbusDeviceCommand Struct Reference

#include <modbus.h>

Public Member Functions

 ModbusDeviceCommand (ModbusClientDevice *device, uint8_t address, std::span< const uint8_t > pdu, bool continuous=false, uint16_t seq=0)
 
CommandPriority priority () const
 
uint8_t max_pending () const
 
void silent_retire ()
 
void complete_broadcast ()
 
void requeue (uint16_t seq)
 
void make_continuous (bool continuous)
 
void retire ()
 
bool waiting_state () const
 
bool decrement_pending ()
 
bool increment_pending ()
 
bool sent ()
 
bool response (std::span< const uint8_t > response_pdu)
 
bool error (ExceptionCode exception_code)
 
bool interrupt ()
 
bool timed_out ()
 
bool notify_retired ()
 
bool same_frame (uint8_t address, std::span< const uint8_t > pdu) const
 True if this command carries the same wire frame (address + PDU) as the given one.
 

Static Public Member Functions

static CommandPriority classify (uint8_t function_code)
 

Data Fields

ModbusClientDevicedevice
 
ModbusFrame frame
 
FrameState state {FrameState::READY}
 
bool continuous {false}
 
uint8_t pending {1}
 
uint16_t seq {0}
 

Detailed Description

Definition at line 126 of file modbus.h.

Constructor & Destructor Documentation

◆ ModbusDeviceCommand()

esphome::modbus::ModbusDeviceCommand::ModbusDeviceCommand ( ModbusClientDevice * device,
uint8_t address,
std::span< const uint8_t > pdu,
bool continuous = false,
uint16_t seq = 0 )
inline

Definition at line 139 of file modbus.h.

Member Function Documentation

◆ classify()

static CommandPriority esphome::modbus::ModbusDeviceCommand::classify ( uint8_t function_code)
inlinestatic

Definition at line 151 of file modbus.h.

◆ complete_broadcast()

void esphome::modbus::ModbusDeviceCommand::complete_broadcast ( )
inline

Definition at line 179 of file modbus.h.

◆ decrement_pending()

bool esphome::modbus::ModbusDeviceCommand::decrement_pending ( )
inline

Definition at line 230 of file modbus.h.

◆ error()

bool esphome::modbus::ModbusDeviceCommand::error ( ExceptionCode exception_code)

Definition at line 946 of file modbus.cpp.

◆ increment_pending()

bool esphome::modbus::ModbusDeviceCommand::increment_pending ( )
inline

Definition at line 238 of file modbus.h.

◆ interrupt()

bool esphome::modbus::ModbusDeviceCommand::interrupt ( )

Definition at line 956 of file modbus.cpp.

◆ make_continuous()

void esphome::modbus::ModbusDeviceCommand::make_continuous ( bool continuous)
inline

Definition at line 197 of file modbus.h.

◆ max_pending()

uint8_t esphome::modbus::ModbusDeviceCommand::max_pending ( ) const
inline

Definition at line 161 of file modbus.h.

◆ notify_retired()

bool esphome::modbus::ModbusDeviceCommand::notify_retired ( )

Definition at line 927 of file modbus.cpp.

◆ priority()

CommandPriority esphome::modbus::ModbusDeviceCommand::priority ( ) const
inline

Definition at line 147 of file modbus.h.

◆ requeue()

void esphome::modbus::ModbusDeviceCommand::requeue ( uint16_t seq)
inline

Definition at line 184 of file modbus.h.

◆ response()

bool esphome::modbus::ModbusDeviceCommand::response ( std::span< const uint8_t > response_pdu)

Definition at line 935 of file modbus.cpp.

◆ retire()

void esphome::modbus::ModbusDeviceCommand::retire ( )
inline

Definition at line 213 of file modbus.h.

◆ same_frame()

bool esphome::modbus::ModbusDeviceCommand::same_frame ( uint8_t address,
std::span< const uint8_t > pdu ) const
inline

True if this command carries the same wire frame (address + PDU) as the given one.

Definition at line 256 of file modbus.h.

◆ sent()

bool esphome::modbus::ModbusDeviceCommand::sent ( )

Definition at line 918 of file modbus.cpp.

◆ silent_retire()

void esphome::modbus::ModbusDeviceCommand::silent_retire ( )
inline

Definition at line 168 of file modbus.h.

◆ timed_out()

bool esphome::modbus::ModbusDeviceCommand::timed_out ( )

Definition at line 970 of file modbus.cpp.

◆ waiting_state()

bool esphome::modbus::ModbusDeviceCommand::waiting_state ( ) const
inline

Definition at line 225 of file modbus.h.

Field Documentation

◆ continuous

bool esphome::modbus::ModbusDeviceCommand::continuous {false}

Definition at line 131 of file modbus.h.

◆ device

ModbusClientDevice* esphome::modbus::ModbusDeviceCommand::device

Definition at line 127 of file modbus.h.

◆ frame

ModbusFrame esphome::modbus::ModbusDeviceCommand::frame

Definition at line 128 of file modbus.h.

◆ pending

uint8_t esphome::modbus::ModbusDeviceCommand::pending {1}

Definition at line 133 of file modbus.h.

◆ seq

uint16_t esphome::modbus::ModbusDeviceCommand::seq {0}

Definition at line 136 of file modbus.h.

◆ state

FrameState esphome::modbus::ModbusDeviceCommand::state {FrameState::READY}

Definition at line 129 of file modbus.h.


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