|
3-phase PV router
|
Functions used for managing dual tariff periods. More...
Namespaces | |
| namespace | DualTariff |
| The windows of the scheduled boosts, in milliseconds from the start of the off-peak period. | |
Classes | |
| struct | DualTariff::Boost |
| A boost resolved for a given off-peak duration: its window in ms and its target masks. More... | |
| struct | BoostTable |
| The scheduled boosts, resolved for the off-peak duration: window in ms and target masks. More... | |
Functions | |
| OverrideMasks | getDualTariffForcingBitmask (const bool bOffPeak, const int16_t currentTemperature_x100) |
| Calculates the dual tariff forcing bitmasks based on current conditions. | |
| void | printDualTariffConfiguration () |
| Print the settings for off-peak period. | |
| void | printOffPeakTime (const uint32_t ms) |
| Prints a time in ms from the start of the off-peak period, as <h>h<mm>. | |
| DualTariff::Boost | readBoost (const uint8_t i) |
Reads scheduled boost i from flash. | |
| constexpr BoostTable | resolveBoosts () |
| Resolves each scheduled boost, at compile time. | |
Functions used for managing dual tariff periods.
This group includes functions that detect and handle changes between off-peak and on-peak tariff periods. It adjusts load priorities and diversion strategies based on the current tariff state. Features like forced load operation during off-peak periods are also supported.
| OverrideMasks getDualTariffForcingBitmask | ( | const bool | bOffPeak, |
| const int16_t | currentTemperature_x100 ) |
Calculates the dual tariff forcing bitmasks based on current conditions.
This function determines which loads and relays should be forced ON during off-peak periods based on elapsed time since off-peak start, the scheduled boosts, and temperature conditions.
| bOffPeak | true if the system is in an off-peak period (as tracked by proceedDualTariffLogic()). |
| currentTemperature_x100 | Current temperature multiplied by 100. |
Definition at line 77 of file main.cpp.


|
inline |
Print the settings for off-peak period.
Definition at line 93 of file dualtariff.h.


|
inline |
Prints a time in ms from the start of the off-peak period, as <h>h<mm>.
Definition at line 74 of file dualtariff.h.


|
inline |
Reads scheduled boost i from flash.
| i | the boost, below NO_OF_BOOSTS |
Definition at line 62 of file dualtariff.h.

|
constexpr |
Resolves each scheduled boost, at compile time.
Definition at line 42 of file dualtariff.h.