odxtools 5.2.6__py3-none-any.whl → 5.3.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. odxtools/basicstructure.py +2 -2
  2. odxtools/cli/browse.py +18 -20
  3. odxtools/cli/dummy_sub_parser.py +3 -3
  4. odxtools/cli/main.py +1 -1
  5. odxtools/compumethods/compuscale.py +1 -2
  6. odxtools/compumethods/createanycompumethod.py +0 -1
  7. odxtools/compumethods/identicalcompumethod.py +0 -2
  8. odxtools/compumethods/limit.py +1 -1
  9. odxtools/compumethods/linearcompumethod.py +1 -1
  10. odxtools/compumethods/scalelinearcompumethod.py +0 -1
  11. odxtools/compumethods/tabintpcompumethod.py +0 -1
  12. odxtools/determinenumberofitems.py +18 -0
  13. odxtools/diagdatadictionaryspec.py +14 -4
  14. odxtools/diaglayer.py +54 -59
  15. odxtools/dynamiclengthfield.py +59 -0
  16. odxtools/element.py +2 -4
  17. odxtools/endofpdufield.py +6 -77
  18. odxtools/field.py +94 -0
  19. odxtools/isotp_state_machine.py +20 -24
  20. odxtools/matchingparameter.py +1 -1
  21. odxtools/multiplexer.py +6 -18
  22. odxtools/multiplexercase.py +22 -6
  23. odxtools/multiplexerdefaultcase.py +10 -2
  24. odxtools/multiplexerswitchkey.py +8 -43
  25. odxtools/odxlink.py +8 -4
  26. odxtools/odxtypes.py +1 -1
  27. odxtools/parameters/codedconstparameter.py +4 -2
  28. odxtools/parameters/dynamicparameter.py +6 -4
  29. odxtools/parameters/lengthkeyparameter.py +8 -3
  30. odxtools/parameters/matchingrequestparameter.py +5 -3
  31. odxtools/parameters/nrcconstparameter.py +4 -2
  32. odxtools/parameters/parameter.py +21 -6
  33. odxtools/parameters/parameterwithdop.py +6 -1
  34. odxtools/parameters/physicalconstantparameter.py +4 -2
  35. odxtools/parameters/reservedparameter.py +4 -2
  36. odxtools/parameters/systemparameter.py +5 -3
  37. odxtools/parameters/tableentryparameter.py +5 -3
  38. odxtools/parameters/tablekeyparameter.py +8 -4
  39. odxtools/parameters/tablestructparameter.py +4 -2
  40. odxtools/parameters/valueparameter.py +5 -3
  41. odxtools/positioneddataobjectproperty.py +74 -0
  42. odxtools/progcode.py +2 -3
  43. odxtools/tablerow.py +1 -2
  44. odxtools/templates/macros/printAudience.xml.jinja2 +3 -9
  45. odxtools/templates/macros/printCompanyData.xml.jinja2 +4 -27
  46. odxtools/templates/macros/printComparam.xml.jinja2 +4 -18
  47. odxtools/templates/macros/printDOP.xml.jinja2 +3 -9
  48. odxtools/templates/macros/printDynamicLengthField.xml.jinja2 +22 -0
  49. odxtools/templates/macros/printElementID.xml.jinja2 +6 -6
  50. odxtools/templates/macros/printEndOfPdu.xml.jinja2 +3 -2
  51. odxtools/templates/macros/printEnvData.xml.jinja2 +2 -2
  52. odxtools/templates/macros/printEnvDataDesc.xml.jinja2 +3 -2
  53. odxtools/templates/macros/printFunctionalClass.xml.jinja2 +3 -9
  54. odxtools/templates/macros/printMux.xml.jinja2 +13 -6
  55. odxtools/templates/macros/printParam.xml.jinja2 +2 -7
  56. odxtools/templates/macros/printRequest.xml.jinja2 +2 -9
  57. odxtools/templates/macros/printResponse.xml.jinja2 +2 -9
  58. odxtools/templates/macros/printService.xml.jinja2 +2 -9
  59. odxtools/templates/macros/printSpecialData.xml.jinja2 +1 -1
  60. odxtools/templates/macros/printState.xml.jinja2 +3 -9
  61. odxtools/templates/macros/printStateChart.xml.jinja2 +2 -9
  62. odxtools/templates/macros/printStateTransition.xml.jinja2 +3 -9
  63. odxtools/templates/macros/printStructure.xml.jinja2 +2 -4
  64. odxtools/templates/macros/printTable.xml.jinja2 +2 -7
  65. odxtools/templates/macros/printUnitSpec.xml.jinja2 +3 -3
  66. odxtools/templates/macros/printVariant.xml.jinja2 +10 -9
  67. odxtools/version.py +4 -2
  68. {odxtools-5.2.6.dist-info → odxtools-5.3.1.dist-info}/METADATA +70 -13
  69. {odxtools-5.2.6.dist-info → odxtools-5.3.1.dist-info}/RECORD +73 -68
  70. {odxtools-5.2.6.dist-info → odxtools-5.3.1.dist-info}/LICENSE +0 -0
  71. {odxtools-5.2.6.dist-info → odxtools-5.3.1.dist-info}/WHEEL +0 -0
  72. {odxtools-5.2.6.dist-info → odxtools-5.3.1.dist-info}/entry_points.txt +0 -0
  73. {odxtools-5.2.6.dist-info → odxtools-5.3.1.dist-info}/top_level.txt +0 -0
@@ -3,6 +3,7 @@
3
3
  # SPDX-License-Identifier: MIT
4
4
  -#}
5
5
 
6
+ {%- import('macros/printElementID.xml.jinja2') as peid %}
6
7
  {%- import('macros/printDOP.xml.jinja2') as pdop %}
7
8
  {%- import('macros/printSpecialData.xml.jinja2') as psd %}
8
9
 
@@ -19,13 +20,7 @@
19
20
  {%- else %}
20
21
  <PARAM {{semattrib}} xsi:type="{{param.parameter_type}}">
21
22
  {%- endif%}
22
- <SHORT-NAME>{{param.short_name}}</SHORT-NAME>
23
- {%- if param.long_name %}
24
- <LONG-NAME>{{param.long_name|e}}</LONG-NAME>
25
- {%- endif %}
26
- {%- if param.description %}
27
- <DESC>{{param.description}}</DESC>
28
- {%- endif %}
23
+ {{ peid.printElementID(param)|indent(1) }}
29
24
  {{- psd.printSpecialDataGroups(param.sdgs)|indent(1, first=True) }}
30
25
  {%- if param.byte_position is not none %}
31
26
  <BYTE-POSITION>{{param.byte_position}}</BYTE-POSITION>
@@ -3,21 +3,14 @@
3
3
  # SPDX-License-Identifier: MIT
4
4
  -#}
5
5
 
6
+ {%- import('macros/printElementID.xml.jinja2') as peid %}
6
7
  {%- import('macros/printDOP.xml.jinja2') as pdop %}
7
8
  {%- import('macros/printParam.xml.jinja2') as pp %}
8
9
  {%- import('macros/printSpecialData.xml.jinja2') as psd %}
9
10
 
10
11
  {%- macro printRequest(request) -%}
11
12
  <REQUEST ID="{{request.odx_id.local_id}}">
12
- <SHORT-NAME>{{request.short_name}}</SHORT-NAME>
13
- {%- if request.long_name %}
14
- <LONG-NAME>{{request.long_name|e}}</LONG-NAME>
15
- {%- endif %}
16
- {%- if request.description and request.description.strip() %}
17
- <DESC>
18
- {{request.description}}
19
- </DESC>
20
- {%- endif %}
13
+ {{ peid.printElementID(request)|indent(1) }}
21
14
  {%- if request.parameters %}
22
15
  <PARAMS>
23
16
  {%- for param in request.parameters -%}
@@ -3,20 +3,13 @@
3
3
  # SPDX-License-Identifier: MIT
4
4
  -#}
5
5
 
6
+ {%- import('macros/printElementID.xml.jinja2') as peid %}
6
7
  {%- import('macros/printParam.xml.jinja2') as pp %}
7
8
  {%- import('macros/printSpecialData.xml.jinja2') as psd %}
8
9
 
9
10
  {%- macro printResponse(resp, tag_name="POS-RESPONSE") -%}
10
11
  <{{tag_name}} ID="{{resp.odx_id.local_id}}">
11
- <SHORT-NAME>{{resp.short_name}}</SHORT-NAME>
12
- {%- if resp.long_name %}
13
- <LONG-NAME>{{resp.long_name|e}}</LONG-NAME>
14
- {%- endif %}
15
- {%- if resp.description and resp.description.strip() %}
16
- <DESC>
17
- {{resp.description}}
18
- </DESC>
19
- {%- endif %}
12
+ {{ peid.printElementID(resp)|indent(1) }}
20
13
  {%- if resp.parameters %}
21
14
  <PARAMS>
22
15
  {%- for param in resp.parameters -%}
@@ -3,6 +3,7 @@
3
3
  # SPDX-License-Identifier: MIT
4
4
  -#}
5
5
 
6
+ {%- import('macros/printElementID.xml.jinja2') as peid %}
6
7
  {%- import('macros/printAdminData.xml.jinja2') as pad %}
7
8
  {%- import('macros/printAudience.xml.jinja2') as paud %}
8
9
  {%- import('macros/printSpecialData.xml.jinja2') as psd %}
@@ -14,15 +15,7 @@
14
15
  {%- set semattrib = " SEMANTIC=\"UNKNOWN\"" -%}
15
16
  {%- endif -%}
16
17
  <DIAG-SERVICE ID="{{service.odx_id.local_id}}" {{semattrib}}>
17
- <SHORT-NAME>{{service.short_name}}</SHORT-NAME>
18
- {%- if service.long_name and service.long_name.strip() %}
19
- <LONG-NAME>{{service.long_name|e}}</LONG-NAME>
20
- {%- endif %}
21
- {%- if service.description and service.description.strip() %}
22
- <DESC>
23
- {{service.description}}
24
- </DESC>
25
- {%- endif %}
18
+ {{ peid.printElementID(service)|indent(1) }}
26
19
  {%- if service.admin_data %}
27
20
  {{- pad.printAdminData(service.admin_data)|indent(1, first=True) }}
28
21
  {%- endif %}
@@ -18,7 +18,7 @@
18
18
 
19
19
  {%- macro printSdgCaption(sdg_caption) %}
20
20
  <SDG-CAPTION ID="{{sdg_caption.odx_id.local_id}}">
21
- {{ peid.printElementID(sdg_caption) | indent(1) }}
21
+ {{ peid.printElementID(sdg_caption)|indent(1) }}
22
22
  </SDG-CAPTION>
23
23
  {%- endmacro %}
24
24
 
@@ -3,16 +3,10 @@
3
3
  # SPDX-License-Identifier: MIT
4
4
  -#}
5
5
 
6
+ {%- import('macros/printElementID.xml.jinja2') as peid %}
7
+
6
8
  {%- macro printState(state) -%}
7
9
  <STATE ID="{{state.odx_id.local_id}}">
8
- <SHORT-NAME>{{state.short_name}}</SHORT-NAME>
9
- {%- if state.long_name %}
10
- <LONG-NAME>{{state.long_name}}</LONG-NAME>
11
- {%- endif %}
12
- {%- if state.description is string and state.description.strip() %}
13
- <DESC>
14
- {{state.description}}
15
- </DESC>
16
- {%- endif %}
10
+ {{ peid.printElementID(state)|indent(1) }}
17
11
  </STATE>
18
12
  {%- endmacro -%}
@@ -3,19 +3,13 @@
3
3
  # SPDX-License-Identifier: MIT
4
4
  -#}
5
5
 
6
+ {%- import('macros/printElementID.xml.jinja2') as peid %}
6
7
  {%- import('macros/printState.xml.jinja2') as ps %}
7
8
  {%- import('macros/printStateTransition.xml.jinja2') as pst %}
8
9
 
9
10
  {%- macro printStateChart(state_chart) -%}
10
11
  <STATE-CHART ID="{{state_chart.odx_id.local_id}}">
11
- <SHORT-NAME>{{state_chart.short_name}}</SHORT-NAME>
12
- {%- if state_chart.long_name %}
13
- <LONG-NAME>{{state_chart.long_name}}</LONG-NAME>
14
- {%- endif %}
15
- {%- if state_chart.description is string and state_chart.description.strip() %}
16
- <DESC>
17
- {{state_chart.description}}
18
- </DESC>
12
+ {{ peid.printElementID(state_chart)|indent(1) }}
19
13
  <SEMANTIC>{{state_chart.semantic}}</SEMANTIC>
20
14
  {%- if state_chart.state_transitions %}
21
15
  <STATE-TRANSITIONS>
@@ -32,6 +26,5 @@
32
26
  {%- endfor %}
33
27
  </STATES>
34
28
  {%- endif %}
35
- {%- endif %}
36
29
  </STATE-CHART>
37
30
  {%- endmacro -%}
@@ -3,17 +3,11 @@
3
3
  # SPDX-License-Identifier: MIT
4
4
  -#}
5
5
 
6
+ {%- import('macros/printElementID.xml.jinja2') as peid %}
7
+
6
8
  {%- macro printStateTransition(state_transition) -%}
7
9
  <STATE-TRANSITION ID="{{state_transition.odx_id.local_id}}">
8
- <SHORT-NAME>{{state_transition.short_name}}</SHORT-NAME>
9
- {%- if state_transition.long_name %}
10
- <LONG-NAME>{{state_transition.long_name}}</LONG-NAME>
11
- {%- endif %}
12
- {%- if state_transition.description is string and state_transition.description.strip() %}
13
- <DESC>
14
- {{state_transition.description}}
15
- </DESC>
16
- {%- endif %}
10
+ {{ peid.printElementID(state_transition)|indent(1) }}
17
11
  <SOURCE-SNREF SHORT-NAME="{{state_transition.source_snref}}" />
18
12
  <TARGET-SNREF SHORT-NAME="{{state_transition.target_snref}}" />
19
13
  </STATE-TRANSITION>
@@ -3,14 +3,12 @@
3
3
  # SPDX-License-Identifier: MIT
4
4
  -#}
5
5
 
6
+ {%- import('macros/printElementID.xml.jinja2') as peid %}
6
7
  {%- import('macros/printParam.xml.jinja2') as pp %}
7
8
 
8
9
  {%- macro printStructure(st) -%}
9
10
  <STRUCTURE ID="{{st.odx_id.local_id}}">
10
- <SHORT-NAME>{{st.short_name}}</SHORT-NAME>
11
- {%- if st.long_name %}
12
- <LONG-NAME>{{st.long_name|e}}</LONG-NAME>
13
- {%- endif %}
11
+ {{ peid.printElementID(st)|indent(1) }}
14
12
  {%- if st.byte_size is not none %}
15
13
  <BYTE-SIZE>{{st.byte_size}}</BYTE-SIZE>
16
14
  {%- endif %}
@@ -3,18 +3,13 @@
3
3
  # SPDX-License-Identifier: MIT
4
4
  -#}
5
5
 
6
+ {%- import('macros/printElementID.xml.jinja2') as peid %}
6
7
  {%- import('macros/printSpecialData.xml.jinja2') as psd %}
7
8
 
8
9
  {%- macro printTable(table) %}
9
10
  <TABLE ID="{{table.odx_id.local_id}}"
10
11
  {{-make_xml_attrib("SEMANTIC", table.semantic)}}>
11
- <SHORT-NAME>{{table.short_name}}</SHORT-NAME>
12
- {%- if table.long_name %}
13
- <LONG-NAME>{{table.long_name|e}}</LONG-NAME>
14
- {%- endif %}
15
- {%- if table.description %}
16
- <DESC>{{table.description}}</DESC>
17
- {%- endif %}
12
+ {{ peid.printElementID(table)|indent(1) }}
18
13
  {%- if table.key_dop_ref %}
19
14
  <KEY-DOP-REF ID-REF="{{ table.key_dop_ref.ref_id }}" />
20
15
  {%- endif %}
@@ -37,7 +37,7 @@
37
37
  {%- macro printUnit(unit) -%}
38
38
  <UNIT ID="{{unit.odx_id.local_id}}"
39
39
  {{-make_xml_attrib("OID", unit.oid)}}>
40
- {{ peid.printElementID(unit) }}
40
+ {{ peid.printElementID(unit)|indent(1) }}
41
41
  <DISPLAY-NAME>{{ unit.display_name }}</DISPLAY-NAME>
42
42
  {%- if unit.factor_si_to_unit is not none %}
43
43
  <FACTOR-SI-TO-UNIT>{{ unit.factor_si_to_unit }}</FACTOR-SI-TO-UNIT>
@@ -53,7 +53,7 @@
53
53
 
54
54
  {%- macro printUnitGroup(group) -%}
55
55
  <UNIT-GROUP {%- if group.oid %} OID="{{group.oid}}" {%- endif %}>
56
- {{ peid.printElementID(group) }}
56
+ {{ peid.printElementID(group)|indent(1) }}
57
57
  <CATEGORY>{{ group.category.value }}</CATEGORY>
58
58
  {%- if group.unit_refs %}
59
59
  <UNIT-REFS>
@@ -68,7 +68,7 @@
68
68
  {%- macro printPhysicalDimesion(dim) -%}
69
69
  <PHYSICAL-DIMENSION ID="{{dim.odx_id.local_id}}"
70
70
  {{-make_xml_attrib("OID",dim.oid)}}>
71
- {{ peid.printElementID(dim) }}
71
+ {{ peid.printElementID(dim)|indent(1) }}
72
72
  {%- if dim.length_exp %}
73
73
  <LENGTH-EXP>{{ dim.length_exp }}</LENGTH-EXP>
74
74
  {%- endif %}
@@ -3,11 +3,13 @@
3
3
  # SPDX-License-Identifier: MIT
4
4
  -#}
5
5
 
6
+ {%- import('macros/printElementID.xml.jinja2') as peid %}
6
7
  {%- import('macros/printDOP.xml.jinja2') as pdop %}
7
8
  {%- import('macros/printTable.xml.jinja2') as pt %}
8
9
  {%- import('macros/printFunctionalClass.xml.jinja2') as pfc %}
9
10
  {%- import('macros/printStructure.xml.jinja2') as pst %}
10
11
  {%- import('macros/printEndOfPdu.xml.jinja2') as peopdu %}
12
+ {%- import('macros/printDynamicLengthField.xml.jinja2') as pdlf %}
11
13
  {%- import('macros/printMux.xml.jinja2') as pm %}
12
14
  {%- import('macros/printEnvData.xml.jinja2') as ped %}
13
15
  {%- import('macros/printEnvDataDesc.xml.jinja2') as pedd %}
@@ -25,15 +27,7 @@
25
27
  {%- macro printVariant(dl) -%}
26
28
  {%- set dlr = dl.diag_layer_raw %}
27
29
  <{{dlr.variant_type.value}} ID="{{dlr.odx_id.local_id}}">
28
- <SHORT-NAME>{{dlr.short_name}}</SHORT-NAME>
29
- {%- if dlr.long_name %}
30
- <LONG-NAME>{{dlr.long_name|e}}</LONG-NAME>
31
- {%- endif %}
32
- {%- if dlr.description is string and dlr.description.strip() %}
33
- <DESC>
34
- {{dlr.description}}
35
- </DESC>
36
- {%- endif %}
30
+ {{ peid.printElementID(dlr)|indent(1) }}
37
31
  {%- if dlr.functional_classes %}
38
32
  <FUNCT-CLASSS>
39
33
  {%- for fc in dlr.functional_classes %}
@@ -72,6 +66,13 @@
72
66
  {%- endfor %}
73
67
  </STRUCTURES>
74
68
  {%- endif %}
69
+ {%- if ddds.dynamic_length_fields %}
70
+ <DYNAMIC-LENGTH-FIELDS>
71
+ {%- for dlf in ddds.dynamic_length_fields %}
72
+ {{ pdlf.printDynamicLengthField(dlf)|indent(3) }}
73
+ {%- endfor %}
74
+ </DYNAMIC-LENGTH-FIELDS>
75
+ {%- endif %}
75
76
  {%- if ddds.end_of_pdu_fields %}
76
77
  <END-OF-PDU-FIELDS>
77
78
  {%- for eopdu in ddds.end_of_pdu_fields %}
odxtools/version.py CHANGED
@@ -1,4 +1,6 @@
1
1
  # file generated by setuptools_scm
2
2
  # don't change, don't track in version control
3
- __version__ = version = '5.2.6'
4
- __version_tuple__ = version_tuple = (5, 2, 6)
3
+ from __future__ import annotations
4
+
5
+ __version__ = version = '5.3.1' # type: str
6
+ __version_tuple__ = version_tuple = (5, 3, 1) # type: tuple[int | str, ...]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odxtools
3
- Version: 5.2.6
3
+ Version: 5.3.1
4
4
  Summary: Utilities to work with the ODX standard for automotive diagnostics
5
5
  Author-email: Katrin Bauer <katrin.bauer@mbition.io>, Andreas Lauser <andreas.lauser@mbition.io>, Ayoub Kaanich <kayoub5@live.com>
6
6
  Maintainer-email: Andreas Lauser <andreas.lauser@mbition.io>, Ayoub Kaanich <kayoub5@live.com>
@@ -312,7 +312,7 @@ using `odxtools --help`:
312
312
 
313
313
  ```bash
314
314
  $ odxtools --help
315
- usage: odxtools [-h] [-c] {list,browse,snoop,find,encode-message,decode-message} ...
315
+ usage: odxtools [-h] [--version] {list,browse,snoop,find} ...
316
316
 
317
317
  Utilities to interact with automotive diagnostic descriptions based on the ODX standard.
318
318
 
@@ -323,20 +323,16 @@ Examples:
323
323
  odxtools browse ./path/to/database.pdx
324
324
 
325
325
  positional arguments:
326
- {list,browse,snoop,find,encode-message,decode-message}
326
+ {list,browse,snoop,find}
327
327
  Select a sub command
328
328
  list Print a summary of automotive diagnostic files.
329
329
  browse Interactively browse the content of automotive diagnostic files.
330
330
  snoop Live decoding of a diagnostic session.
331
331
  find Find & display services by hex-data, or name, can also decodes requests.
332
- encode-message Encode a message. Interactively asks for parameter values.
333
- This is a short cut through the browse command to directly encode a message.
334
- decode-message Decode a message. Interactively asks for parameter values.
335
- This is a short cut through the browse command to directly encode a message.
336
332
 
337
333
  optional arguments:
338
334
  -h, --help show this help message and exit
339
- -c, --conformant The input file fully confirms to the standard, i.e., disable work-arounds for bugs of the CANdela tool
335
+ --version Print the odxtools version
340
336
  ```
341
337
 
342
338
  All subcommands accept the `--help` parameter:
@@ -391,7 +387,7 @@ the `--all` parameter prints all data of the file that is recognized
391
387
  by `odxtools`. Example:
392
388
 
393
389
  ```bash
394
- $ odxtools --conformant list $BASE_DIR/odxtools/examples/somersault.pdx --variants somersault_lazy --services do_forward_flips --params
390
+ $ odxtools list $BASE_DIR/odxtools/examples/somersault.pdx --variants somersault_lazy --services do_forward_flips --params
395
391
  ECU-VARIANT 'somersault_lazy' (Receive ID: 0x7b, Send ID: 0x1c8)
396
392
  num services: 5, num DOPs: 6, num communication parameters: 11.
397
393
  The services of the ECU-VARIANT 'somersault_lazy' are:
@@ -451,7 +447,7 @@ navigate through the database of a `.pdx` file. For example, using the
451
447
  spamming the terminal:
452
448
 
453
449
  ```bash
454
- $ odxtools --conformant browse $BASE_DIR/odxtools/examples/somersault.pdx
450
+ $ odxtools browse $BASE_DIR/odxtools/examples/somersault.pdx
455
451
  ? Select a Variant. somersault_lazy
456
452
  ECU-VARIANT 'somersault_lazy' (Receive ID: 0x7b, Send ID: 0x1c8)
457
453
  ? The variant somersault_lazy offers the following services. Select one! do_forward_flips
@@ -475,15 +471,39 @@ ECU-VARIANT 'somersault_lazy' (Receive ID: 0x7b, Send ID: 0x1c8)
475
471
  ### The `snoop` subcommand
476
472
 
477
473
  The `snoop` subcommand can be used to decode a trace of a or a
478
- currently running diagnostic session:
474
+ currently running diagnostic session.
479
475
 
476
+ ```bash
477
+ $ odxtools snoop -h
478
+ usage: odxtools snoop [-h] [--active] [--channel CHANNEL] [--rx RX] [--tx TX] [--variant VARIANT]
479
+ [--protocol PROTOCOL]
480
+ PDX_FILE
481
+
482
+ Live decoding of a diagnostic session.
483
+
484
+ positional arguments:
485
+ PDX_FILE path to the .pdx file
486
+
487
+ options:
488
+ -h, --help show this help message and exit
489
+ --active, -a Active mode, sends flow control messages to receive ISO-TP telegrams successfully
490
+ --channel CHANNEL, -c CHANNEL
491
+ CAN interface name to be used (required in active mode)
492
+ --rx RX, -r RX CAN ID in which the ECU listens for diagnostic messages
493
+ --tx TX, -t TX CAN ID in which the ECU sends replys to diagnostic messages (required in active mode)
494
+ --variant VARIANT, -v VARIANT
495
+ Name of the ECU variant which the decode process ought to be based on
496
+ --protocol PROTOCOL, -p PROTOCOL
497
+ Name of the protocol used for decoding
498
+ ```
499
+ Example:
480
500
  ```bash
481
501
  # create a socketcan `vcan0` interface
482
502
  sudo ip link add dev vcan0 type vcan
483
503
  sudo ip link set vcan0 up
484
504
 
485
505
  # start the snooping on vcan0
486
- odxtools --conformant snoop -c vcan0 --variant "somersault_lazy" $BASE_DIR/odxtools/examples/somersault.pdx
506
+ odxtools snoop -c vcan0 --variant "somersault_lazy" $BASE_DIR/odxtools/examples/somersault.pdx
487
507
 
488
508
  # on a different terminal, run the diagnostic session
489
509
  $BASE_DIR/odxtools/examples/somersaultlazy.py -c vcan0
@@ -492,7 +512,7 @@ $BASE_DIR/odxtools/examples/somersaultlazy.py -c vcan0
492
512
  The snoop command will then output the following:
493
513
 
494
514
  ```bash
495
- $ odxtools --conformant snoop -c vcan0 --variant "somersault_lazy" $BASE_DIR/odxtools/examples/somersault.pdx
515
+ $ odxtools snoop -c vcan0 --variant "somersault_lazy" $BASE_DIR/odxtools/examples/somersault.pdx
496
516
  Decoding messages on channel vcan0
497
517
  Tester: do_forward_flips(forward_soberness_check=18, num_flips=1)
498
518
  -> 7fba7f (bytearray(b'\x7f\xba\x7f'), 3 bytes)
@@ -516,6 +536,43 @@ information by either a hex request, or partial name via cli.
516
536
  In addition, it can also decode a hex request and display its parameters
517
537
  mapped to a service.
518
538
 
539
+ ```bash
540
+ $ odxtools find -h
541
+ usage: odxtools find [-h] [-v VARIANT [VARIANT ...]] [-d [DATA ...]] [-D [DECODE ...]] [-s [SERVICES ...]] [-nd]
542
+ [-ro]
543
+ PDX_FILE
544
+
545
+ Find & print services by hex-data, or name, can also decodes requests
546
+
547
+ Examples:
548
+ For displaying the service associated with the request 10 01:
549
+ odxtools find ./path/to/database.pdx -d 10 01
550
+ For displaying the service associated with the request 10 01, and decoding it:
551
+ odxtools find ./path/to/database.pdx -D 10 01
552
+ For displaying the services associated with the partial name 'Reset' without details:
553
+ odxtools find ./path/to/database.pdx -s "Reset" --no-details
554
+ For more information use:
555
+ odxtools find -h
556
+
557
+ positional arguments:
558
+ PDX_FILE path to the .pdx file
559
+
560
+ options:
561
+ -h, --help show this help message and exit
562
+ -v VARIANT [VARIANT ...], --variants VARIANT [VARIANT ...]
563
+ Specifies which ecu variants should be included.
564
+ -d [DATA ...], --data [DATA ...]
565
+ Print a list of diagnostic services associated with the hex request.
566
+ -D [DECODE ...], --decode [DECODE ...]
567
+ Print a list of diagnostic services associated with the hex request and decode the request.
568
+ -s [SERVICES ...], --service-names [SERVICES ...]
569
+ Print a list of diagnostic services partially matching given service names
570
+ -nd, --no-details Don't show all service details
571
+ -ro, --relaxed-output
572
+ Relax output formatting rules (allow unknown bitlengths for ascii representation)
573
+ ```
574
+ Example: Find diagnostic services associated with the hex request `10 00`
575
+
519
576
  ```bash
520
577
  $ odxtools find $BASE_DIR/odxtools/examples/somersault.pdx -D 10 00
521
578