Voyant API 0.16.0
Loading...
Searching...
No Matches
TimeSyncState Struct Reference

#include <voyant_types_ffi.hpp>

Public Attributes

SyncQuality quality
uint8_t valid
int64_t offset_ns
int64_t round_trip_ns
int64_t jitter_ns
uint32_t sample_count
uint64_t age_ms

Detailed Description

Snapshot of time-sync health, derived from a rolling window of measurements.

Plain scalar fields (no Instant/Duration) and #[repr(C)] so it crosses the C++ FFI unchanged, like [super::SensorState]. Booleans are represented as u8 (0 = false, nonzero = true) for C ABI safety.

Member Data Documentation

◆ age_ms

uint64_t TimeSyncState::age_ms

Milliseconds since the last fresh measurement (u64::MAX when never measured).

◆ jitter_ns

int64_t TimeSyncState::jitter_ns

Standard deviation of the offset over the rolling window, nanoseconds.

◆ offset_ns

int64_t TimeSyncState::offset_ns

Most recent host−FPGA clock difference, nanoseconds (>0 ⇒ the FPGA clock is behind).

◆ quality

SyncQuality TimeSyncState::quality

◆ round_trip_ns

int64_t TimeSyncState::round_trip_ns

Round-trip of the kept read for the latest measurement, nanoseconds (the smallest of the reads taken; bounds the measurement uncertainty).

◆ sample_count

uint32_t TimeSyncState::sample_count

Number of measurements currently in the rolling window.

◆ valid

uint8_t TimeSyncState::valid

Nonzero when the latest measurement is fresh (within the manager's stale window).


The documentation for this struct was generated from the following file: