Enum CntCount

Source
pub enum CntCount {
    Cnt1Bit24(i32),
    Cnt2Bit24(i32, i32),
    Cnt1Bit48(i64),
    Cnt1Bit16(i16),
    Cnt1Bit32(i32),
    Cnt2Bit32Bit16(i16, i32),
    Cnt2Bit16(i16, i16),
    Cnt3Bit16(i16, i16, i16),
}
Expand description

Represent the counter values for different configurations of the iC-MD quadrature counter.

If more than one counter value is present, the counter values are always in the order of Counter 0, Counter 1, and Counter 2. Note: The size of the returned value depends on the configuration of the counter!

Variants§

§

Cnt1Bit24(i32)

Counter return value for configuration counter 0 = 24 bit; 1 counter; TTL, RS422, or LVDS

§

Cnt2Bit24(i32, i32)

Counter return value for configuration counter 0 = 24 bit and Counter 1 = 24 bit; 2 counters; TTL only

§

Cnt1Bit48(i64)

Counter return value for configuration counter 0 = 48 bit; 1 counter; TTL, RS422, or LVDS

§

Cnt1Bit16(i16)

Counter return value for configuration counter 0 = 16 bit; 1 counter; TTL, RS422, or LVDS

§

Cnt1Bit32(i32)

Counter return value for configuration counter 0 = 32 bit; 1 counter; TTL, RS422, or LVDS

§

Cnt2Bit32Bit16(i16, i32)

Counter return value for configuration counter 0 = 32 bit and Counter 1 = 16 bit; 2 counters; TTL only

§

Cnt2Bit16(i16, i16)

Counter return value for configuration counter 0 = 16 bit and Counter 1 = 16 bit; 2 counters; TTL only

§

Cnt3Bit16(i16, i16, i16)

Counter return value for configuration counter 0 = 16 bit, Counter 1 = 16 bit, and Counter 2 = 16 bit; 3 counters; TTL only

Implementations§

Source§

impl CntCount

Source

pub fn get_cnt0(&self) -> Option<i64>

Get the value of the counter zero

If it exists, this will return Some(value). Otherwise it will return None. For counter zero, this will always exist, as it is always configured.

Source

pub fn get_cnt1(&self) -> Option<i64>

Get the value of the counter one

If it exists, this will return Some(value). Otherwise it will return None.

Source

pub fn get_cnt2(&self) -> Option<i64>

Get the value of counter two.

If it exists, this will return Some(value). Otherwise it will return None.

Trait Implementations§

Source§

impl Debug for CntCount

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