Struct socketcan::CANFrame [] [src]

pub struct CANFrame {
    // some fields omitted
}

CANFrame

Uses the same memory layout as the underlying kernel struct for performance reasons.

Methods

impl CANFrame
[src]

fn new(id: u32, data: &[u8], rtr: bool, err: bool) -> Result<CANFrameConstructionError>

fn id(&self) -> u32

Return the actual CAN ID (without EFF/RTR/ERR flags)

fn err(&self) -> u32

Return the error message

fn is_extended(&self) -> bool

Check if frame uses 29 bit extended frame format

fn is_error(&self) -> bool

Check if frame is an error message

fn is_rtr(&self) -> bool

Check if frame is a remote transmission request

fn data(&self) -> &[u8]

A slice into the actual data. Slice will always be <= 8 bytes in length

Trait Implementations

impl Clone for CANFrame
[src]

fn clone(&self) -> CANFrame

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl Copy for CANFrame
[src]

impl Debug for CANFrame
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl UpperHex for CANFrame
[src]

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

Formats the value using the given formatter.