pub struct CanFrame {
pub id: u32,
pub dlc: u8,
pub data: [u8; 8],
pub rtr: bool,
pub ide: bool,
pub reserved0: bool,
pub reserved1: bool,
}Expand description
A low level representation of the frames that might be sent and received on a CAN bus.
This struct can represent any CAN frame, as described in the CAN specification version 2.0, published September 1991 by Bosch GmbH. They can be used for either transmission or reception.
Fields§
§id: u32This contains either the Base Identifier or the Extended Identifier, depending on ide.
dlc: u8Number of bytes in the payload.
data: [u8; 8]The frame’s data payload, only the first dlc bytes are valid.
rtr: boolTrue iff this frame is a Remote Transmission Request.
ide: boolTrue iff the id field is extended (ie 29 bits long, as opposed to 11).
reserved0: boolAt 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.
reserved1: boolAt 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.