STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
fsw::time::anonymous_namespace{BoardClockSync.cpp} Namespace Reference

Functions

uint32_t forward_step_ms (uint32_t a, uint32_t b)
 Modular uint32 forward step (wrap-safe): how far b advanced past a.
int64_t board_ns (uint64_t unwrapped_ms)
 Board timeline position in ns.

Variables

constexpr int64_t NS_PER_MS = 1000000LL
constexpr double JITTER_EMA_ALPHA = 0.1

Function Documentation

◆ board_ns()

int64_t fsw::time::anonymous_namespace{BoardClockSync.cpp}::board_ns ( uint64_t unwrapped_ms)
inline

Board timeline position in ns.

All offset math is exact int64 — doubles cannot represent epoch-ns (53-bit mantissa) and the rounding error would leak into the future-clamp comparison.

Definition at line 21 of file BoardClockSync.cpp.

References board_ns(), and NS_PER_MS.

Referenced by board_ns().

◆ forward_step_ms()

uint32_t fsw::time::anonymous_namespace{BoardClockSync.cpp}::forward_step_ms ( uint32_t a,
uint32_t b )
inline

Modular uint32 forward step (wrap-safe): how far b advanced past a.

Definition at line 14 of file BoardClockSync.cpp.

References a, b, and forward_step_ms().

Referenced by forward_step_ms().

Variable Documentation

◆ JITTER_EMA_ALPHA

double fsw::time::anonymous_namespace{BoardClockSync.cpp}::JITTER_EMA_ALPHA = 0.1
constexpr

Definition at line 11 of file BoardClockSync.cpp.

◆ NS_PER_MS

int64_t fsw::time::anonymous_namespace{BoardClockSync.cpp}::NS_PER_MS = 1000000LL
constexpr

Definition at line 10 of file BoardClockSync.cpp.

Referenced by board_ns().