Kvaser Linux CANLIB

Message Flags

The following flags can be returned from canRead() et al, or passed to canWrite(). Note that you can combine one or more flags, and you can also combine them with the flags below.

FlagValueMeaning
canMSG_RTR1Message is a remote request
canMSG_STD2Message has a standard (11-bit) identifier
canMSG_EXT4Message has a extended (29-bit) identifier
canMSG_WAKEUP8Message is a WAKEUP message (SWC hardware.)
canMSG_ERROR_FRAME32Message represents an error frame.

The following flags can be returned from canRead() et al, but cannot be passed to canWrite():

FlagValueMeaning
canMSG_NERR16NERR was active during the message (TJA1054 etc. hardware. See Note 4 below.)/tr>
canMSG_TXACK64Message is a TX ACK (meaning that the message was really sent)/tr>
canMSG_TXRQ128Message is a TX REQ (meaning that the message was transferred to the CAN controller)/tr>
canMSGERR_HW_OVERRUN512Hardware buffer overrun.
canMSGERR_SW_OVERRUN1024Software buffer overrun.
Note:
Other canMSG_xxx and canMSGERR_xxx flags are reserved and must be zero when calling canWrite().
Not all hardware platforms can detect the difference between hardware overruns and software overruns, so your application should test for both conditions. You can use the symbol canMSGERR_OVERRUN for this purpose.
All canMSG_xxx flags may be combined.
The NERR flag is set by the CAN transceiver when certain CAN bus wire faults occur, namely
  
1CANH wire interrupted
2CANL wire interrupted
3CANH short-circuited to battery
3aCANH short-circuited to VCC
4CANL short-circuited to ground
5CANH short-circuited to ground
6CANL short-circuited to battery
6aCANL short-circuited to VCC
7CANL and CANH mutually short-circuited

See the TJA1054 data sheet (available from Philips) for more detailed information.