|
ESPHome 2026.10.0-dev
|
Gives a writer entity the write API of the WriterDevice it owns. More...
#include <modbus_controller.h>
Public Member Functions | |
| bool | dispatched () const |
| Whether the lambda called a request helper since the last clear_dispatched_(). | |
| bool | write_single_register (uint16_t address, uint16_t value) |
| bool | write_single_coil (uint16_t address, bool value) |
| bool | write_multiple_registers (uint16_t address, std::span< const uint16_t > values) |
| bool | write_multiple_coils (uint16_t address, std::span< const bool > values) |
| bool | write_multiple_coils (uint16_t address, modbus::PackedBits bits) |
| bool | queue_pdu (std::span< const uint8_t > pdu, modbus::CommandOptions options={}) |
| void | clear_tx_queue_for_device () |
Protected Member Functions | |
| bool | send_raw_frame_deprecated_ (std::span< const uint8_t > frame) |
| void | set_controller_ (ModbusController *controller) |
| void | clear_dispatched_ () |
| void | warn_write_buffer_deprecated_ (const LogString *platform, uint16_t address) |
Gives a writer entity the write API of the WriterDevice it owns.
The device is a member, not a base: the mixin declares no virtual function, so an entity mixing it in gains no second vtable and all the writer platforms share the single WriterDevice vtable instead of each emitting its own copy. The forwarders keep item->write_*() working unchanged inside a write_lambda, and record every dispatch, so the write path can tell "the lambda sent it itself" from "use the default write".
Definition at line 324 of file modbus_controller.h.
|
inlineprotected |
Definition at line 361 of file modbus_controller.h.
|
inline |
Definition at line 353 of file modbus_controller.h.
|
inline |
Whether the lambda called a request helper since the last clear_dispatched_().
Deliberately records the call, not the hub's accept/refuse: a refused lambda write must not fall through to the default write.
Definition at line 328 of file modbus_controller.h.
|
inline |
Definition at line 349 of file modbus_controller.h.
|
inlineprotected |
Definition at line 356 of file modbus_controller.h.
|
inlineprotected |
Definition at line 360 of file modbus_controller.h.
|
inlineprotected |
Definition at line 362 of file modbus_controller.h.
|
inline |
Definition at line 345 of file modbus_controller.h.
|
inline |
Definition at line 341 of file modbus_controller.h.
|
inline |
Definition at line 337 of file modbus_controller.h.
|
inline |
Definition at line 333 of file modbus_controller.h.
|
inline |
Definition at line 329 of file modbus_controller.h.