|
| 1 | +# Scope |
| 2 | +This document doesn't claim to specifiy the complete [Vector DBC standard](http://vector.com/vi_candb_en.html) |
| 3 | + |
| 4 | +# Format description |
| 5 | +`<...>`: Required field |
| 6 | +`[...]`: Optional field |
| 7 | +` | `: Or (eg. <A|B>) |
| 8 | + |
| 9 | +# Supported Keywords |
| 10 | +## VERSION |
| 11 | +Version identifier of the DBC file. |
| 12 | +Format: `VERSION "<VersionIdentifier>"` |
| 13 | + |
| 14 | +## BS_ |
| 15 | +Bus configuration. |
| 16 | +Format:: `BS_: <Speed>` |
| 17 | +Speed in kBit/s |
| 18 | + |
| 19 | +## BU_ |
| 20 | +List of all CAN-Nodes, seperated by whitespaces. |
| 21 | + |
| 22 | +## BO_ |
| 23 | +Message definition. |
| 24 | +Format: `BO_ <CAN-ID> <MessageName>: <MessageLength> <SendingNode>` |
| 25 | +MessageLength in bytes. |
| 26 | + |
| 27 | +## SG_ |
| 28 | +Signal definition. |
| 29 | +Format: `SG_ <SignalName> [M|m<MultiplexerIdentifier>] : <StartBit>|<Length>@<Endianness><Signed> (<Factor>,<Offset>) [<Min>|<Max>] "[Unit]" [ReceivingNodes]` |
| 30 | +Length in bits. |
| 31 | +Signed: + = unsigned; - = signed |
| 32 | +Endianness: 1 = little-endian, Intel; 0 = big-endian, Motorola |
| 33 | +M: If M than this signals contains a multiplexer identifier. |
| 34 | +MultiplexerIdentifier: Signal definition is only used if the value of the multiplexer signal equals to this value. |
| 35 | + |
| 36 | +## CM_ |
| 37 | +Description field. |
| 38 | +Format: `CM_ [<BU_|BO_|SG_> [CAN-ID] [SignalName]] "<DescriptionText>";` |
| 39 | + |
| 40 | +## BA_DEF_ |
| 41 | +Attribute definition. |
| 42 | +Format: `BA_DEF_ [BU_|BO_|SG_] "<AttributeName>" <DataType> [Config];` |
| 43 | + |
| 44 | +DataType | Description | Config format |
| 45 | +---------|---------------------|---------------- |
| 46 | +INT | integer | `<min> <max>` |
| 47 | +FLOAT | floating point | `<min> <max>` |
| 48 | +STRING | string | |
| 49 | +ENUM | enumeration | `"<Value0>","<Value1>"...` |
| 50 | + |
| 51 | +## BA_DEF_DEF_ |
| 52 | +Attribute default value |
| 53 | +Format: `BA_DEF_DEF_ "<AttributeName>" ["]<DefaultValue>["];` |
| 54 | + |
| 55 | +## BA_ |
| 56 | +Attribute |
| 57 | +Format: `BA_ "<AttributeName>" [BU_|BO_|SG_] [Node|CAN-ID] [SignalName] <AttributeValue>;` |
| 58 | + |
| 59 | +## VAL_ |
| 60 | +Value definitions for signals. |
| 61 | +Format: `VAL_ <CAN-ID> <SignalsName> <ValTableName|ValTableDefinition>;` |
| 62 | + |
| 63 | +## VAL_TABLE_ |
| 64 | +Value table definition for signals. |
| 65 | +Format: `VAL_TABLE_ <ValueTableName> <ValueTableDefinition>;` |
| 66 | +ValueTableDefinition: List of `IntValue "StringValue"` Pairs, seperated by whitespaces |
| 67 | + |
| 68 | +# Attributes |
| 69 | +In this sections are standard attributes used by [CANpy](https://github.com/stefanhoelzl/CANpy) defined. The attributes can be overwritten within a DBC file. |
| 70 | +## Message Attributes |
| 71 | + |
| 72 | +### GenMsgSendType |
| 73 | +Defines the send type of a message. |
| 74 | +Supported types: |
| 75 | +* cyclic |
| 76 | +* triggered |
| 77 | +* cyclicIfActive |
| 78 | +* cyclicAndTriggered |
| 79 | +* cyclicIfActiveAndTriggered |
| 80 | +* none |
| 81 | +Definition: `BA_DEF BO_ "GenMsgSendType" ENUM "cyclic","triggered","cyclicIfActive","cyclicAndTriggered","cyclicIfActiveAndTriggered","none"` |
| 82 | +Default: none |
| 83 | +Definition: `BA_DEF_DEF "GenMsgSendType" "none"` |
| 84 | + |
| 85 | +### GenMsgCycleTime |
| 86 | +Defines the cycle time of a message in ms. |
| 87 | +Definition: `BA_DEF BO_ "GenMsgCycleTime" INT 0 0` |
| 88 | +Default: 0 |
| 89 | +Definition: `BA_DEF_DEF "GenMsgCycleTime" 0` |
| 90 | + |
| 91 | +### GenMsgStartDelayTime |
| 92 | +Defines the allowed delay after startup this message must occure the first time in ms. |
| 93 | +Definition: `BA_DEF BO_ "GenMsgStartDelayTime" INT 0 0` |
| 94 | +Default: 0 (=GenMsgCycleTime) |
| 95 | +Definition: `BA_DEF_DEF "GenMsgStartDelayTime" 0` |
| 96 | + |
| 97 | +### GenMsgDelayTime |
| 98 | +Defines the allowed delay for a message in ms. |
| 99 | +Definition: `BA_DEF BO_ "GenMsgDelayTime" INT 0 0` |
| 100 | +Default: 0 |
| 101 | +Definition: `BA_DEF_DEF "GenMsgDelayTime" 0` |
| 102 | + |
| 103 | +## Signal Attributes |
| 104 | +### GenSigStartValue |
| 105 | +Defines the value as long as no value is set/received for this signal. |
| 106 | +Definition: `BA_DEF SG_ "GenSigStartValue" INT 0 0` |
| 107 | +Default: 0 |
| 108 | +Definition: `BA_DEF_DEF "GenSigStartValue" 0` |
| 109 | + |
| 110 | +# Sources |
| 111 | +http://pisnoop.s3.amazonaws.com/snoop_help_dbc.htm |
| 112 | +http://www.racelogic.co.uk/_downloads/vbox/Application_Notes/CAN%20Format%20for%20VBOXII%20and%20PRO%20v4.pdf |
| 113 | +https://hackage.haskell.org/package/ecu-0.0.8/src/src/j1939_utf8.dbc |
| 114 | +http://www.ingenieurbuerobecker.de/downloads/CANtool_Manual.pdf |
0 commit comments