pub struct Frame {
pub can_id: u32,
pub can_dlc: u8,
pub channel: u8,
pub data: Vec<u8>,
pub ext: bool,
pub fd: bool,
pub brs: bool,
pub esi: bool,
pub loopback: bool,
pub err: bool,
pub rtr: bool,
pub timestamp: Option<Duration>,
}
Expand description
Controller Area Network Frame
Fields§
§can_id: u32
CAN frame arbitration ID.
can_dlc: u8
CAN frame Data Length Code (DLC).
channel: u8
Device channel used to send or receive the frame.
data: Vec<u8>
Frame data contents.
ext: bool
Extended (29 bit) arbitration identifier if true, standard (11 bit) arbitration identifer if false.
fd: bool
CAN Flexible Data (CAN-FD) frame flag.
brs: bool
CAN-FD Bit Rate Switch (BRS) flag.
esi: bool
CAN-FD Error State Indicator (ESI) flag.
loopback: bool
Loopback flag. When true, frame was sent by this device/channel. False for received frames.
err: bool
Error frame flag.
rtr: bool
Remote Transmission Request (RTR) flag.
timestamp: Option<Duration>
Timestamp when frame was received
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnwindSafe for Frame
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