咱们测试的时候都是直接拿到别人给的DBC就使用了, 可是若是没有数据库文件,怎样建立一个DBC呢?node
方法1.XLS2DBC数据库
一般状况下,咱们能够拿到通讯矩阵。这时能够先整理好通讯矩阵的表格格式,再经过网上提供的一些工具直接转换成DBC,此处很少讲。若是本身具有编码能力,也能够本身去写转换工具实现这个功能。app
它也支持单独打开,安装目录下\Vector CANoe 10.0\Exec32\CANdb.exedom
-----------------------分割线-------------------------工具
在开始讲解DBC的建立以前,先说一下基本知识点测试
在CAN数据库中的信号能够定义为intel或motorola处理器的字节序,它用来区分消息中信号的字节排序状况。this
Byte order for Motorola processors (Big Endian)编码
Byte order for Intel processors (Little Endian)spa
Bit significance (Bit Order)3d
Within a byte the significance of bits is the same in both formats
msb: most significant bit; lsb: least significant bit
Bit Indication
The bits of a message have following indices:
(1) Bit indexing in the byte from the right to the left
Transmitting a message with 8 byte length on the bus, bit 7 (most significant bit of byte 0) will be transmitted first, followed by bit 6. Bit 56 (least significant bit of byte 7) will be transmitted at last.
(2) Bit indexing in the byte from the left to the right – inverted or sequential bit indexing
Transmitting a message with 8 byte length on the bus, bit 0 (most significant bit of byte 0) will be transmitted first, followed by bit 1. Bit 63 (least significant bit of byte 7) will be transmitted at last.
注意:此处的对象在第3点会描述这些对象的属性
(1) 如下对象的命名需遵循C语言标识符的命名规则
必须字母或下划线开头,以后能够包含字母/字符/下划线等.
(2) 如下对象的命名不受约束
整体分为如下5类,分别是DBC数据库中的各个对象下的一些属性,这些属性的定义了它们能用在Vector的哪些工具链中。
general attributes, which cannot be ordered to any application domain.
attributes describing the transmit and receive behavior of messages and signals.
此处简单描述几个属于此分类下的属性
GenMsgCycleTime | |
---|---|
Object Type: |
Message |
Value Type: |
Int |
Unit: |
[ms] |
Default Value: |
0 |
Valid Values: |
>= 0 |
Description: |
Defines the fixed periodicity for cyclic message transmissions. |
Object Type: |
Signal |
---|---|
Value Type: |
Int |
Unit: |
|
Default Value: |
0 |
Valid Values: |
|
Description: |
Defines the start or initial value of the signal. This value is send after system start-up until the application sets the signal value the first time. The signals start value is given as a signals raw value in this attribute. |
attributes for the configuration and the behavior of the ISO/DIS transport protocol for CAN and the diagnostics of ECUs.
attributes for the configuration and the behavior of the OSEK network management of a CAN network.
attributes used for the configuration of Vector tools
-----------------------分割线-------------------------
未完待续,下篇继续多图展现一步步建立DBC