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: u32CAN frame arbitration ID.
can_dlc: u8CAN frame Data Length Code (DLC).
channel: u8Device channel used to send or receive the frame.
data: Vec<u8>Frame data contents.
ext: boolExtended (29 bit) arbitration identifier if true, standard (11 bit) arbitration identifer if false.
fd: boolCAN Flexible Data (CAN-FD) frame flag.
brs: boolCAN-FD Bit Rate Switch (BRS) flag.
esi: boolCAN-FD Error State Indicator (ESI) flag.
loopback: boolLoopback flag. When true, frame was sent by this device/channel. False for received frames.
err: boolError frame flag.
rtr: boolRemote 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