Struct can_utils::CanFdFrame [] [src]

pub struct CanFdFrame {
    pub id: u32,
    pub data_length: u8,
    pub data: [u8; 64],
    pub ide: bool,
    pub edl: bool,
    pub brs: bool,
    pub esi: bool,
    pub reserved0: bool,
    pub reserved1: bool,
}

A low level representation of the frames that might be sent and received on a CAN FD bus.

This struct can represent any CAN FD frame, as described in the CAN FD specification version 1.0, published April 2012 by Bosch GmbH. They can be used for either transmission or reception.

Fields

This contains either the Base Identifier or the Extended Identifier, depending on ide.

Number of bytes in the payload.

Note

This is not the DLC field value, this is the number of bytes of payload in the frame, in CAN FD those are not the same thing, but the implementation of this HAL should hide that from you.

The frame's data payload, only the first data_length bytes are valid.

True iff the id field is extended (ie 29 bits long, as opposed to 11).

True iff this is a CAN FD format frame. Including it here to give implementations the option to use CanFdFrame for all traffic on the bus, if they so choose.

True iff the frame was sent with a switched bit rate.

True iff the sender is in FaultConfinementState::ErrorPassive (or possibly in BusOff).

At the time of this writing this field isn't specified, but it can be received as either value and subsequent protocols may end up using it.

At the time of this writing this field isn't specified, but it can be received as either value and subsequent protocols may end up using it.