1-phase PV router
Loading...
Searching...
No Matches
processing.h File Reference

Public functions/variables of processing engine. More...

#include "shared_var.h"
Include dependency graph for processing.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void confirmPolarity ()
 Confirms the polarity of the current voltage sample.
 
void initializeOldPCBPins ()
 Initializes optional pins for the old PCB configuration.
 
void initializeProcessing ()
 Initializes the processing engine, including ports, load states, and ADC setup.
 
void logLoadPriorities ()
 Prints the load priorities to the Serial output.
 
uint8_t nextLogicalLoadToBeAdded ()
 Retrieve the next load that could be removed (be aware of the reverse-order).
 
uint8_t nextLogicalLoadToBeRemoved ()
 Process with data logging.
 
void printParamsForSelectedOutputMode ()
 Print the settings used for the selected output mode.
 
void proceedHighEnergyLevel ()
 Process the case of high energy level, some action may be required.
 
void proceedLowEnergyLevel ()
 Process the case of low energy level, some action may be required.
 
void processDataLogging ()
 Process with data logging.
 
void processDivertedCurrentRawSample (int16_t rawSample)
 Processes the raw current sample for the diverted connection point.
 
void processGridCurrentRawSample (int16_t rawSample)
 Processes the raw current sample for the grid connection point.
 
void processLatestContribution ()
 Process the latest contribution after each new cycle.
 
void processMinusHalfCycle ()
 Process the start of a new -ve half cycle, just after the zero-crossing point.
 
void processPlusHalfCycle ()
 Process the start of a new +ve half cycle, just after the zero-crossing point.
 
void processPolarity (int16_t rawSample)
 Processes 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 processStartNewCycle ()
 This code is executed once per 20ms, shortly after the start of each new mains cycle on phase 0.
 
void processStartUp ()
 Process the startup period for the router.
 
void processVoltage ()
 Process the calculation for the current voltage sample.
 
void processVoltageRawSample (int16_t rawSample)
 Process the current voltage raw sample.
 
void updatePhysicalLoadStates ()
 This function provides the link between the logical and physical loads.
 
void updatePortsStates ()
 Updates the control ports for each of the physical loads.
 

Detailed Description

Public functions/variables of processing engine.

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.1
Date
2024-10-03

Definition in file processing.h.

Function Documentation

◆ printParamsForSelectedOutputMode()

void printParamsForSelectedOutputMode ( )

Print the settings used for the selected output mode.

This function outputs the configuration parameters related to the selected output mode. It is primarily used for debugging and verifying the system's configuration.

  • Prints the zero-crossing persistence value in sample sets.
  • Prints the capacity of the energy bucket in integer energy units.

Definition at line 1176 of file processing.cpp.

References capacityOfEnergyBucket_long, DBUG, DBUGLN, and PERSISTENCE_FOR_POLARITY_CHANGE.

Referenced by printConfiguration().

Here is the caller graph for this function: