DBC File Format Documentation
DBC File Format Documentation
Document Management
Revision History
Version Editor Description
1.0 of 2007-02-09 Qu Specification created
Table of contents
1 Introduction ..................................................................................................................1
6 Node Definitions...........................................................................................................3
1 Introduction
The DBC file describes the communication of a single CAN network. This informa-
tion is sufficient to monitor and analyze the network and to simulate nodes not
physically available (remaining bus simulation).
The DBC file can also be used to develop the communication software of an elec-
tronic control unit which shall be part of the CAN network. The functional behavior
of the ECU is not addressed by the DBC file.
2 General Definitions
The following general elements are used in this documentation:
unsigned_integer: an unsigned integer
signed_integer: a signed integer
double: a double precision float number
char_string: an arbitrary string consisting of any printable charac-
ters except double hyphens ('"').
C_identifier: a valid C_identifier. C_identifiers have to start with
am alpha character or an underscore and may further consist of
alpha-numeric characters and underscores.
C_identifier = (alpha_char | '_') {alpha_num_char | '_'}
BO_ Message
SG_ Signal
= A name on the left of the = is defined using the syntax on the right (syntax rule).
[…] The definitions within brackets are optional (zero or one occurrence).
(* … *) Comment.
DBC files describing the basic communication of a CAN network include the fol-
lowing sections:
• Bit_timing
This section is required but is normally empty.
• nodes
This section is required and defines the network nodes.
• messages
This section defines the messages and the signals.
The following sections aren't used in normal DBC files. They are defined here for
the sake of completeness only:
• signal_types
• sigtype_attr_list
• category_definitions
• categories
• filter
• signal_type_refs
• signal_extended_value_type_list
DBC files that describe the CAN communication and don't define any additional
data for system or remaining bus simulations don't include environment variables.
6 Node Definitions
The node section defines the names of all participating nodes The names defined
in this section have to be unique within this section.
nodes = 'BU_:' {node_name} ;
node_name = C_identifier ;
8 Message Definitions
The message section defines the names of all frames in the cluster as well as their
properties and the signals transferred on the frames.
messages = {message} ;
The message's CAN-ID. The CAN-ID has to be unique within the DBC file. If the
most significant bit of the CAN-ID is set, the ID is an extended CAN ID. The ex-
tended CAN ID can be determined by masking out the most significant bit with the
mask 0xCFFFFFFF.
message_name = C_identifier ;
The names defined in this section have to be unique within the set of messages.
message_size = unsigned_integer ;
The transmitter name specifies the name of the node transmitting the message.
The sender name has to be defined in the set of node names in the node section.
If the massage shall have no sender, the string 'Vector__XXX' has to be given
here.
The names defined here have to be unique for the signals of a single message.
The multiplexer indicator defines whether the signal is a normal signal, a multi-
plexer switch for multiplexed signals, or a multiplexed signal. A 'M' (uppercase)
character defines the signal as the multiplexer switch. Only one signal within a
single message can be the multiplexer switch. A 'm' (lowercase) character followed
by an unsigned integer defines the signal as being multiplexed by the multiplexer
switch. The multiplexed signal is transferred in the message if the switch value of
the multiplexer signal is equal to its multiplexer_switch_value.
start_bit = unsigned_integer ;
The start_bit value specifies the position of the signal within the data field of the
frame. For signals with byte order Intel (little endian) the position of the least-
significant bit is given. For signals with byte order Motorola (big endian) the posi-
tion of the most significant bit is given. The bits are counted in a sawtooth manner.
The startbit has to be in the range of 0 to (8 * message_size - 1).
signal_size = unsigned_integer ;
The byte_format is 0 if the signal's byte order is Intel (little endian) or 1 if the byte
order is Motorola (big endian).
value_type = '+' | '-' ; (* +=unsigned, -=signed *)
The value_type defines the signal as being of type unsigned (-) or signed (-).
factor = double ;
offset = double ;
The factor and offset define the linear conversion rule to convert the signals raw
value into the signal's physical value and vice versa:
physical_value = raw_value * factor + offset
raw_value = (physical_value – offset) / factor
As can be seen in the conversion rule formulas the factor must not be 0.
minimum = double ;
maximum = double ;
The minimum and maximum define the range of valid physical values of the signal.
unit = char_string ;
receiver = node_name | 'Vector__XXX' ;
The receiver name specifies the receiver of the signal. The receiver name has to
be defined in the set of node names in the node section. If the signal shall have no
receiver, the string 'Vector__XXX' has to be given here.
Signals with value types 'float' and 'double' have additional entries in the sig-
nal_valtype_list section.
The entries in the environment variables data section define the environments
listed here as being of the data type "Data". Environment variables of this type can
store an arbitrary binary data of the given length. The length is given in bytes.
environment_variables_data = environment_variable_data ;
signal_type_refs = {signal_type_ref} ;
signal_type_ref = 'SGTYPE_' message_id signal_name ':' sig-
nal_type_name ';' ;
Signal groups are used to define a group of signals within a messages, e.g. to de-
fine that the signals of a group have to be updated in common.
signal_groups = 'SIG_GROUP_' message_id signal_group_name repeti-
tions ':' { signal_name } ';' ;
signal_group_name = C_identifier ;
repetitions = unsigned_integer ;
11 Comment Definitions
The comment section contains the object comments. For each object having a
comment, an entry with the object's type identification is defined in this section.
comments = {comment} ;
comment = 'CM_' (char_string |
'BU_' node_name char_string |
'BO_' message_id char_string |
'SG_' message_id signal_name char_string |
'EV_' env_var_name char_string)
';' ;
attribute_defaults = { attribute_default } ;
attribute_default = 'BA_DEF_DEF_' attribute_name attribute_value
';' ;
attribute_value = unsigned_integer | signed_integer | double |
char_string ;
13 Examples
VERSION ""
NS_ :
NS_DESC_
CM_
BA_DEF_
BA_
VAL_
CAT_DEF_
CAT_
FILTER
BA_DEF_DEF_
EV_DATA_
ENVVAR_DATA_
SGTYPE_
SGTYPE_VAL_
BA_DEF_SGTYPE_
BA_SGTYPE_
SIG_TYPE_REF_
VAL_TABLE_
SIG_GROUP_
SIG_VALTYPE_
SIGTYPE_VALTYPE_
BO_TX_BU_
BA_DEF_REL_
BA_REL_
BA_DEF_DEF_REL_
BU_SG_REL_
BU_EV_REL_
BU_BO_REL_
BS_: