|
3-phase PV router
|
Native unit tests for temp_schedule.h: which 1-Wire transaction runs on which mains cycle. More...

Go to the source code of this file.
Classes | |
| struct | Action |
| The transaction to run, and the sensor it reads (ADDRESS, READ, CLOSE). More... | |
Enumerations | |
| enum class | Step |
| The 1-Wire transaction of a mains cycle. More... | |
Functions | |
| int | main (int argc, char **argv) |
| template<uint8_t N, uint8_t F> | |
| static bool | roundEndsInPeriod (const uint16_t periodCycles) |
| A datalog period of the main loop: the round must be over before the cycle that ends the period, whose ISR copies run ~1248 µs before the new cycle is flagged. | |
| void | setUp (void) |
| void | tearDown (void) |
| void | test_a_sensor_that_does_not_answer_is_skipped () |
| void | test_conversion_cycles_cover_750_ms () |
| void | test_conversion_in_the_cycle_that_ends_the_period () |
| void | test_first_read_conversion_cycles_after_the_conversion () |
| void | test_late_cycles_postpone_without_losing_a_step () |
| void | test_late_cycles_still_count_for_the_conversion () |
| void | test_never_two_transactions_in_one_cycle_and_never_before_the_conversion_time () |
| void | test_new_period_continues_an_unfinished_round () |
| void | test_new_period_restarts_a_finished_round () |
| void | test_round_of_two_sensors () |
| void | test_rounds_fit_their_period () |
Native unit tests for temp_schedule.h: which 1-Wire transaction runs on which mains cycle.
The main loop asks the schedule once per mains cycle, when it sees the new cycle, and runs the transaction it gets: the conversion of every sensor, then, once the conversion time has passed, the three transactions of each sensor's read. One transaction per cycle at most, only on a cycle seen on time (the loop idle when it began), and the round over well before the end of the datalog period, whose values it gives.
Definition in file test_main.cpp.
|
strong |
The 1-Wire transaction of a mains cycle.
Definition at line 56 of file temp_schedule.h.
| int main | ( | int | argc, |
| char ** | argv ) |
|
static |
A datalog period of the main loop: the round must be over before the cycle that ends the period, whose ISR copies run ~1248 µs before the new cycle is flagged.
The cycle after each per-second tick is late (the per-second work and the display may run past the next tick).
Definition at line 246 of file test_main.cpp.


| void setUp | ( | void | ) |
Definition at line 22 of file test_main.cpp.
| void tearDown | ( | void | ) |
Definition at line 23 of file test_main.cpp.
| void test_a_sensor_that_does_not_answer_is_skipped | ( | ) |
Definition at line 135 of file test_main.cpp.


| void test_conversion_cycles_cover_750_ms | ( | ) |
| void test_conversion_in_the_cycle_that_ends_the_period | ( | ) |
Definition at line 168 of file test_main.cpp.


| void test_first_read_conversion_cycles_after_the_conversion | ( | ) |
Definition at line 85 of file test_main.cpp.


| void test_late_cycles_postpone_without_losing_a_step | ( | ) |
Definition at line 105 of file test_main.cpp.


| void test_late_cycles_still_count_for_the_conversion | ( | ) |
Definition at line 123 of file test_main.cpp.


| void test_never_two_transactions_in_one_cycle_and_never_before_the_conversion_time | ( | ) |
Definition at line 201 of file test_main.cpp.


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


| void test_new_period_restarts_a_finished_round | ( | ) |
Definition at line 155 of file test_main.cpp.


| void test_round_of_two_sensors | ( | ) |
Definition at line 65 of file test_main.cpp.


| void test_rounds_fit_their_period | ( | ) |
Definition at line 263 of file test_main.cpp.

