- 添加NV Item
- 0^"NVItem01"^"0"^3
- 0:Item ID
- NVItem01: item的名字
- 0:Item对应的item Category的ID 【NVCategory.txt】
- 3:Item对应的Description中的ID 【Description.txt】
- 0^"NVItem01"^"0"^3
- Parse/Display各项的解释
- Name:显示该项名称
- Item type:该域提供Item所有的数据类型以供选择
- Item ID:该域显示各种数据中的ID域(索引项),如log的索引项是一个HEX值,subsystem request/response使用subsystem dispatch ID和code(以前向斜杠来分隔)来区分。
- Table 3-1: Item Types and their Identifiers
+-------------------------+---------------------+------------+--------------------------------+
|Item type |ID format |Example |Description |
+-------------------------+---------------------+------------+--------------------------------+
|Diag requests |Command code |82 |Synchronous Diagnostic command |
+-------------------------+---------------------+------------+--------------------------------+
|Diag responses |Command code 82 |Synchronous |Diagnostic command |
+-------------------------+---------------------+------------+--------------------------------+
|Subsystem requests |Subsystem dispatch |4/10 |Subsystem Dispatch command (75) |
| |ID/code | | |
+-------------------------+---------------------+------------+--------------------------------+
|Subsystem responses |Subsystem dispatch |4/10 |Subsystem Dispatch command (75) |
| |ID/code | | |
+-------------------------+---------------------+------------+--------------------------------+
|Events |Event ID |2052 |Diagnostic event |
+-------------------------+---------------------+------------+--------------------------------+
|Logs |Log code |0x1234 |Asynchronous Diagnostic log (16)|
+-------------------------+---------------------+------------+--------------------------------+
|NV items |NV item ID |4177 |Nonvolatile memory item |
+-------------------------+---------------------+------------+--------------------------------+
|Subsystem V2 requests |Subsystem dispatch |16/2 |Subsystem Dispatch command (128)|
| |ID/code | | |
+-------------------------+---------------------+------------+--------------------------------+
|Subsystem V2 immediate |Subsystem dispatch |16/2 |Subsystem Dispatch command (128)|
|responses |ID/Code | | |
+-------------------------+---------------------+------------+--------------------------------+
|Subsystem V2 delayed |Subsystem dispatch |16/2 |Subsystem Dispatch command (128)|
|responses |ID/code | | |
+-------------------------+---------------------+------------+--------------------------------+
- Table 3-1: Item Types and their Identifiers
- ROOT ID
- ROOT ID是Diag项唯一的识别域,如果两个Diag项使用相同的包定义内容,请选择同一个ROOT ID,缺省的,这个项会自动生成。
- MSB -> LSB 顺序checkbox
- 该项被选中如果diag项的Bit顺序是从MSB(最高有效位,Bit 7或0x80)到LSB(最低有效位,Bit 0或者0x0),缺省的顺序是从LSB -> MSB
- Internal checkbox
- 如果该Diag项是内部使用的
- Packet Fields
- Packet Field用来显示各项定义中的各个位的含义
- NEW, EDIT, DELETE用来在Packet项上添加,修改和删除一个位
- MOVE UP和MOVE DOWN用例改变各位的相对位置
- 在选择一个段后点击“TO FORMAT SPEC”,可以自动生成格式化字符串(如何显示当前字段)和参数(当前字段的值)
- Packet Field用来显示各项定义中的各个位的含义
- 浏览,创建和编辑一个字段(Packet Field Properties)
- Name
- 这个段存放一个和相关域相联系的名称,处理struct(结构),其他的域都需要一个名称
- Type
- 类型段提供一个下拉列表,其中存放所有QXDM支持的基本类型,包括结构,枚举,字符串和pad,如果枚举类型被选中,则ENUM ID段和编辑ENUM按钮会被激活,见下表所示所有支持的域。
- 当定义中含有变长域和/或可选域的情况下,Pad域用来保存包的最小的长度,正确使用的办法是在各段之后加。
- Table 3-2 Supported Field Types
+---------------------------------+---------------------------------------------------------+
|Type | Description |
+---------------------------------+---------------------------------------------------------+
|bool | Boolean (true/false) |
+---------------------------------+---------------------------------------------------------+
|int8 | 8-bit signed integer |
+---------------------------------+---------------------------------------------------------+
|uint8 | 8-bit unsigned integer |
+---------------------------------+---------------------------------------------------------+
|int16 | 16-bit signed integer |
+---------------------------------+---------------------------------------------------------+
|uint16 | 16-bit unsigned integer |
+---------------------------------+---------------------------------------------------------+
|int32 | 32-bit signed integer |
+---------------------------------+---------------------------------------------------------+
|uint32 | 32-bit unsigned integer |
+---------------------------------+---------------------------------------------------------+
|int64 | 64-bit signed integer |
+---------------------------------+---------------------------------------------------------+
|uint64 | 64-bit unsigned integer |
+---------------------------------+---------------------------------------------------------+
|char[] | Fixed length character array |
+---------------------------------+---------------------------------------------------------+
|wchar[] | Fixed length Unicode character array |
+---------------------------------+---------------------------------------------------------+
|string | Null-terminated character string |
+---------------------------------+---------------------------------------------------------+
|wstring | Null-terminated Unicode character string |
+---------------------------------+---------------------------------------------------------+
|enum | Signed enumeration |
+---------------------------------+---------------------------------------------------------+
|uenum | Unsigned enumeration |
+---------------------------------+---------------------------------------------------------+
|struct | Nested structure. |
+---------------------------------+---------------------------------------------------------+
|pad – Const padding | Constant padding specified in bits |
+---------------------------------+---------------------------------------------------------+
|pad – Variable padding in bits | Variable padding specified in bits by a preceding field |
+---------------------------------+---------------------------------------------------------+
|pad – Variable padding in bytes | Variable padding specified in bytes by a preceding field|
+---------------------------------+---------------------------------------------------------+
|pad – Pad to byte boundary | Pad the current structure to the next full byte boundary|
+---------------------------------+---------------------------------------------------------+
- Field ID
- Field ID对应于当前段的内部标识符,对应新段,值是<New>,会自动生成一个,Field ID典型的用途是当多个Diagram项中含有相同的结构或段时,该field可以复用。
- Size
- Size域开始时是选择的类型的缺省的大小,可以根据域的特性调整成为支持任意比特长度。
- Enum ID
- 两种类型:Signed 或Unsigned Enum 类型支持这个域,并可以用旁边的按钮编辑。
- Edit Enum
- 编辑Enum
- Order
- 对于struct,有一个order的选项来指定他的内容的bit顺序。bit顺序可以从他的父结构继承,可以是MSB -> LSB或LSB->MSB
- Hex display
- 对于signed的或unsigned的integer字段(int8, uint8, int16, uint16, int32, uint32, int64, uint64),点击HEX可以以HEX值来显示
- Description
- 用来描述选中的字段
- offset
- 用来指定段的起始位置,一般留空,自动计算出位置和字段大小。
- Repeat
- 你可以指定一个段的重复频率,从下面表格中选出一项
- Repeat Types
+------------------------------------+---------------------------------------------------------------------+
|Repeat Type |Description |
+------------------------------------+---------------------------------------------------------------------+
|Single instance |一个段只存在一次 |
+------------------------------------+---------------------------------------------------------------------+
|Zero or one instance (optional) |一个段是否存在取决于其他段的值,当选中时,必须要提供一个条件语句。 |
|based on another Field |第一个值必须是一个段,另外一个值可以是段或者一个常数,操作符在表 |
| |3-6中提供。 |
+------------------------------------+---------------------------------------------------------------------+
|Multiple instance with constant |一个段可以重复1次或多次,当选中时,重复的次数需要提供。 |
|count | |
+------------------------------------+---------------------------------------------------------------------+
|Multiple instance with variable |一个数组,他的大小取决于其他段,当选中时,那个决定大小的字段需要 |
|count based on another Field |指定(图3-14)。 |
+------------------------------------+---------------------------------------------------------------------+
|Multiple instance with array |一个数组,他的索引取决于其他两个字段的值,当选中时,取决索引的 |
|indices based on two other Fields |字段必须要提供(图3-16) |
+------------------------------------+---------------------------------------------------------------------+
|Multiple instance with variable |一个数组,他的大小取决于一个2元表达式在两个字段或一个字段+一个常数 |
|count derived from another Field |。当选中时,取决的字段必须提供(图3-17),第一个值必须是一个字段,第 |
| |二个可以是字段或常数,见表3-7 |
+------------------------------------+---------------------------------------------------------------------+ - 对于固定长度字符串(char[] - 字符数组,wchar[] - unicode字符数组),有三个额外的字符数组重复方式
- +-----------------------------------+----------------------------------------------------------+
|Repeat type |Description |
+-----------------------------------+----------------------------------------------------------+
|String with its length specified in|一个字符串的大小按bit由另外一个字段来指定,这个段需要在Field ID的 |
|bits by another field |combo-box中指定(图 3-18) |
+-----------------------------------+----------------------------------------------------------+
|String with its length specified in|一个字符串的大小按byte由另外一个字段来指定,这个段需要在Field ID的|
|bytes by another field |combo-box中指定(图 3-18) |
+-----------------------------------+----------------------------------------------------------+
|String with its character length |一个字符串的大小按byte由另外一个字段来指定,这个段需要在Field ID的|
|specified by another field |combo-box中指定(图 3-18) |
+-----------------------------------+----------------------------------------------------------+
- +-----------------------------------+----------------------------------------------------------+
- 操作符
-
布尔操作符
- Boolean operators
+---------+-------------------------------------------+
|Operator |Description |
+---------+-------------------------------------------+
|= |Field 1 equals Field 2 |
+---------+-------------------------------------------+
|!= |Field 1 does not equal Field 2 |
+---------+-------------------------------------------+
|< |Field 1 is less than Field 2 |
+---------+-------------------------------------------+
|<= |Field 1 is less than or equal to Field 2 |
+---------+-------------------------------------------+
|> |Field 1 is greater than Field 2 |
+---------+-------------------------------------------+
|>= |Field 1 is greater than or equal to Field 2|
+---------+-------------------------------------------+
- Boolean operators
-
二元操作符
-
Binary expression operators
+---------+-------------------------------------------------------+
|Operator |Description |
+---------+-------------------------------------------------------+
| + |Addition of Field 1 and Field 2 |
+---------+-------------------------------------------------------+
| – |Subtraction of Field 2 from Field 1 |
+---------+-------------------------------------------------------+
| * |Product of Field 1 and Field 2 |
+---------+-------------------------------------------------------+
| / |Field 1 divided by Field 2 |
+---------+-------------------------------------------------------+
| % |Modulus – Remainder when Field 1 is divided by Field 2 |
+---------+-------------------------------------------------------+
| min |The minimum of Field 1 and Field 2 |
+---------+-------------------------------------------------------+
| max |The maximum of Field 1 and Field 2 |
+---------+-------------------------------------------------------+
-
-
- 浏览,创建,修改枚举类型
- 创建一个Diag Request
- Description.txt添一条记录,用来记录包中俄子项的描述
- 6^"Add One uint8 item to a Diag Request"
- 6^"Add One uint8 item to a Diag Request"
- 添加一个新文件Diag.txt
- 0^"1"^"DiagReqEntity1"^0^0^0^-1^0^0
- 0^"1"^"DiagReqEntity1"^0^0^1^-1^0^0
- 0:
- 1:command code
- DiagRequestEntity1: 一个Diag Request的名称
- 0:Fragment ID
- 0:Fragment Spec ID
- 1:标记是否为internal
- -1:
- 0:
- 0:
- 0^"1"^"DiagReqEntity1"^0^0^0^-1^0^0
- 添加一个新文件:Field.txt
- 0^"DiagReqField_1"^8^0^2^0^6^0
- 0:Field ID
- DiagReqField_1:DiagRequest中的一个项的名称
- 8:size, in bits
- 0:
- 2:Type, 如2是unit8, 1是int8
- 0:"Hex Display" 没有设,设时为1
- 6:对应Description的项
- 0:“Internal”没有设,设时为1
- 0^"DiagReqField_1"^8^0^2^0^6^0
- 添加一个新文件:FormatSpecifier.txt
- 0^"DiagReqField 1 = %u"^"DiagReqField_1"
- 0:index
- DiagReqField 1 = %u"^"DiagReqField_1: 格式
- 0^"DiagReqField 1 = %u"^"DiagReqField_1"
- 添加一个新文件:Struct.txt
- 作为一个struct的field也放在这个文件中。
- 1^0^0^3^""^-1^0^""
- 1:
- 0:
- 0:
- 3: Field ID或者Struct ID,如果本身不是struct,该项为0
- "": Struct的名称,没有的时候是因为本身不是Struct,但有些项又要填到这个文件中
- -1: Offset
- 0: 重复方法的index
- "": 基于重复方法的重复的定义
- 添加一个新文件: FormatSpecifierEx.txt
- 0^"DiagReqEntity2.js"^"SummyTextFile"
- 0:Extended Format Specifier
- DiagReqEntity2.js: Full Parsered Text File
- SummyTextFile:Summy Text File
- 0^"DiagReqEntity2.js"^"SummyTextFile"
- 修改一项为Enum项
- 添加新文件Enum.txt
- 0^"EnumFieldDefinition"^11^0
- 0:Enum Index
- EnumFieldDefinition:Enum的名称
- 11: 对应Description的项
- 0:不知道
- 0^"EnumFieldDefinition"^11^0
- 添加新文件EnumEntry.txt
- 0^0^"EnumItem0"^-1
- 0:对应EnumEntry Index的号
- 0:Enum项内部的编号,就是本Enum的序列
- EnumItem0:本Enum的名称
- -1:不知道
- 0^0^"EnumItem0"^-1
- 修改了 Description.txt
- 添加了一项,和其他项没有不同
- 修改了Field.txt
- 对应的Field ID好像是0了
- 添加新文件Enum.txt
- Description.txt添一条记录,用来记录包中俄子项的描述
- Name
Parse/Display项
最新推荐文章于 2024-07-06 23:22:37 发布