LSH-Core
Deterministic firmware core for Controllino-based Labo Smart Home nodes
 
Loading...
Searching...
No Matches
actuator_manager.cpp File Reference

Implements the logic for managing and operating on all system Actuators. More...

Include dependency graph for actuator_manager.cpp:

Namespaces

namespace  Actuators
 Globally stores all actuators (relays) and to operates over them.
 

Functions

auto Actuators::getId (uint8_t actuatorIndex) -> uint8_t
 Return the static wire ID for one registered actuator index.
 
auto Actuators::getIndex (uint8_t actuatorId) -> uint8_t
 Get a single actuator index (in device vector of actuators).
 
auto Actuators::tryGetIndex (uint8_t actuatorId, uint8_t &actuatorIndex) -> bool
 Resolves an actuator ID to its dense runtime index with a single map lookup.
 
auto Actuators::actuatorExists (uint8_t actuatorId) -> bool
 Get if the actuator actually exists.
 
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.
 
void Actuators::updatePackedState (uint8_t actuatorIndex, bool state)
 Keep the compact actuator-state shadow aligned with one runtime state change.
 
auto Actuators::getPackedStateByteCount () -> uint8_t
 Return the number of packed bytes required by the current topology.
 
auto Actuators::getPackedStateByte (uint8_t byteIndex) -> uint8_t
 Return one packed state byte in protocol wire order.
 
void Actuators::finalizeSetup ()
 Final validation after actuator registration.
 

Variables

PackedActuatorStateBytes Actuators::packedActuatorStates {}
 Canonical packed actuator-state shadow kept in sync with Actuator::setState().
 

Detailed Description

Implements the logic for managing and operating on all system Actuators.

Author
Jacopo Labardi (labodj)

Copyright 2026 Jacopo Labardi

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.