pub struct ReadTaskTiming { /* private fields */ }Expand description
One-shot read of a task’s actual sample rate and time increment.
Implementations§
Source§impl ReadTaskTiming
impl ReadTaskTiming
Sourcepub fn new(task_fqdn: &str) -> Self
pub fn new(task_fqdn: &str) -> Self
Create a new FB for the given task FQDN. Construction is cheap —
nothing is fetched until start() is called.
Sourcepub fn is_error(&self) -> bool
pub fn is_error(&self) -> bool
True when the most recent start() concluded in an error. Cleared
on the next start().
pub fn error_message(&self) -> &str
Sourcepub fn actual_sample_rate(&self) -> f64
pub fn actual_sample_rate(&self) -> f64
Last-read actual sample rate in Hz. Zero until a read has succeeded.
Sourcepub fn time_increment(&self) -> f64
pub fn time_increment(&self) -> f64
Last-read time increment per sample in seconds. Zero until a read has succeeded.
Sourcepub fn start(&mut self, client: &mut CommandClient)
pub fn start(&mut self, client: &mut CommandClient)
Fire both reads. Safe to call repeatedly from the control program — a prior in-flight read is abandoned and its transaction IDs are dropped (the responses will eventually be discarded by the CommandClient’s unmatched-response path).
Sourcepub fn reset(&mut self)
pub fn reset(&mut self)
Cancel any in-flight reads and return to idle. Already-sent IPC requests will still get responses; the CommandClient will drop them as unmatched.
Sourcepub fn tick(&mut self, timeout_ms: u32, client: &mut CommandClient)
pub fn tick(&mut self, timeout_ms: u32, client: &mut CommandClient)
Drive one scan cycle of the FB. Call every tick while is_busy().