can4linux - the Linux CAN driver
 All Data Structures Files Functions Variables Pages
Data Fields
canmsg_t Struct Reference

The CAN message structure. More...

Data Fields

int flags
 flags, indicating or controlling special message properties
 
int cob
 CAN object number, used in Full CAN.
 
unsigned long id
 
                      CAN message ID, 4 bytes

if in receive mode an id 0xFFFF.FFFF is received, the driver reports an internal or CAN controller error condition. More...

 
struct timeval timestamp
 time stamp for received messages
 
short int length
 number of bytes in the CAN message
 
unsigned char data [CAN_MSG_LENGTH]
 
data, 0...8 bytes for classic CAN

and 0...64 bytes for CAN FD extended data frames

 

Detailed Description

The CAN message structure.

Used for all data transfers between the application and the driver using read() or write().

For reporting errors the fields flags and id are used.

Field Documentation

unsigned long canmsg_t::id

                      CAN message ID, 4 bytes

if in receive mode an id 0xFFFF.FFFF is received, the driver reports an internal or CAN controller error condition.

In this case the flags field has to be evaluated.