24#if defined(__DOXYGEN__)
50inline
void processPolarity(int16_t rawSample) __attribute__((always_inline));
61void handlePerSecondTasks(
bool& bOffPeak, int16_t iTemperature_x100) __attribute__((always_inline));
void logLoadPriorities()
Prints the load priorities to the Serial output.
void initializeProcessing()
Initializes the processing engine, including ports, load states, and ADC setup.
void initializeOldPCBPins()
Initializes optional pins for the old PCB configuration.
void processGridCurrentRawSample(int16_t rawSample)
Processes the raw current sample for the grid connection point.
void confirmPolarity()
Confirms the polarity of the current voltage sample.
void processRawSamples()
This routine is called by the ISR when a pair of V & I samples becomes available.
void updatePhysicalLoadStates()
This function provides the link between the logical and physical loads.
void processDivertedCurrentRawSample(int16_t rawSample)
Processes the raw current sample for the diverted connection point.
void updatePortsStates()
Updates the control ports for each of the physical loads.
void processMinusHalfCycle()
Process the start of a new -ve half cycle, just after the zero-crossing point.
void processStartNewCycle()
This code is executed once per 20ms, shortly after the start of each new mains cycle on phase 0.
void processPolarity(int16_t rawSample)
Processes the polarity of the current voltage sample.
void proceedLowEnergyLevel()
Process the case of low energy level, some action may be required.
uint8_t nextLogicalLoadToBeAdded()
Retrieve the next load that could be removed (be aware of the reverse-order).
void processVoltage()
Process the calculation for the current voltage sample.
void processDataLogging()
Process with data logging.
void processPlusHalfCycle()
Process the start of a new +ve half cycle, just after the zero-crossing point.
uint8_t nextLogicalLoadToBeRemoved()
Process with data logging.
void processLatestContribution()
Process the latest contribution after each new cycle.
void processVoltageRawSample(int16_t rawSample)
Process the current voltage raw sample.
void processStartUp()
Process the startup period for the router.
void proceedHighEnergyLevel()
Process the case of high energy level, some action may be required.
void handlePerSecondTasks(bool &bOffPeak, int16_t iTemperature_x100)
Handles tasks that need to be executed every second.
void printParamsForSelectedOutputMode()
Print the settings used for the selected output mode.