Compile-time validations.
More...
Go to the source code of this file.
|
| constexpr bool | check_boost_windows () |
| | Every scheduled boost lies within the off-peak period and lasts: otherwise, it never runs (LAST(HOURS(9)) with 8 hours, FOR(MINUTES(0))), or the meter cuts it short (FIRST(HOURS(10)) with 8 hours).
|
| |
| constexpr bool | check_load_priorities () |
| |
| constexpr bool | check_override_remote_targets () |
| | Each REMOTE_LOAD(n) target of an override pin must be an existing remote load.
|
| |
| constexpr bool | check_override_targets () |
| | Each override pin may only force local loads and relays.
|
| |
| constexpr PinCheck | check_pins () |
| |
| constexpr bool | check_relay_minimum_times () |
| | Each relay's minimum ON and OFF times fit in 16 bits of seconds: 1092 minutes at most.
|
| |
| constexpr uint16_t | check_relay_pins () |
| |
| constexpr bool | claimPin (uint32_t &used, const uint8_t pin) |
| | Marks pin as used in used.
|
| |
| template<typename List> |
| constexpr bool | targetsAreOutputs (const List &list) |
| | Overrides and boosts reach the outputs through the load states and the relay engine only, so each entry of list may only force local loads and relays.
|
| |
| template<typename List> |
| constexpr bool | targetsAreRemoteLoads (const List &list) |
| | Each REMOTE_LOAD(n) target of an entry of list must be an existing remote load.
|
| |
Compile-time validations.
- Author
- Frédéric Metrich (frede.nosp@m.ric..nosp@m.metri.nosp@m.ch@l.nosp@m.ive.f.nosp@m.r)
- Version
- 0.1
- Date
- 2026-11-26
- Copyright
- Copyright (c) 2023-2026 SPDX-License-Identifier: GPL-3.0-or-later
Definition in file validation.h.
◆ check_boost_windows()
| bool check_boost_windows |
( |
| ) |
|
|
constexpr |
Every scheduled boost lies within the off-peak period and lasts: otherwise, it never runs (LAST(HOURS(9)) with 8 hours, FOR(MINUTES(0))), or the meter cuts it short (FIRST(HOURS(10)) with 8 hours).
- Note
- All these checks are done by the compiler. It does not take ANY space in the Arduino.
DO NOT EDIT THIS FILE
Definition at line 57 of file validation.h.
◆ check_load_priorities()
| bool check_load_priorities |
( |
| ) |
|
|
constexpr |
◆ check_override_remote_targets()
| bool check_override_remote_targets |
( |
| ) |
|
|
constexpr |
◆ check_override_targets()
| bool check_override_targets |
( |
| ) |
|
|
constexpr |
Each override pin may only force local loads and relays.
Definition at line 303 of file validation.h.
◆ check_pins()
◆ check_relay_minimum_times()
| bool check_relay_minimum_times |
( |
| ) |
|
|
constexpr |
Each relay's minimum ON and OFF times fit in 16 bits of seconds: 1092 minutes at most.
Definition at line 348 of file validation.h.
◆ check_relay_pins()
| uint16_t check_relay_pins |
( |
| ) |
|
|
constexpr |
◆ claimPin()
| bool claimPin |
( |
uint32_t & | used, |
|
|
const uint8_t | pin ) |
|
constexpr |
Marks pin as used in used.
- Returns
- false if it was already used. A pin from 32 on (not a pin of an ATmega328P) sets bit 31, which the range check below refuses, as it does every pin from 14 on.
Definition at line 117 of file validation.h.
◆ targetsAreOutputs()
template<typename List>
| bool targetsAreOutputs |
( |
const List & | list | ) |
|
|
constexpr |
Overrides and boosts reach the outputs through the load states and the relay engine only, so each entry of list may only force local loads and relays.
- Template Parameters
-
Definition at line 246 of file validation.h.
◆ targetsAreRemoteLoads()
template<typename List>
| bool targetsAreRemoteLoads |
( |
const List & | list | ) |
|
|
constexpr |