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...
|
| | ControllerDevice ()=default |
| |
| | ControllerDevice (ModbusController *controller) |
| |
| void | on_response (std::span< const uint8_t > request_pdu, std::span< const uint8_t > response_pdu) override |
| |
| void | on_error (std::span< const uint8_t > request_pdu, modbus::ExceptionCode exception_code) override |
| |
| void | on_sent (std::span< const uint8_t > request_pdu) override |
| |
| void | on_not_sent (std::span< const uint8_t > request_pdu) override |
| |
| bool | on_no_response (std::span< const uint8_t > request_pdu) override |
| |
| void | notify_online_ (std::span< const uint8_t > request_pdu) |
| |
| | ModbusClientDevice ()=default |
| |
| | ModbusClientDevice (ModbusClientHub *parent, uint8_t address) |
| |
| virtual | ~ModbusClientDevice () |
| |
| | ModbusClientDevice (const ModbusClientDevice &)=delete |
| |
| ModbusClientDevice & | operator= (const ModbusClientDevice &)=delete |
| |
| | ModbusClientDevice (ModbusClientDevice &&)=delete |
| |
| ModbusClientDevice & | operator= (ModbusClientDevice &&)=delete |
| |
| void | set_parent (ModbusClientHub *parent) |
| |
| void | set_address (uint8_t address) |
| |
| | ESPDEPRECATED ("Override on_not_sent() instead. Removed in 2027.2.0", "2026.8.0") virtual void on_modbus_not_sent() |
| |
| | ESPDEPRECATED ("Override on_no_response() instead. Removed in 2027.2.0", "2026.8.0") virtual bool on_modbus_no_response() |
| |
| virtual void | on_read_registers (EntityType entity_type, uint16_t start_address, std::span< const uint16_t > registers, ResponseStatus status) |
| | High-level typed response callbacks, fired by the default on_response()/on_error() with arguments parsed from the request and response PDUs.
|
| |
| virtual void | on_read_holding_registers (uint16_t start_address, std::span< const uint16_t > registers, ResponseStatus status) |
| |
| virtual void | on_read_input_registers (uint16_t start_address, std::span< const uint16_t > registers, ResponseStatus status) |
| |
| virtual void | on_read_bits (EntityType entity_type, uint16_t start_address, PackedBits bits, ResponseStatus status) |
| | Coil/discrete-input reads are delivered as a PackedBits view (bit 0 = the bit at start_address, bits.size() = the count requested).
|
| |
| virtual void | on_read_coils (uint16_t start_address, PackedBits bits, ResponseStatus status) |
| |
| virtual void | on_read_discrete_inputs (uint16_t start_address, PackedBits bits, ResponseStatus status) |
| |
| virtual void | on_write_single_register (uint16_t address, uint16_t value, ResponseStatus status) |
| | Write acknowledgements.
|
| |
| virtual void | on_write_single_coil (uint16_t address, bool value, ResponseStatus status) |
| |
| virtual void | on_write_multiple_registers (uint16_t start_address, std::span< const uint16_t > registers, ResponseStatus status) |
| |
| virtual void | on_write_multiple_coils (uint16_t start_address, PackedBits bits, ResponseStatus status) |
| |
| virtual void | on_custom_response (std::span< const uint8_t > request_pdu, std::span< const uint8_t > response_pdu, ResponseStatus status) |
| | Catch-all for custom function codes and anything that is not a standard-conformant transaction (see dispatch_response_()); on failure the response is empty and the exception code is in status.
|
| |
| | ESPDEPRECATED ("Use the typed read_*/write_* helpers or queue_pdu() instead. Removed in 2027.2.0", "2026.8.0") void send(uint8_t function |
| |
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.
The hub base is inherited protected, so a subclass chooses exactly what request API it exposes.
Definition at line 266 of file modbus_controller.h.