|
3-phase PV router
|
Embedded tests for teleinfo.h: the IoT frame on the ATmega328P (16-bit int) More...
#include <Arduino.h>#include <unity.h>#include "../halt_after_tests.h"#include "serial_output.h"#include "teleinfo.h"
Go to the source code of this file.
Classes | |
| class | FramePrint |
| struct | TestSource< PHASES > |
| A data source of writeFrameStep(): 2 loads, 1 relay, 2 temperature sensors (the 2nd invalid). More... | |
Functions | |
| static void | appendLine (char *expected, const char *tagAndValue) |
| static const char * | expectedLine (const char *tagAndValue) |
| void | loop () |
| void | setUp (void) |
| void | setup () |
| template<typename Source> | |
| static void | streamFrame (FramePrint &out) |
| void | tearDown (void) |
| void | test_frame_single_phase (void) |
| void | test_frame_three_phases (void) |
| void | test_lineSize_calculation (void) |
| void | test_teleinfo_line_contents (void) |
Embedded tests for teleinfo.h: the IoT frame on the ATmega328P (16-bit int)
The code of the firmware, run on the target: the lines (digits of 16-bit values, checksum) and whole frames written step by step, with and without the per-phase lines. The expected text is built independently, its checksums summed by appendLine(). The native tests (test/native/test_teleinfo) check the frame byte for byte against the buffered frame of the former firmware.
Definition in file test_main.cpp.
|
static |
|
static |
Definition at line 48 of file test_main.cpp.


| void loop | ( | ) |
| void setUp | ( | void | ) |
Definition at line 21 of file test_main.cpp.
| void setup | ( | ) |
Definition at line 239 of file test_main.cpp.
|
static |
Definition at line 173 of file test_main.cpp.


| void tearDown | ( | void | ) |
Definition at line 26 of file test_main.cpp.
| void test_frame_single_phase | ( | void | ) |
Definition at line 217 of file test_main.cpp.


| void test_frame_three_phases | ( | void | ) |
Definition at line 188 of file test_main.cpp.


| void test_lineSize_calculation | ( | void | ) |
Definition at line 56 of file test_main.cpp.


| void test_teleinfo_line_contents | ( | void | ) |
Definition at line 69 of file test_main.cpp.

