This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

如何获取can_frame中的can_id

通过 can socket编程的时候收到的can 帧是一个 can_frame的结构。想问下这个结构中的can_id对应到TMS570LS3137de DCAN口中是哪个值?

/**
 * struct can_frame - basic CAN frame structure
 * @can_id:  CAN ID of the frame and CAN_*_FLAG flags, see canid_t definition
 * @can_dlc: frame payload length in byte (0 .. 8) aka data length code
 *           N.B. the DLC field from ISO 11898-1 Chapter 8.4.2.3 has a 1:1
 *           mapping of the 'data length code' to the real payload length
 * @data:    CAN frame payload (up to 8 byte)
 */
struct can_frame {
 canid_t can_id;  /* 32 bit CAN_ID + EFF/RTR/ERR flags */
 __u8    can_dlc; /* frame payload length in byte (0 .. CAN_MAX_DLEN) */
 __u8    data[CAN_MAX_DLEN] __attribute__((aligned(8)));
};
---------------------