3-phase PV router
Loading...
Searching...
No Matches
dualtariff.h File Reference

The scheduled boosts of the dual tariff, resolved at compile time. More...

#include <avr/pgmspace.h>
#include "config_derived.h"
Include dependency graph for dualtariff.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  BoostTable
 The scheduled boosts, resolved for the off-peak duration: window in ms and target masks. More...
 

Functions

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.
 

Variables

constexpr uint8_t NO_OF_BOOSTS { boostSchedule.size() }
 
constexpr BoostTable boostTable PROGMEM { resolveBoosts() }
 
uint32_t ul_TimeOffPeak
 

Detailed Description

The scheduled boosts of the dual tariff, resolved at compile time.

Author
Frédéric Metrich (frede.nosp@m.ric..nosp@m.metri.nosp@m.ch@l.nosp@m.ive.f.nosp@m.r)
Version
0.2
Date
2026-11-21

Definition in file dualtariff.h.

Variable Documentation

◆ NO_OF_BOOSTS

uint8_t NO_OF_BOOSTS { boostSchedule.size() }
inlineconstexpr

number of scheduled boosts

Definition at line 22 of file dualtariff.h.

◆ PROGMEM

const Load::OverrideMasks< NO_OF_DUMPLOADS > overrideMasks PROGMEM { resolveBoosts() }
inlineconstexpr

the scheduled boosts, in flash

override bit of each load: the ISR tests a mask instead of shifting by the pin

Definition at line 52 of file dualtariff.h.

◆ ul_TimeOffPeak

uint32_t ul_TimeOffPeak
inline

'timestamp' for start of off-peak period

Definition at line 20 of file dualtariff.h.