|
ESPHome 2026.11.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_(). | |
| void | set_write_options (modbus::CommandOptions options) |
| 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) |
| 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 257 of file modbus_controller.h.
|
inlineprotected |
Definition at line 296 of file modbus_controller.h.
|
inline |
Definition at line 288 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 261 of file modbus_controller.h.
|
inline |
Definition at line 283 of file modbus_controller.h.
|
inline |
Definition at line 284 of file modbus_controller.h.
|
inlineprotected |
Definition at line 291 of file modbus_controller.h.
|
inlineprotected |
Definition at line 295 of file modbus_controller.h.
|
inline |
Definition at line 262 of file modbus_controller.h.
|
inlineprotected |
Definition at line 297 of file modbus_controller.h.
|
inline |
Definition at line 279 of file modbus_controller.h.
|
inline |
Definition at line 275 of file modbus_controller.h.
|
inline |
Definition at line 271 of file modbus_controller.h.
|
inline |
Definition at line 267 of file modbus_controller.h.
|
inline |
Definition at line 263 of file modbus_controller.h.