pub struct BMTxMessageCtrl(/* private fields */);Expand description
Busmust TX CAN Message control fields. The first few fields (until FDF) are bit compatible with BMRxMessageCtrl.
Implementations§
Source§impl BMTxMessageCtrl
impl BMTxMessageCtrl
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
Trait Implementations§
Source§impl Clone for BMTxMessageCtrl
impl Clone for BMTxMessageCtrl
Source§fn clone(&self) -> BMTxMessageCtrl
fn clone(&self) -> BMTxMessageCtrl
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BMTxMessageCtrl
impl Debug for BMTxMessageCtrl
Source§impl From<BMTxMessageCtrl> for u32
impl From<BMTxMessageCtrl> for u32
Source§fn from(v: BMTxMessageCtrl) -> u32
fn from(v: BMTxMessageCtrl) -> u32
Converts to this type from the input type.
Source§impl From<u32> for BMTxMessageCtrl
impl From<u32> for BMTxMessageCtrl
impl Copy for BMTxMessageCtrl
Auto Trait Implementations§
impl Freeze for BMTxMessageCtrl
impl RefUnwindSafe for BMTxMessageCtrl
impl Send for BMTxMessageCtrl
impl Sync for BMTxMessageCtrl
impl Unpin for BMTxMessageCtrl
impl UnwindSafe for BMTxMessageCtrl
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more