编辑推荐: |
本文主要介绍了DBC文件格式相关内容。希望对你的学习有帮助。
本文来自于知乎,由火龙果软件Linda编辑,推荐。 |
|
1.简介
DBC文件描述了单个网络节点的通信信息。这些信息可以监测分析网络以及模拟网络节点。
2.基础定义
对象类型:
Network :

Node:

Message:

符号

关键字
BU_ 网络节点
BO_ 消息、报文
SG_ 信号
EV_ 环境变量
语法:

3.DBC文件结构
DBC文件由以下部分构成:
Bit_timing
波特率定义,必须部分,但通常为空
nodes
定义网络节点
messages
定义消息和信号
以下部分一般DBC中不使用,它们被定义仅仅是为了保证文件的完整性:
· signal_types
· sigtype_attr_list
· category_definitions
· categories
· filter
· signal_type_refs
· signal_extended_value_type_list
4.Version和New Symbol定义
DBC文件头部包括‘version’和‘new symbol‘定义. 'version'为空或由用户定义的string.

5.Bit Timing定义
波特率定义,此部分已弃置不再使用,但关键字'BS_:'必须保留

6.Node定义
定义网络中的节点,节点名称必须唯一,节点之间由空格分割

7 Value Table 定义
value table部分定义了全局信号值表('VAL_TABLE_'),用来对信号值解码。但通常DBC中不使用全局信号值表,而是使用单独为某个信号定义的信号值描述('VAL_')。

8 Message 定义
消息帧定义。message_id和message_name必须是唯一的,message_size为消息长度,transmitter
指消息发送节点,如果message没有指定发送节点,则必须命名为Vector__XXX’。

8.1 Signal 定义
消息的信号部分列出了此消息包含的所有信号,定义了信号在消息数据域中的位置和属性。


原始值和物理值转化公式:

例:
SG_ Temperature_Front : 47|6@0+ (0.5,15.5) [16|32]
"℃" GW

note:
multiplexer_indicator定义了该信号是一个正常信号,还是一个多路复用信号,此项可省略。

intel格式和motorola格式的区别:

8.2 Signal Value Descriptions
'VAL_'用于对信号值解码。

9 Environment Variable 定义
环境变量定义:

环境变量值描述:

10 Signal Type and Signal Group Definitions
signal_types用于定义多个信号的共同属性,通常不在DBC中使用。

Signal groups用于定义一个消息中的一组信号。信号组里的信号必须同时更新。

11 Comment Definitions
注释定义:

12 User Defined Attribute Definitions
用户定义属性。
12.1 Attribute Definitions
属性定义:

12.2 Attribute Values
属性值:

13 Examples
example 1:

example 2:

|