3-phase PV router
Loading...
Searching...
No Matches
Rotation Namespace Reference

Classes

class  Table
 The rotation groups, resolved: the priority places each group holds. More...
 
class  Table< 0, NL >
 No rotation group: nothing to hold, nothing to rotate. More...
 

Functions

constexpr uint8_t countLoads (uint32_t mask)
 Number of bits set in mask.
 
template<uint8_t NG, uint8_t MaxPins, uint8_t NL>
constexpr uint32_t groupLoads (const RotationGroups< NG, MaxPins > &groups, const uint8_t g, const uint8_t(&loadMap)[NL])
 The loads of group g, all its codes together.
 
template<uint8_t NG, uint8_t MaxPins, uint8_t NL>
constexpr bool groupsAreConsistent (const RotationGroups< NG, MaxPins > &groups, const uint8_t(&loadMap)[NL])
 In each group, every load is local, or every load is on the same remote unit.
 
template<uint8_t NG, uint8_t MaxPins, uint8_t NL>
constexpr bool groupsHaveTwoLoads (const RotationGroups< NG, MaxPins > &groups, const uint8_t(&loadMap)[NL])
 Every group holds at least 2 loads.
 
template<uint8_t NL>
constexpr uint32_t loadsOf (const uint8_t code, const uint8_t(&loadMap)[NL])
 The loads a target code stands for, by load number.
 
template<uint8_t NG, uint8_t MaxPins, uint8_t NL>
constexpr bool noLoadTwice (const RotationGroups< NG, MaxPins > &groups, const uint8_t(&loadMap)[NL])
 No load is named twice, within a group or across groups.
 
template<uint8_t NG, uint8_t MaxPins, uint8_t NL>
 Table (const RotationGroups< NG, MaxPins > &, const uint8_t(&)[NL], const uint8_t(&)[NL]) -> Table< NG, NL >
 Deduction guide: the groups and the loads from the arguments.
 
template<uint8_t NG, uint8_t MaxPins, uint8_t NL>
constexpr bool targetsAreLoads (const RotationGroups< NG, MaxPins > &groups, const uint8_t(&loadMap)[NL])
 Every code of every group stands for at least one load.
 

Function Documentation

◆ countLoads()

uint8_t Rotation::countLoads ( uint32_t mask)
constexpr

Number of bits set in mask.

Definition at line 32 of file rotation_groups.h.

Here is the caller graph for this function:

◆ groupLoads()

template<uint8_t NG, uint8_t MaxPins, uint8_t NL>
uint32_t Rotation::groupLoads ( const RotationGroups< NG, MaxPins > & groups,
const uint8_t g,
const uint8_t(&) loadMap[NL] )
constexpr

The loads of group g, all its codes together.

Definition at line 117 of file rotation_groups.h.

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

◆ groupsAreConsistent()

template<uint8_t NG, uint8_t MaxPins, uint8_t NL>
bool Rotation::groupsAreConsistent ( const RotationGroups< NG, MaxPins > & groups,
const uint8_t(&) loadMap[NL] )
constexpr

In each group, every load is local, or every load is on the same remote unit.

Definition at line 183 of file rotation_groups.h.

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

◆ groupsHaveTwoLoads()

template<uint8_t NG, uint8_t MaxPins, uint8_t NL>
bool Rotation::groupsHaveTwoLoads ( const RotationGroups< NG, MaxPins > & groups,
const uint8_t(&) loadMap[NL] )
constexpr

Every group holds at least 2 loads.

Definition at line 148 of file rotation_groups.h.

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

◆ loadsOf()

template<uint8_t NL>
uint32_t Rotation::loadsOf ( const uint8_t code,
const uint8_t(&) loadMap[NL] )
constexpr

The loads a target code stands for, by load number.

LOAD(n) is load n of the load map, LOCAL_LOAD(n) the same if it is local, REMOTE_LOAD(n) the n-th remote load in map order, a plain number the local load on that pin, ALL_LOCAL_LOADS(), ALL_REMOTE_LOADS() and ALL_LOADS() their loads.

Parameters
codea target code, as written in rotationGroups
loadMapthe load map (physicalLoadPin)
Returns
bit n set for each load n the code stands for; 0 if it stands for no load (a relay, a load number beyond the map, a pin with no local load on it)

Definition at line 55 of file rotation_groups.h.

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

◆ noLoadTwice()

template<uint8_t NG, uint8_t MaxPins, uint8_t NL>
bool Rotation::noLoadTwice ( const RotationGroups< NG, MaxPins > & groups,
const uint8_t(&) loadMap[NL] )
constexpr

No load is named twice, within a group or across groups.

Definition at line 162 of file rotation_groups.h.

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

◆ Table()

template<uint8_t NG, uint8_t MaxPins, uint8_t NL>
Rotation::Table ( const RotationGroups< NG, MaxPins > & ,
const uint8_t(&)[NL],
const uint8_t(&)[NL] ) -> Table< NG, NL >

Deduction guide: the groups and the loads from the arguments.

◆ targetsAreLoads()

template<uint8_t NG, uint8_t MaxPins, uint8_t NL>
bool Rotation::targetsAreLoads ( const RotationGroups< NG, MaxPins > & groups,
const uint8_t(&) loadMap[NL] )
constexpr

Every code of every group stands for at least one load.

Definition at line 130 of file rotation_groups.h.

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