Expand description
Device timestamp helpers and host mapping utilities.
The TimeSync struct maintains a sliding window of timestamp measurements
and computes a linear model mapping device ticks to host time. It supports:
- Configurable window capacity
- Optional outlier trimming for robustness
- Both immediate (auto-fit on update) and deferred (manual fit) modes
Structs§
- Time
Sync - Maintain a linear mapping between device ticks and host time.
Enums§
- Time
Error - Errors encountered while interacting with timestamp control registers.
Constants§
- DEFAULT_
TIME_ WINDOW - Default maximum number of samples kept for linear regression.
- REG_
TIMESTAMP_ CONTROL - Address of the SFNC
TimestampControlregister. - REG_
TIMESTAMP_ TICK_ FREQUENCY - Address of the SFNC
TimestampTickFrequencyregister (64-bit). - REG_
TIMESTAMP_ VALUE - Address of the SFNC
TimestampValueregister (64-bit). - TIMESTAMP_
LATCH_ BIT - Bit flag to latch the timestamp counter.
- TIMESTAMP_
RESET_ BIT - Bit flag to reset the timestamp counter.
Traits§
- Control
Channel - Minimal interface required to read/write timestamp registers.
Functions§
- read_
tick_ frequency - Read the device tick frequency.
- read_
timestamp_ value - Read the current 64-bit timestamp value from the device.
- timestamp_
latch - Latch the current timestamp counter to make it readable without jitter.
- timestamp_
reset - Issue a timestamp reset using the SFNC control register.