3-phase PV router
Loading...
Searching...
No Matches
Rotation::Table< NG, NL > Class Template Reference

The rotation groups, resolved: the priority places each group holds. More...

#include <rotation_groups.h>

Inheritance diagram for Rotation::Table< NG, NL >:

Public Member Functions

template<uint8_t MaxPins>
constexpr Table (const RotationGroups< NG, MaxPins > &groups, const uint8_t(&loadMap)[NL], const uint8_t(&priorities)[NL])
 
constexpr uint32_t loads (const uint8_t g) const
 The loads of group g: bit n set for load n.
 
template<uint8_t N>
void rotate (uint8_t(&prio)[N]) const
 Rotates each group by one among its places; each entry keeps its ON bit.
 
constexpr uint8_t size () const
 Number of groups.
 

Private Attributes

uint8_t ends_ [NG]
 
uint32_t loads_ [NG]
 
uint8_t places_ [NL]
 

Detailed Description

template<uint8_t NG, uint8_t NL>
class Rotation::Table< NG, NL >

The rotation groups, resolved: the priority places each group holds.

A group's places are the positions of the priority list that hold its loads at startup, in ascending order. rotate() moves the load in a group's last place to its first place and the others one place down, as LoadPriorities::rotate() does for the whole list; loads in no group never move.

Template Parameters
NGNumber of groups.
NLNumber of loads.

Definition at line 222 of file rotation_groups.h.

Constructor & Destructor Documentation

◆ Table()

template<uint8_t NG, uint8_t NL>
template<uint8_t MaxPins>
Rotation::Table< NG, NL >::Table ( const RotationGroups< NG, MaxPins > & groups,
const uint8_t(&) loadMap[NL],
const uint8_t(&) priorities[NL] )
inlineconstexpr
Parameters
groupsthe rotation groups, as in config.h
loadMapthe load map (physicalLoadPin)
prioritiesthe load numbers in priority order at startup (loadPrioritiesAtStartup)

Definition at line 231 of file rotation_groups.h.

Here is the call graph for this function:

Member Function Documentation

◆ loads()

template<uint8_t NG, uint8_t NL>
uint32_t Rotation::Table< NG, NL >::loads ( const uint8_t g) const
inlineconstexpr

The loads of group g: bit n set for load n.

Definition at line 256 of file rotation_groups.h.

◆ rotate()

template<uint8_t NG, uint8_t NL>
template<uint8_t N>
void Rotation::Table< NG, NL >::rotate ( uint8_t(&) prio[N]) const
inline

Rotates each group by one among its places; each entry keeps its ON bit.

Definition at line 263 of file rotation_groups.h.

Here is the caller graph for this function:

◆ size()

template<uint8_t NG, uint8_t NL>
uint8_t Rotation::Table< NG, NL >::size ( ) const
inlineconstexpr

Number of groups.

Definition at line 250 of file rotation_groups.h.

Member Data Documentation

◆ ends_

template<uint8_t NG, uint8_t NL>
uint8_t Rotation::Table< NG, NL >::ends_[NG]
private

the end of each group in places_

Definition at line 284 of file rotation_groups.h.

◆ loads_

template<uint8_t NG, uint8_t NL>
uint32_t Rotation::Table< NG, NL >::loads_[NG]
private

the loads of each group, by load number

Definition at line 285 of file rotation_groups.h.

◆ places_

template<uint8_t NG, uint8_t NL>
uint8_t Rotation::Table< NG, NL >::places_[NL]
private

the places of group 0, then of group 1...

Definition at line 283 of file rotation_groups.h.


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