Acrosser Technology AR-V6002FL User Manual page 64

Hide thumbs Also See for AR-V6002FL:
Table of Contents

Advertisement

u32
struct timeval timestamp;
i16
u8
} canmsg_t;
To transmit a CAN package, the programmer has to fill in the fields in the variable of
type canmsg_t and pass this canmsg_t variable as an argument to invoke the APIs. The
fields in CAN message are described below:
flags:
This field holds the information of message type. Programmers can set the message
type as:
1.
Standard Data Frame:
canmsg_t msg; // Declare a variable 'msg' of type 'canmsg_t'
msg.flags = 0; // Setting the flags field to 0 defines the 'msg' as an
2.
Remote Transmission Request in Standard Data Frame format
canmsg_t msg;
msg.flags = 0;
msg.flags = msg.flags | MSG_RTR; // Enable the RTR flag.
3.
Extended Data Frame:
canmsg_t msg;
msg.flags = 0 | MSG_EXT; // Setting the EXT flag in the 'flags' field
4.
Remote Transmission Request in Extended Data Frame format
canmsg_t msg;
msg.flags = 0 | MSG_EXT | MSG_RTR; // Enable the RTR flag.
cob:
This field is reserved for holding a message communication object number.
id:
CAN message ID.
timestamp:
id;
length;
data[8];
// ordinary standard data frame.
// Setting the flags field to 0 defines the 'msg' as an
// ordinary standard data frame.
// defines the 'msg' as an extended data frame.
64
Revision: 1.0

Advertisement

Table of Contents
loading

Table of Contents