|
LSH-Core
A robust C++ framework for Arduino-based home automation nodes
|
Forward declaration. More...
Functions | |
| void | addActuator (Actuator *const actuator) |
| Adds an actuator to the system. | |
| 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 | actuatorExists (uint8_t actuatorId) -> bool |
| Get if the actuator actually exists. | |
| auto | actuatorsAutoOffTimersCheck () -> bool |
| Performs an auto-off timers check for actuators. | |
| auto | turnOffAllActuators () -> bool |
| Turns off all actuators. | |
| auto | turnOffUnprotectedActuators () -> bool |
| Turns off all unprotected actuators. | |
| auto | setAllActuatorsState (const etl::array< bool, CONFIG_MAX_ACTUATORS > &states) -> bool |
| Set the state for all actuators. | |
| void | finalizeSetup () |
| Populates actuatorsWithAutoOffIndexes. | |
Variables | |
| uint8_t | totalActuators = 0U |
| Device real total Actuators. | |
| etl::array< Actuator *, CONFIG_MAX_ACTUATORS > | actuators {} |
| All device actuators (like relays) | |
| etl::map< uint8_t, uint8_t, CONFIG_MAX_ACTUATORS > | actuatorsMap {} |
| Device actuators map (UUID -> actuator index) | |
| etl::vector< uint8_t, CONFIG_MAX_ACTUATORS > | actuatorsWithAutoOffIndexes {} |
| Indexes of actuators with auto off functionality active. | |
Forward declaration.
Globally stores all actuators (relays) and to operates over them.
| auto Actuators::actuatorExists | ( | uint8_t | actuatorId | ) | -> bool |
Get if the actuator actually exists.
| actuatorId | Unique ID of the actuator. |

| auto Actuators::actuatorsAutoOffTimersCheck | ( | ) | -> bool |
Performs an auto-off timers check for actuators.


| void Actuators::addActuator | ( | Actuator *const | actuator | ) |
Adds an actuator to the system.
The actuator is stored in the main array and its ID is mapped to its index for fast lookups. If the maximum number of actuators is exceeded, the device will reset to prevent undefined behavior.
| actuator | A pointer to the Actuator object to add. |

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

| auto Actuators::setAllActuatorsState | ( | const etl::array< bool, CONFIG_MAX_ACTUATORS > & | states | ) | -> bool |
Set the state for all actuators.
| states | An array of boolean states to be set. The size must match the number of actuators. |
| auto Actuators::turnOffAllActuators | ( | ) | -> bool |
Turns off all actuators.
| auto Actuators::turnOffUnprotectedActuators | ( | ) | -> bool |
Turns off all unprotected actuators.

| etl::map< uint8_t, uint8_t, CONFIG_MAX_ACTUATORS > Actuators::actuatorsMap {} |
Device actuators map (UUID -> actuator index)
Device actuators map (UUID (integer) -> actuator index)