IbStatus

Struct IbStatus 

Source
pub struct IbStatus {
Show 16 fields pub dcas: bool, pub dtas: bool, pub lacs: bool, pub tacs: bool, pub atn: bool, pub cic: bool, pub rem: bool, pub lok: bool, pub cmpl: bool, pub event: bool, pub spoll: bool, pub rqs: bool, pub srqi: bool, pub end: bool, pub timo: bool, pub err: bool,
}

Fields§

§dcas: bool§dtas: bool§lacs: bool§tacs: bool§atn: bool§cic: bool§rem: bool§lok: bool§cmpl: bool§event: bool§spoll: bool§rqs: bool§srqi: bool§end: bool§timo: bool§err: bool

Implementations§

Source§

impl IbStatus

Source

pub unsafe fn current_global_status() -> IbStatus

Get current value of from Linux-GPIB ibsta global variable. Use current_thread_local_status or current_async_status instead.

Source

pub fn current_thread_local_status() -> IbStatus

The value of ibsta corresponding to the last ‘traditional’ or ‘multidevice’ function called by the current thread is returned.

Source

pub fn current_async_local_status() -> IbStatus

Thread-local status value corresponding to the result of the last asynchronous I/O operation resynchronized to the current thread by an ibwait or ibstop call. This function only reflects the result of the asynchronous I/O operation itself and not, for example, the ibwait which resynchronized the asynchronous result to the current thread. Thus the result from AsyncIbsta() is easier to interpret than ThreadIbsta(), since it is unambiguous whether the value is associated with the asynchronous I/O result, or with the function call used to resynchronize (ibwait or ibstop).

Source

pub fn from_ibsta(ibsta: ibsta_type) -> IbStatus

Convert c_int status value to IbStatus

Source

pub fn as_status_mask(&self) -> status_mask_type

Source

pub fn as_ibsta(&self) -> ibsta_type

Convert IbStatus to Linux GPIB c_int status

Source

pub fn with_dcas(self, dcas: bool) -> Self

Source

pub fn with_dtas(self, dtas: bool) -> Self

Source

pub fn with_lacs(self, lacs: bool) -> Self

Source

pub fn with_tacs(self, tacs: bool) -> Self

Source

pub fn with_atn(self, atn: bool) -> Self

Source

pub fn with_cic(self, cic: bool) -> Self

Source

pub fn with_rem(self, rem: bool) -> Self

Source

pub fn with_lok(self, lok: bool) -> Self

Source

pub fn with_cmpl(self, cmpl: bool) -> Self

Source

pub fn with_event(self, event: bool) -> Self

Source

pub fn with_spoll(self, spoll: bool) -> Self

Source

pub fn with_rqs(self, rqs: bool) -> Self

Source

pub fn with_srqi(self, srqi: bool) -> Self

Source

pub fn with_end(self, end: bool) -> Self

Source

pub fn with_timo(self, timo: bool) -> Self

Source

pub fn with_err(self, err: bool) -> Self

Trait Implementations§

Source§

impl Debug for IbStatus

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for IbStatus

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Display for IbStatus

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
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.