LSH-Core
Deterministic firmware core for Controllino-based Labo Smart Home nodes
 
Loading...
Searching...
No Matches
static_config.hpp
Go to the documentation of this file.
1
21#ifndef LSH_CORE_CONFIG_STATIC_CONFIG_HPP
22#define LSH_CORE_CONFIG_STATIC_CONFIG_HPP
23
24#include <stdint.h>
25
27
28namespace lsh::core::static_config
29{
30static constexpr uint8_t CLICK_SCAN_STATE_CHANGED = 0x01U;
31static constexpr uint8_t CLICK_SCAN_NETWORK_PENDING = 0x02U;
32
33// These declarations are implemented by the generated static profile selected
34// at build time. They form the narrow ABI between hand-written runtime code and
35// generated topology code: fixed code can ask for IDs, dispatch cold bridge
36// commands, or run hot generated scans without storing TOML topology in SRAM.
37[[nodiscard]] auto getActuatorId(uint8_t actuatorIndex) noexcept -> uint8_t;
38[[nodiscard]] auto getClickableId(uint8_t clickableIndex) noexcept -> uint8_t;
39[[nodiscard]] auto getActuatorIndexById(uint8_t actuatorId) noexcept -> uint8_t;
40[[nodiscard]] auto getClickableIndexById(uint8_t clickableId) noexcept -> uint8_t;
41[[nodiscard]] auto getAutoOffActuatorIndex(uint8_t autoOffIndex) noexcept -> uint8_t;
42[[nodiscard]] auto getAutoOffIndexByActuatorIndex(uint8_t actuatorIndex) noexcept -> uint8_t;
43[[nodiscard]] auto getAutoOffTimer(uint8_t actuatorIndex) noexcept -> uint32_t;
44[[nodiscard]] auto getIndicatorActuatorLinkCount(uint8_t indicatorIndex) noexcept -> uint8_t;
45[[nodiscard]] auto setActuatorStateById(uint8_t actuatorId, bool state) noexcept -> bool;
46[[nodiscard]] auto writeDetailsPayload() noexcept -> bool;
47[[nodiscard]] auto runShortClick(uint8_t clickableIndex) noexcept -> bool;
48[[nodiscard]] auto runLongClick(uint8_t clickableIndex) noexcept -> bool;
49[[nodiscard]] auto runSuperLongClick(uint8_t clickableIndex) noexcept -> bool;
50[[nodiscard]] auto runClick(uint8_t clickableIndex, constants::ClickType clickType) noexcept -> bool;
51[[nodiscard]] auto runNetworkClickFallback(uint8_t clickableIndex, constants::ClickType clickType) noexcept -> bool;
52[[nodiscard]] auto getNetworkClickSlotCount(uint8_t clickableIndex) noexcept -> uint8_t;
53[[nodiscard]] auto getNetworkClickSlotIndex(uint8_t clickableIndex, constants::ClickType clickType) noexcept -> uint8_t;
54[[nodiscard]] auto getNetworkClickClickableIndex(uint8_t slotIndex) noexcept -> uint8_t;
55[[nodiscard]] auto getNetworkClickType(uint8_t slotIndex) noexcept -> constants::ClickType;
56[[nodiscard]] auto isClickableConfigurationValid(uint8_t clickableIndex) noexcept -> bool;
57[[nodiscard]] auto scanClickables(uint16_t elapsed_ms) noexcept -> uint8_t;
58[[nodiscard]] auto turnOffAllActuators() noexcept -> bool;
59[[nodiscard]] auto turnOffUnprotectedActuators() noexcept -> bool;
60[[nodiscard]] auto checkPulseTimers(uint16_t elapsed_ms) noexcept -> bool;
61[[nodiscard]] auto checkAutoOffTimers(uint32_t now_ms) noexcept -> bool;
62[[nodiscard]] auto applyPackedActuatorStateByte(uint8_t byteIndex, uint8_t packedByte) noexcept -> bool;
63[[nodiscard]] auto computeIndicatorState(uint8_t indicatorIndex) noexcept -> bool;
64void refreshIndicators() noexcept;
65} // namespace lsh::core::static_config
66
67#endif // LSH_CORE_CONFIG_STATIC_CONFIG_HPP
Defines enums for various click types and fallback behaviors.
Namespace that groups compile-time constants.
Definition config.hpp:33