|
3-phase PV router
|
Manages a collection of relays and their behavior based on surplus and import thresholds. More...
#include <utils_relay.h>


Public Member Functions | |
| constexpr | RelayDiverter (const RelayEngine< N, D > &relays) |
| The relays of config.h. | |
| constexpr | RelayDiverter (const relayOutput(&ref)[N]) |
| Construct a list of relays. | |
| template<uint16_t V> | |
| constexpr | RelayDiverter (integral_constant< uint16_t, V >, const relayOutput(&ref)[N]) |
| Construct a list of relays with a custom sliding average, given with MINUTES(). | |
| constexpr | RelayDiverter (integral_constant< uint8_t, D >, const relayOutput(&ref)[N]) |
| Construct a list of relays with a custom sliding average. | |
| void | printRelayEngineConfiguration () const |
| Print the configuration of each relay. | |
Public Member Functions inherited from RelayLogic::Engine< relayOutput, N, 10 > | |
| constexpr | Engine (const relayOutput(&ref)[N]) |
| Construct a list of relays. | |
| constexpr const auto & | get_relay (uint8_t idx) const |
| Get the relay object. | |
| void | inc_duration () const |
| Increment the duration's state of each relay. | |
| void | proceed_relays (const uint16_t overrideBitmask, const bool diversionEnabled=true) const |
| Proceed all relays: OFF in decreasing order, ON in increasing order. | |
| constexpr auto | size () const |
| Get the number of relays. | |
Private Types | |
| using | Base = RelayLogic::Engine< relayOutput, N, D > |
Private Member Functions | |
| template<uint8_t... I> | |
| constexpr | RelayDiverter (const RelayEngine< N, D > &relays, index_sequence< I... >) |
Additional Inherited Members | |
Static Public Member Functions inherited from RelayLogic::Engine< relayOutput, N, 10 > | |
| static auto | get_average () |
| Get the current average. | |
| static void | update_average (int16_t currentPower) |
| Update the sliding average. | |
Protected Attributes inherited from RelayLogic::Engine< relayOutput, N, 10 > | |
| const relayOutput | relay [N] |
Manages a collection of relays and their behavior based on surplus and import thresholds.
The decisions are those of RelayLogic::Engine (relay_engine.h), on relays that drive their pins (relayOutput). Here, the constructors, which check the sliding average duration, and the printing of the configuration. config_derived.h builds it from the RelayEngine of config.h.
| N | The number of relays to be managed. |
| D | The duration in minutes for the sliding average (default is 10 minutes). |
Definition at line 111 of file utils_relay.h.
|
private |
Definition at line 113 of file utils_relay.h.
|
inlineexplicitconstexpr |
Construct a list of relays.
Definition at line 120 of file utils_relay.h.

|
inlineconstexpr |
Construct a list of relays with a custom sliding average.
The first argument, an unnamed integral_constant, only carries the sliding average duration D in its type.
| ref | Array of relay configurations. |
Definition at line 133 of file utils_relay.h.
|
inlineconstexpr |
Construct a list of relays with a custom sliding average, given with MINUTES().
| V | the sliding average duration in minutes: D, once checked to fit 8 bits |
| ref | Array of relay configurations. |
Definition at line 145 of file utils_relay.h.
|
inlineexplicitconstexpr |
The relays of config.h.
| relays | The relays, as in config.h. |
Definition at line 157 of file utils_relay.h.

|
inlineconstexprprivate |
Definition at line 182 of file utils_relay.h.
|
inline |
Print the configuration of each relay.
This method outputs the configuration of all relays, including their pin assignments, thresholds, and minimum ON/OFF durations, to the Serial interface.
Definition at line 168 of file utils_relay.h.
