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
impl BMRxMessageCtrl
pub const fn new() -> Self
Sourcepub fn set_dlc(&mut self, value: u8)
pub fn set_dlc(&mut self, value: u8)
CAN message DLC(0-F), note this is not the message length
Bits: 0..4
Sourcepub const fn with_dlc(self, value: u8) -> Self
pub const fn with_dlc(self, value: u8) -> Self
CAN message DLC(0-F), note this is not the message length
Bits: 0..4
Sourcepub const fn dlc(&self) -> u8
pub const fn dlc(&self) -> u8
CAN message DLC(0-F), note this is not the message length
Bits: 0..4
Sourcepub const fn with_ide(self, value: bool) -> Self
pub const fn with_ide(self, value: bool) -> Self
This message is an extended CAN message
Bits: 4..5
Sourcepub const fn with_rtr(self, value: bool) -> Self
pub const fn with_rtr(self, value: bool) -> Self
This message is a remote CAN message
Bits: 5..6
Sourcepub fn set_brs(&mut self, value: bool)
pub fn set_brs(&mut self, value: bool)
This message requires CAN-FD bitrate switching
Bits: 6..7
Sourcepub const fn with_brs(self, value: bool) -> Self
pub const fn with_brs(self, value: bool) -> Self
This message requires CAN-FD bitrate switching
Bits: 6..7
Sourcepub const fn with_fdf(self, value: bool) -> Self
pub const fn with_fdf(self, value: bool) -> Self
This message is a CAN-FD CAN message
Bits: 7..8
Sourcepub fn set_reserved1(&mut self, value: u8)
pub fn set_reserved1(&mut self, value: u8)
Reserved
Bits: 9..11
Sourcepub const fn with_reserved1(self, value: u8) -> Self
pub const fn with_reserved1(self, value: u8) -> Self
Reserved
Bits: 9..11
Sourcepub fn set_rx_filter(&mut self, value: u8)
pub fn set_rx_filter(&mut self, value: u8)
By which RX filter the message was accepted
Bits: 11..16
Sourcepub const fn with_rx_filter(self, value: u8) -> Self
pub const fn with_rx_filter(self, value: u8) -> Self
By which RX filter the message was accepted
Bits: 11..16
Sourcepub fn set_reserved2(&mut self, value: u16)
pub fn set_reserved2(&mut self, value: u16)
Reserved
Bits: 16..32
Sourcepub const fn with_reserved2(self, value: u16) -> Self
pub const fn with_reserved2(self, value: u16) -> Self
Reserved
Bits: 16..32
Trait Implementations§
Source§impl Clone for BMRxMessageCtrl
impl Clone for BMRxMessageCtrl
Source§fn clone(&self) -> BMRxMessageCtrl
fn clone(&self) -> BMRxMessageCtrl
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more