Parse/Display项

  1. 添加NV Item
    1. 0^"NVItem01"^"0"^3
      1. 0:Item ID
      2. NVItem01: item的名字
      3. 0:Item对应的item Category的ID 【NVCategory.txt】
      4. 3:Item对应的Description中的ID 【Description.txt】
  2. Parse/Display各项的解释
    1. Name:显示该项名称
    2. Item type:该域提供Item所有的数据类型以供选择
    3. Item ID:该域显示各种数据中的ID域(索引项),如log的索引项是一个HEX值,subsystem request/response使用subsystem dispatch ID和code(以前向斜杠来分隔)来区分。
      1. 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              |            |                                |
        +-------------------------+---------------------+------------+--------------------------------+
    4. ROOT ID
      1. ROOT ID是Diag项唯一的识别域,如果两个Diag项使用相同的包定义内容,请选择同一个ROOT ID,缺省的,这个项会自动生成。
    5. MSB -> LSB 顺序checkbox
      1. 该项被选中如果diag项的Bit顺序是从MSB(最高有效位,Bit 7或0x80)到LSB(最低有效位,Bit 0或者0x0),缺省的顺序是从LSB -> MSB
    6. Internal checkbox
      1. 如果该Diag项是内部使用的
    7. Packet Fields
      1. Packet Field用来显示各项定义中的各个位的含义
        1. NEW, EDIT, DELETE用来在Packet项上添加,修改和删除一个位
        2. MOVE UP和MOVE DOWN用例改变各位的相对位置
        3. 在选择一个段后点击“TO FORMAT SPEC”,可以自动生成格式化字符串(如何显示当前字段)和参数(当前字段的值)
    8. 浏览,创建和编辑一个字段(Packet  Field Properties)
      1. Name
        1. 这个段存放一个和相关域相联系的名称,处理struct(结构),其他的域都需要一个名称
      2. Type
        1. 类型段提供一个下拉列表,其中存放所有QXDM支持的基本类型,包括结构,枚举,字符串和pad,如果枚举类型被选中,则ENUM ID段和编辑ENUM按钮会被激活,见下表所示所有支持的域。
        2. 当定义中含有变长域和/或可选域的情况下,Pad域用来保存包的最小的长度,正确使用的办法是在各段之后加。
        3. 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|
          +---------------------------------+---------------------------------------------------------+

      3. Field ID
        1. Field ID对应于当前段的内部标识符,对应新段,值是<New>,会自动生成一个,Field ID典型的用途是当多个Diagram项中含有相同的结构或段时,该field可以复用。
      4. Size
        1. Size域开始时是选择的类型的缺省的大小,可以根据域的特性调整成为支持任意比特长度。
      5. Enum ID
        1. 两种类型:Signed 或Unsigned Enum 类型支持这个域,并可以用旁边的按钮编辑。
      6. Edit Enum
        1. 编辑Enum
      7. Order
        1. 对于struct,有一个order的选项来指定他的内容的bit顺序。bit顺序可以从他的父结构继承,可以是MSB -> LSB或LSB->MSB
      8. Hex display
        1. 对于signed的或unsigned的integer字段(int8, uint8, int16, uint16, int32, uint32, int64, uint64),点击HEX可以以HEX值来显示
      9. Description
        1. 用来描述选中的字段
      10. offset
        1. 用来指定段的起始位置,一般留空,自动计算出位置和字段大小。
      11. Repeat
        1. 你可以指定一个段的重复频率,从下面表格中选出一项
        2. 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                                            |
          +------------------------------------+---------------------------------------------------------------------+
        3. 对于固定长度字符串(char[] - 字符数组,wchar[] - unicode字符数组),有三个额外的字符数组重复方式
          1. +-----------------------------------+----------------------------------------------------------+
            |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)                                  |
            +-----------------------------------+----------------------------------------------------------+


        4. 操作符
          1. 布尔操作符
            1. 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|
              +---------+-------------------------------------------+


          2. 二元操作符
            1. 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                     |
              +---------+-------------------------------------------------------+
      12. 浏览,创建,修改枚举类型
      13. 创建一个Diag Request
        1. Description.txt添一条记录,用来记录包中俄子项的描述
          1. 6^"Add One uint8 item to a Diag Request"
        2. 添加一个新文件Diag.txt
          1. 0^"1"^"DiagReqEntity1"^0^0^0^-1^0^0
          2. 0^"1"^"DiagReqEntity1"^0^0^1^-1^0^0
            1. 0:
            2. 1:command code
            3. DiagRequestEntity1: 一个Diag Request的名称
            4. 0:Fragment ID
            5. 0:Fragment Spec ID
            6. 1:标记是否为internal
            7. -1:
            8. 0:
            9. 0:
        3. 添加一个新文件:Field.txt
          1. 0^"DiagReqField_1"^8^0^2^0^6^0
            1. 0:Field ID
            2. DiagReqField_1:DiagRequest中的一个项的名称
            3. 8:size, in bits
            4. 0:
            5. 2:Type, 如2是unit8, 1是int8
            6. 0:"Hex Display" 没有设,设时为1
            7. 6:对应Description的项
            8. 0:“Internal”没有设,设时为1
        4. 添加一个新文件:FormatSpecifier.txt
          1. 0^"DiagReqField 1 = %u"^"DiagReqField_1"
            1. 0:index
            2. DiagReqField 1 = %u"^"DiagReqField_1: 格式
        5. 添加一个新文件:Struct.txt
          1. 作为一个struct的field也放在这个文件中。
          2. 1^0^0^3^""^-1^0^""
            1. 1: 
            2. 0: 
            3. 0:
            4. 3: Field ID或者Struct ID,如果本身不是struct,该项为0
            5. "": Struct的名称,没有的时候是因为本身不是Struct,但有些项又要填到这个文件中
            6. -1: Offset
            7. 0: 重复方法的index
            8. "": 基于重复方法的重复的定义
        6. 添加一个新文件: FormatSpecifierEx.txt
          1. 0^"DiagReqEntity2.js"^"SummyTextFile"
            1. 0:Extended Format Specifier
            2. DiagReqEntity2.js: Full Parsered Text File
            3. SummyTextFile:Summy Text File
        7. 修改一项为Enum项
          1. 添加新文件Enum.txt
            1. 0^"EnumFieldDefinition"^11^0
              1. 0:Enum Index
              2. EnumFieldDefinition:Enum的名称
              3. 11: 对应Description的项
              4. 0:不知道
          2. 添加新文件EnumEntry.txt
            1. 0^0^"EnumItem0"^-1
              1. 0:对应EnumEntry Index的号
              2. 0:Enum项内部的编号,就是本Enum的序列
              3. EnumItem0:本Enum的名称
              4. -1:不知道
          3. 修改了 Description.txt
            1. 添加了一项,和其他项没有不同
          4. 修改了Field.txt
            1. 对应的Field ID好像是0了
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值