|
ESPHome 2026.9.0-dev
|
Mutable counterpart of PackedBits: set() writes bits in place (deliberately no proxy operator[]=). More...
#include <modbus_definitions.h>
Public Member Functions | |
| MutablePackedBits (std::span< uint8_t > data, uint16_t count) | |
| bool | operator[] (size_t bit) const |
| void | set (size_t bit, bool value) |
| Set or clear the given bit. | |
| uint16_t | size () const |
| operator PackedBits () const | |
Mutable counterpart of PackedBits: set() writes bits in place (deliberately no proxy operator[]=).
Converts implicitly to PackedBits for read access.
Definition at line 177 of file modbus_definitions.h.
|
inline |
Definition at line 179 of file modbus_definitions.h.
|
inline |
Definition at line 193 of file modbus_definitions.h.
|
inline |
Definition at line 180 of file modbus_definitions.h.
|
inline |
Set or clear the given bit.
Out-of-range bits are dropped: on the server read path the span wraps a stack response buffer, so a handler looping past size() must not be able to smash the frame.
Definition at line 183 of file modbus_definitions.h.
|
inline |
Definition at line 192 of file modbus_definitions.h.