Skip to main content

ReadTaskTiming

Struct ReadTaskTiming 

Source
pub struct ReadTaskTiming { /* private fields */ }
Expand description

One-shot read of a task’s actual sample rate and time increment.

Implementations§

Source§

impl ReadTaskTiming

Source

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.

Source

pub fn is_busy(&self) -> bool

True while the FB is waiting for either read response.

Source

pub fn is_error(&self) -> bool

True when the most recent start() concluded in an error. Cleared on the next start().

Source

pub fn error_message(&self) -> &str

Source

pub fn actual_sample_rate(&self) -> f64

Last-read actual sample rate in Hz. Zero until a read has succeeded.

Source

pub fn time_increment(&self) -> f64

Last-read time increment per sample in seconds. Zero until a read has succeeded.

Source

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).

Source

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.

Source

pub fn tick(&mut self, timeout_ms: u32, client: &mut CommandClient)

Drive one scan cycle of the FB. Call every tick while is_busy().

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V