BMRxFilter

Struct BMRxFilter 

Source
#[repr(C)]
pub struct BMRxFilter { pub kind: u8, pub unused: u8, pub flags_mask: u8, pub flags_value: u8, pub reserved: [u8; 4], pub id_mask: u32, pub id_value: u32, pub payload_mask: [u8; 8], pub payload_value: [u8; 8], }
Expand description

CAN channel RX filter item structure, used by super::api::BM_SetRxFilters The filter support masking ID, flags and payload according to its type, in order for a message to be accepted, all the fields are masked using AND logic: (flags & filter.flags_mask == filter.flags_value) AND (ID & filter.id_mask == filter.id_value) AND (payload & filter.payload_mask == filter.payload_value)

Fields§

§kind: u8

Type ID of the RX filter, see BMRxFilterType for details.

§unused: u8

Reserved

§flags_mask: u8

CAN message control Flags masks, see BMMessageFlags for details.

§flags_value: u8

CAN message control Flags values, see BMMessageFlags for details.

§reserved: [u8; 4]

Reserved

§id_mask: u32§id_value: u32

CAN message ID values, see BMMessageId for details.

§payload_mask: [u8; 8]

CAN message payload masks, for CAN-FD messages, only the first 8 bytes are checked.

§payload_value: [u8; 8]

CAN message payload values, for CAN-FD messages, only the first 8 bytes are checked.

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.