|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Per-board clock sync for DAQ sample timestamping. More...
#include <cstdint>#include <deque>#include <map>#include <string>#include <vector>Go to the source code of this file.
Classes | |
| struct | fsw::time::TimeSyncConfig |
| class | fsw::time::BoardClockSync |
| struct | fsw::time::BoardClockSync::BoardStats |
| struct | fsw::time::BoardClockSync::BoardState |
Namespaces | |
| namespace | fsw |
| Motorized ball valve position: raw ADC counts -> % open. | |
| namespace | fsw::time |
Per-board clock sync for DAQ sample timestamping.
Boards stamp each sensor chunk with uint32 millis() from a cheap local crystal: accurate RELATIVE spacing, meaningless absolute value, wraps at 2^32 ms (~49.7 days; faster on other firmware). The bridge historically stamped every sample in a UDP packet with one receive time, flattening a multi-chunk batch onto one instant and leaking network jitter into the recorded timeline.
This module reconstructs true sample times server-side, one instance per source board:
Mode "arrival" reproduces the historical behavior exactly (revert switch, config.toml [time_sync]).
Pure and deterministic: no sockets, no real clock — arrival times are inputs, so unit tests drive every edge case (see lib/test/ test_board_clock_sync.cpp).
Definition in file BoardClockSync.hpp.