On 23/09/11 11:11, Damien R. wrote:
Hi,

I'm using socket can with the raw socket protocol and I receive messages
with a 11bits identifier (eg: 0x1C) but the can_id in the raw frame has
a size of 32bits. So, I have the following questions:
- How can I retrieve the 11bits identifier in the can_id ?
- Can you explain the meaning of each bit in the cand_id ?
- j1939 use a 29bits identifier, how can I retrieve the 29bits
identifier in the can_id ?

Sorry, I did not see the following part of the linux/can.h

/*
 * Controller Area Network Identifier structure
 *
 * bit 0-28     : CAN identifier (11/29 bit)
 * bit 29       : error frame flag (0 = data frame, 1 = error frame)
 * bit 30       : remote transmission request flag (1 = rtr frame)
 * bit 31       : frame format flag (0 = standard 11 bit, 1 = extended 29 bit)
 */
typedef __u32 canid_t;

So can someone explain how bits are arranged with a 11 bits identifier? Is it this 0...0 identifier or identifier 0...0 or something else?

Regards,
Damien R.

_______________________________________________
Socketcan-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-users

Reply via email to