3-phase PV router
|
Public functions/variables of processing engine. More...
#include "config.h"
Go to the source code of this file.
Functions | |
void | confirmPolarity (uint8_t phase) |
Confirms the polarity of the current voltage sample for a specific phase. | |
void | initializeProcessing () |
Initializes the processing engine, including ports, load states, and ADC setup. | |
uint8_t | nextLogicalLoadToBeAdded () |
Retrieve the next logical load that could be added. | |
uint8_t | nextLogicalLoadToBeRemoved () |
Retrieve the next logical load that could be removed (in reverse order). | |
void | printParamsForSelectedOutputMode () |
Print the settings used for the selected output mode. | |
void | proceedHighEnergyLevel () |
Handles the case when the energy level is high, potentially adding a load. | |
void | proceedLowEnergyLevel () |
Handles the case when the energy level is low, potentially removing a load. | |
void | processCurrentRawSample (const uint8_t phase, const int16_t rawSample) |
Processes the current raw sample for the specified phase. | |
void | processDataLogging () |
Process data logging at the end of each logging period. | |
void | processLatestContribution (uint8_t phase) |
Process the latest contribution after each phase-specific new cycle. | |
void | processMinusHalfCycle (uint8_t phase) |
Processes the start of a new negative half cycle for the specified phase. | |
void | processPlusHalfCycle (uint8_t phase) |
Process the start of a new positive half cycle for the specified phase. | |
void | processPolarity (uint8_t phase, int16_t rawSample) |
Processes the polarity of the current voltage sample for a specific phase. | |
void | processRawSamples (const uint8_t phase) |
Processes raw voltage and current samples for the specified phase. | |
void | processStartNewCycle () |
Processes the start of a new mains cycle on phase 0. | |
void | processStartUp (uint8_t phase) |
Processes the startup period for the router. | |
void | processVoltage (uint8_t phase) |
Processes the current voltage sample for the specified phase. | |
void | processVoltageRawSample (const uint8_t phase, const int16_t rawSample) |
Processes the current voltage raw sample for the specified phase. | |
void | updatePhysicalLoadStates () |
Updates the physical load states based on logical load priorities and states. | |
void | updatePortsStates () |
Updates the control ports for each of the physical loads. | |
Variables | |
volatile uint16_t | absenceOfDivertedEnergyCount { 0 } |
volatile bool | b_datalogEventPending { false } |
volatile bool | b_diversionOff { false } |
volatile bool | b_newMainsCycle { false } |
volatile bool | b_overrideLoadOn [NO_OF_DUMPLOADS] {} |
volatile bool | b_reOrderLoads { false } |
volatile uint16_t | copyOf_countLoadON [NO_OF_DUMPLOADS] |
volatile float | copyOf_energyInBucket_main |
volatile uint8_t | copyOf_lowestNoOfSampleSetsPerMainsCycle |
volatile uint16_t | copyOf_sampleSetsDuringThisDatalogPeriod |
volatile int32_t | copyOf_sum_Vsquared [NO_OF_PHASES] |
volatile int32_t | copyOf_sumP_atSupplyPoint [NO_OF_PHASES] |
volatile bool | EDD_isIdle { true } |
constexpr uint16_t | initialDelay { 3000 } |
uint8_t | loadPrioritiesAndState [NO_OF_DUMPLOADS] |
constexpr uint8_t | PERSISTENCE_FOR_POLARITY_CHANGE { 1 } |
constexpr uint8_t | sensorI [NO_OF_PHASES] { 1, 3, 5 } |
constexpr uint8_t | sensorV [NO_OF_PHASES] { 0, 2, 4 } |
constexpr uint16_t | startUpPeriod { 3000 } |
PayloadTx_struct< NO_OF_PHASES > | tx_data |
Public functions/variables of processing engine.
Definition in file processing.h.
void printParamsForSelectedOutputMode | ( | ) |
Print the settings used for the selected output mode.
This function displays the relevant configuration parameters for the currently selected output mode. It provides details about the energy bucket capacity, thresholds, and mode-specific settings.
Definition at line 1027 of file processing.cpp.
|
inline |
number of main cycles without diverted energy
Definition at line 30 of file processing.h.
|
inline |
async trigger to signal datalog is available
Definition at line 31 of file processing.h.
|
inline |
async trigger to stop diversion
Definition at line 35 of file processing.h.
|
inline |
async trigger to signal start of new main cycle based on first phase
Definition at line 32 of file processing.h.
|
inline |
async trigger to force specific load(s) to ON
Definition at line 33 of file processing.h.
|
inline |
async trigger for loads re-ordering
Definition at line 34 of file processing.h.
|
inline |
copy of number of cycle the load was ON (over 1 datalog period)
Definition at line 46 of file processing.h.
|
inline |
copy of main energy bucket (over all phases)
Definition at line 43 of file processing.h.
|
inline |
copy of a mechanism to check the integrity of this code structure
Definition at line 44 of file processing.h.
|
inline |
copy of for counting the sample sets during each datalogging period
Definition at line 45 of file processing.h.
|
inline |
copy of for summation of V^2 values during datalog period
Definition at line 42 of file processing.h.
|
inline |
copy of cumulative power per phase
Definition at line 41 of file processing.h.
|
inline |
energy diversion detection
Definition at line 36 of file processing.h.
|
inlineconstexpr |
in milli-seconds, to allow time to open the Serial monitor
Definition at line 26 of file processing.h.
|
inline |
load priorities
Definition at line 22 of file processing.h.
|
inlineconstexpr |
allows polarity changes to be confirmed
Definition at line 24 of file processing.h.
|
inlineconstexpr |
for 3-phase PCB, current measurement for each phase
Definition at line 19 of file processing.h.
|
inlineconstexpr |
for 3-phase PCB, voltage measurement for each phase
Definition at line 18 of file processing.h.
|
inlineconstexpr |
in milli-seconds, to allow LP filter to settle
Definition at line 27 of file processing.h.
|
inline |
logging data
Definition at line 51 of file processing.h.