|
3-phase PV router
|
Native tests for teleinfo.h: the IoT frame, streamed a line per step. More...

Go to the source code of this file.
Classes | |
| struct | Line |
| A line of a frame: its tag (with the index) and its value. More... | |
| class | Reference |
| The buffered TeleInfo class of the firmware, as it was (utoa() aside): the reference of the frame. Its frame differs in two places only (referenceFrame()): N and each V are sent unsigned. More... | |
| struct | Streamed |
| A frame as the serial output writes it: every step, one after the other. More... | |
| struct | TestSource< PHASES > |
| A data source of writeFrameStep(): 2 loads, 1 relay, 2 temperature sensors (the 2nd invalid). More... | |
| struct | Values |
| The values of a datalog, shared by every test source. More... | |
Typedefs | |
| using | Default = TestSource< 3, 0, 3, 0, false > |
| using | DualTariff = TestSource< 3, 0, 3, 0, true > |
| using | Everything = TestSource< 3, 2, 4, 4, true > |
| using | Minimal = TestSource< 3, 0, 1, 0, false > |
| using | Relays = TestSource< 3, 2, 3, 0, false > |
| using | SinglePhase = TestSource< 1, 0, 1, 0, false > |
| using | Temperatures = TestSource< 3, 0, 3, 2, false > |
Functions | |
| template<typename Source> | |
| static void | assertSameAsReference (const char *message) |
| static uint8_t | countTag (const Line(&lines)[32], uint8_t count, const char *tag) |
| How many lines have exactly this tag. | |
| static void | extremeValues () |
| The extremes of every value. | |
| int | main (int, char **) |
| static uint8_t | parseFrame (const Streamed &frame, Line(&lines)[32]) |
| Splits a frame into its lines, as a receiver does, checking STX, ETX and every line's format and checksum. | |
| template<typename Source> | |
| static void | referenceFrame (Reference &teleInfo) |
| The frame of sendTelemetryData() as it was, N and V sent unsigned. | |
| void | setUp (void) |
| template<typename Source> | |
| static Streamed | streamFrame () |
| void | tearDown (void) |
| void | test_absence_count_unsigned (void) |
| void | test_every_tag (void) |
| void | test_golden_frame (void) |
| void | test_line (void) |
| void | test_one_line_per_step (void) |
| void | test_optional_features (void) |
| void | test_sample_count_unsigned (void) |
| void | test_step_fits_serial_output (void) |
| void | test_streamed_frame_equals_buffered (void) |
| void | test_voltage_unsigned (void) |
| static void | typicalValues () |
| A datalog with every value set, temperature 2 invalid. | |
| static const char * | valueOf (const Line(&lines)[32], uint8_t count, const char *tag) |
| The value of the line with exactly this tag. | |
Variables | |
| static Values | values |
Native tests for teleinfo.h: the IoT frame, streamed a line per step.
The frame is written by TeleInfo::writeFrameStep(), one line per step of the serial output (STX before the first line, ETX after the last), from a data source: here, test sources with feature sets of the firmware. It must give, byte for byte, what the buffered TeleInfo class of the firmware wrote before (Reference below, its code kept as it was, utoa() replaced by snprintf()), with N and V sent unsigned.
Definition in file test_main.cpp.
| using Default = TestSource< 3, 0, 3, 0, false > |
Definition at line 318 of file test_main.cpp.
| using DualTariff = TestSource< 3, 0, 3, 0, true > |
Definition at line 321 of file test_main.cpp.
| using Everything = TestSource< 3, 2, 4, 4, true > |
Definition at line 322 of file test_main.cpp.
| using Minimal = TestSource< 3, 0, 1, 0, false > |
Definition at line 317 of file test_main.cpp.
| using Relays = TestSource< 3, 2, 3, 0, false > |
Definition at line 319 of file test_main.cpp.
| using SinglePhase = TestSource< 1, 0, 1, 0, false > |
Definition at line 316 of file test_main.cpp.
| using Temperatures = TestSource< 3, 0, 3, 2, false > |
Definition at line 320 of file test_main.cpp.
|
static |
Definition at line 294 of file test_main.cpp.


|
static |
How many lines have exactly this tag.
Definition at line 466 of file test_main.cpp.

|
static |
The extremes of every value.
Definition at line 311 of file test_main.cpp.

| int main | ( | int | , |
| char ** | ) |
Splits a frame into its lines, as a receiver does, checking STX, ETX and every line's format and checksum.
Definition at line 431 of file test_main.cpp.

|
static |
The frame of sendTelemetryData() as it was, N and V sent unsigned.
Definition at line 202 of file test_main.cpp.


| void setUp | ( | void | ) |
Definition at line 21 of file test_main.cpp.
|
static |
Definition at line 272 of file test_main.cpp.


| void tearDown | ( | void | ) |
Definition at line 22 of file test_main.cpp.
| void test_absence_count_unsigned | ( | void | ) |
Definition at line 567 of file test_main.cpp.


| void test_every_tag | ( | void | ) |
Definition at line 490 of file test_main.cpp.


| void test_golden_frame | ( | void | ) |
Definition at line 373 of file test_main.cpp.


| void test_line | ( | void | ) |
Definition at line 612 of file test_main.cpp.


| void test_one_line_per_step | ( | void | ) |
Definition at line 361 of file test_main.cpp.


| void test_optional_features | ( | void | ) |
Definition at line 528 of file test_main.cpp.


| void test_sample_count_unsigned | ( | void | ) |
Definition at line 601 of file test_main.cpp.


| void test_step_fits_serial_output | ( | void | ) |
Definition at line 351 of file test_main.cpp.


| void test_streamed_frame_equals_buffered | ( | void | ) |
Definition at line 325 of file test_main.cpp.


| void test_voltage_unsigned | ( | void | ) |
Definition at line 584 of file test_main.cpp.


|
static |
A datalog with every value set, temperature 2 invalid.
Definition at line 305 of file test_main.cpp.

|
static |
The value of the line with exactly this tag.
Definition at line 477 of file test_main.cpp.

|
static |
Definition at line 41 of file test_main.cpp.