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

The rotation groups, as in config.h: the loads that take turns at the top of the priority list, one group per appliance (the elements of a 3-phase water heater). More...

#include <config_types.h>

Inheritance diagram for RotationGroups< N, MaxPins >:
Collaboration diagram for RotationGroups< N, MaxPins >:

Classes

struct  Ten
 

Public Member Functions

constexpr RotationGroups (const PinList< MaxPins > &g0, const PinList< MaxPins > &g1={}, const PinList< MaxPins > &g2={}, const PinList< MaxPins > &g3={}, const PinList< MaxPins > &g4={}, const PinList< MaxPins > &g5={}, const PinList< MaxPins > &g6={}, const PinList< MaxPins > &g7={}, const PinList< MaxPins > &g8={}, const PinList< MaxPins > &g9={})
 The groups, one list of targets each.
 
constexpr const PinList< MaxPins > & getGroup (const uint8_t index) const
 The targets of group index, as codes.
 
constexpr uint8_t size () const
 Number of groups.
 

Private Member Functions

template<uint8_t... I>
constexpr RotationGroups (const Ten &ten, index_sequence< I... >)
 

Private Attributes

const PinList< MaxPins > groups_ [N]
 

Detailed Description

template<uint8_t N, uint8_t MaxPins = 16>
class RotationGroups< N, MaxPins >

The rotation groups, as in config.h: the loads that take turns at the top of the priority list, one group per appliance (the elements of a 3-phase water heater).

Each group is a list of target codes, as for the override pins: LOAD(n), LOCAL_LOAD(n), REMOTE_LOAD(n), ALL_LOCAL_LOADS()... The codes stay codes here; Rotation::Table (rotation_groups.h) holds the priority places each group rotates in. One constructor takes up to 10 groups: each group needs at least 2 loads, and the router drives at most 12 local and 8 remote loads, so no valid config needs more.

Template Parameters
NNumber of groups.
MaxPinsMaximum number of targets per group.

Definition at line 537 of file config_types.h.

Constructor & Destructor Documentation

◆ RotationGroups() [1/2]

template<uint8_t N, uint8_t MaxPins = 16>
RotationGroups< N, MaxPins >::RotationGroups ( const PinList< MaxPins > & g0,
const PinList< MaxPins > & g1 = {},
const PinList< MaxPins > & g2 = {},
const PinList< MaxPins > & g3 = {},
const PinList< MaxPins > & g4 = {},
const PinList< MaxPins > & g5 = {},
const PinList< MaxPins > & g6 = {},
const PinList< MaxPins > & g7 = {},
const PinList< MaxPins > & g8 = {},
const PinList< MaxPins > & g9 = {} )
inlineconstexpr

The groups, one list of targets each.

Definition at line 543 of file config_types.h.

◆ RotationGroups() [2/2]

template<uint8_t N, uint8_t MaxPins = 16>
template<uint8_t... I>
RotationGroups< N, MaxPins >::RotationGroups ( const Ten & ten,
index_sequence< I... >  )
inlineconstexprprivate

Definition at line 571 of file config_types.h.

Member Function Documentation

◆ getGroup()

template<uint8_t N, uint8_t MaxPins = 16>
const PinList< MaxPins > & RotationGroups< N, MaxPins >::getGroup ( const uint8_t index) const
inlineconstexpr

The targets of group index, as codes.

Definition at line 559 of file config_types.h.

Here is the caller graph for this function:

◆ size()

template<uint8_t N, uint8_t MaxPins = 16>
uint8_t RotationGroups< N, MaxPins >::size ( ) const
inlineconstexpr

Number of groups.

Definition at line 553 of file config_types.h.

Here is the caller graph for this function:

Member Data Documentation

◆ groups_

template<uint8_t N, uint8_t MaxPins = 16>
const PinList< MaxPins > RotationGroups< N, MaxPins >::groups_[N]
private

the targets of each group

Definition at line 576 of file config_types.h.


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