3-phase PV router
Loading...
Searching...
No Matches
RelayEngine< N, D > Class Template Reference

The relays, as in config.h: the sliding average and the settings of each relay. More...

#include <config_types.h>

Inheritance diagram for RelayEngine< N, D >:
Collaboration diagram for RelayEngine< N, D >:

Public Member Functions

constexpr RelayEngine (const RelaySetting(&ref)[N])
 The relays, with the default sliding average.
 
template<uint16_t V>
constexpr RelayEngine (integral_constant< uint16_t, V >, const RelaySetting(&ref)[N])
 The relays, with a sliding average given with MINUTES().
 
constexpr RelayEngine (integral_constant< uint8_t, D >, const RelaySetting(&ref)[N])
 The relays, with a sliding average given as an integral_constant< uint8_t >.
 
constexpr const RelaySetting & get_relay (const uint8_t idx) const
 The settings of relay idx.
 
constexpr uint8_t size () const
 Number of relays.
 

Static Public Member Functions

static constexpr uint8_t filterDelay ()
 Duration of the sliding average, in minutes: D, the one the relay engine uses.
 

Private Member Functions

template<uint8_t... I>
constexpr RelayEngine (const RelaySetting(&ref)[N], index_sequence< I... >)
 

Private Attributes

const RelaySetting relay_ [N]
 

Detailed Description

template<uint8_t N, uint8_t D = 10>
class RelayEngine< N, D >

The relays, as in config.h: the sliding average and the settings of each relay.

RelayDiverter (utils_relay.h) is the engine built from them.

Template Parameters
NNumber of relays.
DDuration of the sliding average, in minutes (RELAY_FILTER_DELAY).

Definition at line 647 of file config_types.h.

Constructor & Destructor Documentation

◆ RelayEngine() [1/4]

template<uint8_t N, uint8_t D = 10>
RelayEngine< N, D >::RelayEngine ( const RelaySetting(&) ref[N])
inlineexplicitconstexpr

The relays, with the default sliding average.

Definition at line 651 of file config_types.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RelayEngine() [2/4]

template<uint8_t N, uint8_t D = 10>
RelayEngine< N, D >::RelayEngine ( integral_constant< uint8_t, D > ,
const RelaySetting(&) ref[N] )
inlineconstexpr

The relays, with a sliding average given as an integral_constant< uint8_t >.

Definition at line 657 of file config_types.h.

Here is the call graph for this function:

◆ RelayEngine() [3/4]

template<uint8_t N, uint8_t D = 10>
template<uint16_t V>
RelayEngine< N, D >::RelayEngine ( integral_constant< uint16_t, V > ,
const RelaySetting(&) ref[N] )
inlineconstexpr

The relays, with a sliding average given with MINUTES().

Definition at line 664 of file config_types.h.

Here is the call graph for this function:

◆ RelayEngine() [4/4]

template<uint8_t N, uint8_t D = 10>
template<uint8_t... I>
RelayEngine< N, D >::RelayEngine ( const RelaySetting(&) ref[N],
index_sequence< I... >  )
inlineconstexprprivate

Definition at line 691 of file config_types.h.

Member Function Documentation

◆ filterDelay()

template<uint8_t N, uint8_t D = 10>
static constexpr uint8_t RelayEngine< N, D >::filterDelay ( )
inlinestaticconstexpr

Duration of the sliding average, in minutes: D, the one the relay engine uses.

Definition at line 678 of file config_types.h.

◆ get_relay()

template<uint8_t N, uint8_t D = 10>
const RelaySetting & RelayEngine< N, D >::get_relay ( const uint8_t idx) const
inlineconstexpr

The settings of relay idx.

Definition at line 684 of file config_types.h.

◆ size()

template<uint8_t N, uint8_t D = 10>
uint8_t RelayEngine< N, D >::size ( ) const
inlineconstexpr

Number of relays.

Definition at line 672 of file config_types.h.

Member Data Documentation

◆ relay_

template<uint8_t N, uint8_t D = 10>
const RelaySetting RelayEngine< N, D >::relay_[N]
private

the settings of each relay

Definition at line 696 of file config_types.h.


The documentation for this class was generated from the following file: