Expand description
CAN bus frames.
At the lowest level, libc defines the CAN frames as low-level structs that are binary compatible with the C data types sent to and from the kernel:
- can_frame The Classic CAN 2.0 frame with up to 8 bytes of data.
- canfd_frame The CAN Flexible Data Rate frame with up to 64 bytes of data.
The classic frame represents three possibilities:
CanDataFrame- A standard CAN frame that can contain up to 8 bytes of data.CanRemoteFrame- A CAN Remote frame which is meant to request a transmission by another node on the bus. It contain no data.CanErrorFrame- This is an incoming (only) frame that contains information about a problem on the bus or in the driver. Error frames can not be sent to the bus, but can be converted to standard Rust Error types.
Structs§
- CanData
Frame - The classic CAN 2.0 frame with up to 8-bytes of data.
- CanData
Frame Repr serde - Serialized form of a
CanDataFrame. - CanError
Frame - A SocketCAN error frame.
- CanError
Frame Repr serde - Serialized form of a
CanErrorFrame. - CanFd
Frame - The CAN flexible data rate frame with up to 64-bytes of data.
- CanFd
Frame Repr serde - Serialized form of a
CanFdFrame. - CanRemote
Frame - The classic CAN 2.0 remote request frame.
- CanRemote
Frame Repr serde - Serialized form of a
CanRemoteFrame.
Enums§
- CanAny
Frame - Any frame type.
- CanFrame
- The classic CAN 2.0 frame with up to 8-bytes of data.
- CanRaw
Frame - An FD socket can read a raw classic 2.0 or FD frame.
Traits§
Functions§
- can_
frame_ default - Creates a default C
can_frame. This initializes the entire structure to zeros. - canfd_
frame_ default - Creates a default C
canfd_frame. This initializes the entire structure to zeros.