Search code examples
can-bus

Differentiate between RX and TX messages in a CAN DBC


I want to differentiate between rx and tx CAN-messages from a DBC but can't find any difference, when I open it with notebook. As anyone a idea if they can be identified in a DBC?


Solution

  • The DBC Format is described here and here.

    The sender is specified on the same line as the message definition like so:

    BO_ <CAN-ID> <MessageName>: <MessageLength> <SendingNode>
    

    While the receiver is specified on the signal line:

    SG_ <SignalName> [M|m<MultiplexerIdentifier>] : <StartBit>|<Length>@<Endianness><Signed> (<Factor>,<Offset>) [<Min>|<Max>] "[Unit]" [ReceivingNodes]
    

    So for the following definition, IO is the sending node while DBG is the receiving node (in other word this is a Tx-Message for IO and an Rx-Message for DBG):

    BO_ 500 IO_DEBUG: 4 IO
     SG_ IO_DEBUG_test_unsigned : 0|8@1+ (1,0) [0|0] "" DBG