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

Functions

uint64_t ms_between (uint64_t later_ns, uint64_t earlier_ns)
 Saturating difference — clocks are unsigned and callers may pass a now that predates a sample (a reordered packet, or a test driving times by hand).
double mean_of (const std::vector< double > &v, size_t from, size_t to)

Variables

constexpr uint64_t NS_PER_MS = 1000000ULL

Function Documentation

◆ mean_of()

double fsw::calibration::anonymous_namespace{CaptureWindow.cpp}::mean_of ( const std::vector< double > & v,
size_t from,
size_t to )

Definition at line 20 of file CaptureWindow.cpp.

References mean_of().

Referenced by mean_of().

◆ ms_between()

uint64_t fsw::calibration::anonymous_namespace{CaptureWindow.cpp}::ms_between ( uint64_t later_ns,
uint64_t earlier_ns )

Saturating difference — clocks are unsigned and callers may pass a now that predates a sample (a reordered packet, or a test driving times by hand).

Wrapping here would turn "41 ms old" into "584 million years old" and reject a healthy capture.

Definition at line 16 of file CaptureWindow.cpp.

References ms_between(), and NS_PER_MS.

Referenced by ms_between().

Variable Documentation

◆ NS_PER_MS

uint64_t fsw::calibration::anonymous_namespace{CaptureWindow.cpp}::NS_PER_MS = 1000000ULL
constexpr

Definition at line 11 of file CaptureWindow.cpp.

Referenced by ms_between().