3-phase PV router
|
Some utility functions. More...
#include <Arduino.h>
#include <ArduinoJson.h>
#include "FastDivision.h"
#include "calibration.h"
#include "constants.h"
#include "dualtariff.h"
#include "processing.h"
#include "teleinfo.h"
#include "utils_rf.h"
#include "utils_temp.h"
#include "version.h"
Go to the source code of this file.
Functions | |
int | freeRam () |
Get the available RAM during setup. | |
void | logLoadPriorities () |
Prints the load priorities to the Serial output. | |
void | printConfiguration () |
Print the configuration during startup. | |
void | printForEmonCMS (const bool bOffPeak) |
Write telemetry data to Serial in EmonCMS format. | |
void | printForSerialText () |
Prints data logs to the Serial output in text format. | |
void | sendResults (bool bOffPeak) |
Prints or sends telemetry data logs based on the selected output format. | |
void | sendTelemetryData () |
Sends telemetry data using the TeleInfo class. | |
Some utility functions.
Definition in file utils.h.
|
inline |
Get the available RAM during setup.
This function calculates the amount of free RAM available in the system. It is useful for debugging and ensuring that the system has sufficient memory for proper operation.
Definition at line 478 of file utils.h.
void sendTelemetryData | ( | ) |
Sends telemetry data using the TeleInfo class.
This function collects various telemetry data (e.g., power, voltage, temperature, etc.) and sends it in a structured format using the TeleInfo
class. The data is sent as a telemetry frame, which starts with a frame initialization, includes multiple data points, and ends with a frame finalization.
The function supports conditional features such as relay diversion, temperature sensing, and different supply frequencies (50 Hz or 60 Hz).
RELAY_DIVERSION
), sends the average relay data.TEMP_SENSOR_PRESENT
), sends valid temperature readings.constexpr
) to include or exclude specific features. Invalid temperature readings (e.g., OUTOFRANGE_TEMPERATURE
or DEVICE_DISCONNECTED_RAW
) are skipped.static_assert | If SUPPLY_FREQUENCY is not 50 or 60 Hz. |
Definition at line 342 of file utils.h.