pub struct ClockState { /* private fields */ }Expand description
The published result of the most recent burst.
Implementations§
Source§impl ClockState
impl ClockState
Sourcepub fn offset(&self) -> Option<f64>
pub fn offset(&self) -> Option<f64>
The most recent offset, or None before the first burst finishes.
Sourcepub fn uncertainty(&self) -> Option<f64>
pub fn uncertainty(&self) -> Option<f64>
The round-trip time of the kept estimate. liblsl calls this the
uncertainty (src/time_receiver.cpp:204).
Sourcepub fn drift(&self) -> Option<f64>
pub fn drift(&self) -> Option<f64>
Estimated relative clock drift (d(offset)/d(t_local) in s/s) from the
opt-in drift model (docs/roadmap.md, step 17), or None before the
first burst finishes.
Sourcepub fn drift_fit(&self) -> Option<DriftFit>
pub fn drift_fit(&self) -> Option<DriftFit>
Latest linear offset-and-drift fit, or None before the first burst.
Sourcepub fn smooth_offset_at(&self, remote_ts: f64) -> Option<f64>
pub fn smooth_offset_at(&self, remote_ts: f64) -> Option<f64>
Smooth offset local - remote for remote_ts, or None before the
first burst finishes.
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
True while a probe thread runs and can publish a value.
Sourcepub fn wait(&self, timeout: Duration) -> Option<f64>
pub fn wait(&self, timeout: Duration) -> Option<f64>
Wait until a first measurement arrives.
The wait ends early when no probe thread runs, because no value can
then arrive. liblsl ends its wait when the connection is lost
(src/time_receiver.cpp:59-61).
Sourcepub fn mark_reset(&self)
pub fn mark_reset(&self)
Record that the connection reset, so the post-processor clears its fit.
Sourcepub fn reset_offset(&self)
pub fn reset_offset(&self)
Forget the offset after the inlet attached to a new source.
The old offset describes a process that has gone. The reset flag goes
up only if an offset existed, as in liblsl
(src/time_receiver.cpp:212-218).
Sourcepub fn retarget(&self, target: SocketAddr)
pub fn retarget(&self, target: SocketAddr)
Send the next bursts to a different service port.
A burst that is in progress publishes nothing. liblsl sets the new
address in its recovery callback (src/time_receiver.cpp:26-33).