Globally stores all actuators (relays) and to operates over them. More...
Typedefs | |
| using | PackedActuatorStateBytes = etl::array< uint8_t, CONFIG_PACKED_ACTUATOR_STATE_STORAGE_CAPACITY > |
| Compact shadow of the full actuator runtime state in protocol bit order. | |
Functions | |
| auto | getId (uint8_t actuatorIndex) -> uint8_t |
| Return the static wire ID for one registered actuator index. | |
| auto | getActuator (uint8_t actuatorId) -> Actuator * |
| Get a single actuator. | |
| auto | getIndex (uint8_t actuatorId) -> uint8_t |
| Get a single actuator index (in device vector of actuators). | |
| auto | tryGetIndex (uint8_t actuatorId, uint8_t &actuatorIndex) -> bool |
| Resolves an actuator ID to its dense runtime index with a single map lookup. | |
| auto | actuatorExists (uint8_t actuatorId) -> bool |
| Get if the actuator actually exists. | |
| void | recordSwitchTime (uint8_t actuatorIndex, uint32_t now_ms) |
| Records the latest switch time for an actuator when compact actuator timer storage is enabled. | |
| void | updatePackedState (uint8_t actuatorIndex, bool state) |
| Keep the compact actuator-state shadow aligned with one runtime state change. | |
| auto | getPackedStateByteCount () -> uint8_t |
| Return the number of packed bytes required by the current topology. | |
| auto | getPackedStateByte (uint8_t byteIndex) -> uint8_t |
| Return one packed state byte in protocol wire order. | |
| void | finalizeSetup () |
| Final validation after actuator registration. | |
| template<uint8_t ActuatorIndex> | |
| __attribute__ ((always_inline)) inline void updatePackedStateStatic(bool state) | |
| Keep the packed actuator-state shadow aligned using a generated index. | |
Variables | |
| PackedActuatorStateBytes | packedActuatorStates {} |
Canonical packed actuator-state shadow kept in sync with Actuator::setState(). | |
Globally stores all actuators (relays) and to operates over them.
| using Actuators::PackedActuatorStateBytes = typedef etl::array<uint8_t, CONFIG_PACKED_ACTUATOR_STATE_STORAGE_CAPACITY> |
Compact shadow of the full actuator runtime state in protocol bit order.
Bit 0 maps to actuator index 0, bit 1 to actuator index 1, and so on. The serializer can therefore emit ACTUATORS_STATE directly from this cached representation without rescanning every actuator object.
| Actuators::__attribute__ | ( | (always_inline) | ) |
Keep the packed actuator-state shadow aligned using a generated index.
Generated profiles already know the dense actuator index at compile time. Keeping this tiny helper in the header lets AVR-GCC fold the byte index and bit mask instead of paying a runtime shift/mask path for every static actuator transition.
| ActuatorIndex | Dense runtime actuator index from the static profile. |
| state | new actuator state. |
| auto Actuators::actuatorExists | ( | uint8_t | actuatorId | ) | -> bool |
Get if the actuator actually exists.
| actuatorId | Unique ID of the actuator. |

| auto Actuators::getActuator | ( | uint8_t | actuatorId | ) | -> Actuator * |
Get a single actuator.
| actuatorId | actuator UUID. |

| auto Actuators::getId | ( | uint8_t | actuatorIndex | ) | -> uint8_t |
Return the static wire ID for one registered actuator index.
| actuatorIndex | dense runtime actuator index. |

| auto Actuators::getIndex | ( | uint8_t | actuatorId | ) | -> uint8_t |
Get a single actuator index (in device vector of actuators).
| actuatorId | actuator UUID. |


| auto Actuators::getPackedStateByte | ( | uint8_t | byteIndex | ) | -> uint8_t |
Return one packed state byte in protocol wire order.
Return one packed actuator-state byte in protocol wire order.
| byteIndex | packed byte index. |
| byteIndex | packed byte index. |
byteIndex is out of range. | auto Actuators::getPackedStateByteCount | ( | ) | -> uint8_t |
Return the number of packed bytes required by the current topology.
Return the number of packed bytes required by the active actuator topology.
ACTUATORS_STATE payload. | void Actuators::recordSwitchTime | ( | uint8_t | actuatorIndex, |
| uint32_t | now_ms | ||
| ) |
Records the latest switch time for an actuator when compact actuator timer storage is enabled.
| actuatorIndex | dense runtime actuator index. |
| now_ms | cached switch timestamp. |
| auto Actuators::tryGetIndex | ( | uint8_t | actuatorId, |
| uint8_t & | actuatorIndex | ||
| ) | -> bool |
Resolves an actuator ID to its dense runtime index with a single map lookup.
| actuatorId | Actuator UUID. |
| actuatorIndex | Output runtime index when the ID exists. |

| void Actuators::updatePackedState | ( | uint8_t | actuatorIndex, |
| bool | state | ||
| ) |
Keep the compact actuator-state shadow aligned with one runtime state change.
| actuatorIndex | dense runtime actuator index. |
| state | new actuator state. |
| PackedActuatorStateBytes Actuators::packedActuatorStates {} |
Canonical packed actuator-state shadow kept in sync with Actuator::setState().
Canonical packed actuator-state shadow kept aligned with runtime changes.
The bridge serializer consumes this compact representation directly, so actuator state reporting no longer has to rebuild protocol bytes by rescanning every actuator object.