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

Functions

template<typename ReadBoost>
OverrideMasks boostForcing (const bool bOffPeak, const uint32_t elapsed, const int16_t temperature_x100, const int16_t threshold_x100, const uint8_t count, ReadBoost readBoost)
 The targets of the scheduled boosts whose window is open.
 
template<typename Pins, typename IsActive>
OverrideMasks pinForcing (const Pins &pins, IsActive isActive)
 The targets of the override pins that are active (held LOW).
 

Function Documentation

◆ boostForcing()

template<typename ReadBoost>
OverrideMasks Forcing::boostForcing ( const bool bOffPeak,
const uint32_t elapsed,
const int16_t temperature_x100,
const int16_t threshold_x100,
const uint8_t count,
ReadBoost readBoost )
inline

The targets of the scheduled boosts whose window is open.

No boost outside the off-peak period, nor when the temperature is above the threshold. A missing or failed reading (DEVICE_DISCONNECTED_RAW, -7040) counts as cold on purpose: the boost runs, and the water heater's own thermostat stays the safety limit; the threshold only stops the boost before the heater's setting.

Parameters
bOffPeaktrue during the off-peak period
elapsedms since the start of the off-peak period (millis() - its start)
temperature_x100the temperature of the probe checked against the threshold, x100
threshold_x100the temperature above which no boost runs, x100
countthe number of boosts
readBoostcallable taking a boost index (below count), returning its DualTariff::Boost
Returns
the union of the masks of every boost in its window

Definition at line 101 of file override_masks.h.

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

◆ pinForcing()

template<typename Pins, typename IsActive>
OverrideMasks Forcing::pinForcing ( const Pins & pins,
IsActive isActive )
inline

The targets of the override pins that are active (held LOW).

Parameters
pinsthe override pins and their targets (OverridePins)
isActivecallable taking a pin number, true if the pin is LOW
Returns
the union of the masks of every active pin

Definition at line 61 of file override_masks.h.

Here is the caller graph for this function: