Enum FieldSetValue

Source
pub enum FieldSetValue {
Show 14 variants CounterConfiguration(CounterConfiguration), ReadCntCfg0(ReadCntCfg0), ReadCntCfg1(ReadCntCfg1), ReadCntCfg2(ReadCntCfg2), ReadCntCfg3(ReadCntCfg3), ReadCntCfg4(ReadCntCfg4), ReadCntCfg5(ReadCntCfg5), ReadCntCfg6(ReadCntCfg6), ReadCntCfg7(ReadCntCfg7), ReferenceCounter(ReferenceCounter), InstructionByte(InstructionByte), Status0(Status0), Status1(Status1), Status2(Status2),
}
Expand description

Enum containing all possible field set types

Variants§

§

CounterConfiguration(CounterConfiguration)

Counter configuration The iC-MD can be configured for 1 up to 3 channels with counter lengths of 16 to 48 bits. Here, the counter configuration is selected as a u8 value. The higher-level driver takes care of converting from a meaningful configuration to the 8-bit value.

§

ReadCntCfg0(ReadCntCfg0)

Read the 24 bit counter configuration, 24+2 bits to read (4 bytes) This corresponds to counter configuration 0b000.

§

ReadCntCfg1(ReadCntCfg1)

Read the 24 bit, 2 counters configuration, 48+2 bits to read (7 bytes) This corresponds to counter configuration 0b001.

§

ReadCntCfg2(ReadCntCfg2)

Read the 48 bit counter register, 48+2 bits to read (7 bytes) This corresponds to counter configuration 0b010.

§

ReadCntCfg3(ReadCntCfg3)

Read the 16 bit counter configuration, 16+2 bits to read (3 bytes) This corresponds to counter configuration 0b011.

§

ReadCntCfg4(ReadCntCfg4)

Read the 32 bit counter configuration, 32+2 bits to read (5 bytes) This corresponds to counter configuration 0b100.

§

ReadCntCfg5(ReadCntCfg5)

Read the 32 bit and 16 bit counter configuration, 32+16+2 bits to read (7 bytes) This corresponds to counter configuration 0b101.

§

ReadCntCfg6(ReadCntCfg6)

Read the 16 bit and 16 bit counter configuration, 16+16+2 bits to read (5 bytes) This corresponds to counter configuration 0b110.

§

ReadCntCfg7(ReadCntCfg7)

Read the 3 x 16 bit counter configuration, 16+16+16+2 bits to read (7 bytes) This corresponds to counter configuration 0b111.

§

ReferenceCounter(ReferenceCounter)

Read the references registers 24 bits. TODO: It is unclear if this works, as I assume the address for reading is auto-incremented as when reading the data. This should be tested once the actual hardware setup is available with an encoder connected.

§

InstructionByte(InstructionByte)

Instruction byte (write only) Allows writing of the instruction bytes. When one of these bits is set to 1, the corresponding instruction is executed and the bit set back to zero, except in the case of Act0 and Act1, which remain set to the written value.

§

Status0(Status0)

Status0: Status of counter 0 Returns the status of counter 0 plus several other status bits. See also Status1 and Status2 for the other counters and more status bits.

§

Status1(Status1)

Status1: Status of counter 1 Returns the status of counter 1 plus several other status bits. See also Status0 and Status2 for the other counters and more status bits.

§

Status2(Status2)

Status2: Status of counter 2 Returns the status of counter 2 plus several other status bits. See also Status0 and Status1 for the other counters and more status bits.

Trait Implementations§

Source§

impl Debug for FieldSetValue

Source§

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

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

impl From<CounterConfiguration> for FieldSetValue

Source§

fn from(val: CounterConfiguration) -> Self

Converts to this type from the input type.
Source§

impl From<InstructionByte> for FieldSetValue

Source§

fn from(val: InstructionByte) -> Self

Converts to this type from the input type.
Source§

impl From<ReadCntCfg0> for FieldSetValue

Source§

fn from(val: ReadCntCfg0) -> Self

Converts to this type from the input type.
Source§

impl From<ReadCntCfg1> for FieldSetValue

Source§

fn from(val: ReadCntCfg1) -> Self

Converts to this type from the input type.
Source§

impl From<ReadCntCfg2> for FieldSetValue

Source§

fn from(val: ReadCntCfg2) -> Self

Converts to this type from the input type.
Source§

impl From<ReadCntCfg3> for FieldSetValue

Source§

fn from(val: ReadCntCfg3) -> Self

Converts to this type from the input type.
Source§

impl From<ReadCntCfg4> for FieldSetValue

Source§

fn from(val: ReadCntCfg4) -> Self

Converts to this type from the input type.
Source§

impl From<ReadCntCfg5> for FieldSetValue

Source§

fn from(val: ReadCntCfg5) -> Self

Converts to this type from the input type.
Source§

impl From<ReadCntCfg6> for FieldSetValue

Source§

fn from(val: ReadCntCfg6) -> Self

Converts to this type from the input type.
Source§

impl From<ReadCntCfg7> for FieldSetValue

Source§

fn from(val: ReadCntCfg7) -> Self

Converts to this type from the input type.
Source§

impl From<ReferenceCounter> for FieldSetValue

Source§

fn from(val: ReferenceCounter) -> Self

Converts to this type from the input type.
Source§

impl From<Status0> for FieldSetValue

Source§

fn from(val: Status0) -> Self

Converts to this type from the input type.
Source§

impl From<Status1> for FieldSetValue

Source§

fn from(val: Status1) -> Self

Converts to this type from the input type.
Source§

impl From<Status2> for FieldSetValue

Source§

fn from(val: Status2) -> Self

Converts to this type from the input type.

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.