BMRxMessageCtrl

Struct BMRxMessageCtrl 

Source
pub struct BMRxMessageCtrl(/* private fields */);
Expand description

Busmust RX CAN Message control fields. The first few fields (until FDF) are bit compatible with BMTxMessageCtrl.

Implementations§

Source§

impl BMRxMessageCtrl

Source

pub const fn new() -> Self

Source

pub fn set_dlc(&mut self, value: u8)

CAN message DLC(0-F), note this is not the message length

Bits: 0..4

Source

pub const fn with_dlc(self, value: u8) -> Self

CAN message DLC(0-F), note this is not the message length

Bits: 0..4

Source

pub const fn dlc(&self) -> u8

CAN message DLC(0-F), note this is not the message length

Bits: 0..4

Source

pub fn set_ide(&mut self, value: bool)

This message is an extended CAN message

Bits: 4..5

Source

pub const fn with_ide(self, value: bool) -> Self

This message is an extended CAN message

Bits: 4..5

Source

pub const fn ide(&self) -> bool

This message is an extended CAN message

Bits: 4..5

Source

pub fn set_rtr(&mut self, value: bool)

This message is a remote CAN message

Bits: 5..6

Source

pub const fn with_rtr(self, value: bool) -> Self

This message is a remote CAN message

Bits: 5..6

Source

pub const fn rtr(&self) -> bool

This message is a remote CAN message

Bits: 5..6

Source

pub fn set_brs(&mut self, value: bool)

This message requires CAN-FD bitrate switching

Bits: 6..7

Source

pub const fn with_brs(self, value: bool) -> Self

This message requires CAN-FD bitrate switching

Bits: 6..7

Source

pub const fn brs(&self) -> bool

This message requires CAN-FD bitrate switching

Bits: 6..7

Source

pub fn set_fdf(&mut self, value: bool)

This message is a CAN-FD CAN message

Bits: 7..8

Source

pub const fn with_fdf(self, value: bool) -> Self

This message is a CAN-FD CAN message

Bits: 7..8

Source

pub const fn fdf(&self) -> bool

This message is a CAN-FD CAN message

Bits: 7..8

Source

pub fn set_esi(&mut self, value: bool)

Reserved for gateways

Bits: 8..9

Source

pub const fn with_esi(self, value: bool) -> Self

Reserved for gateways

Bits: 8..9

Source

pub const fn esi(&self) -> bool

Reserved for gateways

Bits: 8..9

Source

pub fn set_reserved1(&mut self, value: u8)

Reserved

Bits: 9..11

Source

pub const fn with_reserved1(self, value: u8) -> Self

Reserved

Bits: 9..11

Source

pub const fn reserved1(&self) -> u8

Reserved

Bits: 9..11

Source

pub fn set_rx_filter(&mut self, value: u8)

By which RX filter the message was accepted

Bits: 11..16

Source

pub const fn with_rx_filter(self, value: u8) -> Self

By which RX filter the message was accepted

Bits: 11..16

Source

pub const fn rx_filter(&self) -> u8

By which RX filter the message was accepted

Bits: 11..16

Source

pub fn set_reserved2(&mut self, value: u16)

Reserved

Bits: 16..32

Source

pub const fn with_reserved2(self, value: u16) -> Self

Reserved

Bits: 16..32

Source

pub const fn reserved2(&self) -> u16

Reserved

Bits: 16..32

Trait Implementations§

Source§

impl Clone for BMRxMessageCtrl

Source§

fn clone(&self) -> BMRxMessageCtrl

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for BMRxMessageCtrl

Source§

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

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

impl From<BMRxMessageCtrl> for u32

Source§

fn from(v: BMRxMessageCtrl) -> u32

Converts to this type from the input type.
Source§

impl From<u32> for BMRxMessageCtrl

Source§

fn from(v: u32) -> Self

Converts to this type from the input type.
Source§

impl Copy for BMRxMessageCtrl

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.