|
ESPHome 2026.8.0b4
|
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 173 of file modbus_definitions.h.
|
inline |
Definition at line 175 of file modbus_definitions.h.
|
inline |
Definition at line 189 of file modbus_definitions.h.
|
inline |
Definition at line 176 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 179 of file modbus_definitions.h.
|
inline |
Definition at line 188 of file modbus_definitions.h.