odxtools 6.6.1__py3-none-any.whl → 9.3.0__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 (222) hide show
  1. odxtools/__init__.py +7 -5
  2. odxtools/additionalaudience.py +3 -5
  3. odxtools/admindata.py +5 -7
  4. odxtools/audience.py +10 -13
  5. odxtools/basecomparam.py +3 -5
  6. odxtools/basicstructure.py +55 -241
  7. odxtools/cli/_parser_utils.py +16 -1
  8. odxtools/cli/_print_utils.py +169 -134
  9. odxtools/cli/browse.py +127 -103
  10. odxtools/cli/compare.py +114 -87
  11. odxtools/cli/decode.py +2 -1
  12. odxtools/cli/dummy_sub_parser.py +3 -1
  13. odxtools/cli/find.py +2 -1
  14. odxtools/cli/list.py +26 -16
  15. odxtools/cli/main.py +1 -0
  16. odxtools/cli/snoop.py +32 -6
  17. odxtools/codec.py +211 -0
  18. odxtools/commrelation.py +122 -0
  19. odxtools/companydata.py +5 -7
  20. odxtools/companydocinfo.py +7 -8
  21. odxtools/companyrevisioninfo.py +3 -5
  22. odxtools/companyspecificinfo.py +8 -9
  23. odxtools/comparam.py +4 -6
  24. odxtools/comparaminstance.py +14 -14
  25. odxtools/comparamspec.py +16 -54
  26. odxtools/comparamsubset.py +22 -62
  27. odxtools/complexcomparam.py +5 -7
  28. odxtools/compumethods/compucodecompumethod.py +63 -0
  29. odxtools/compumethods/compuconst.py +31 -0
  30. odxtools/compumethods/compudefaultvalue.py +27 -0
  31. odxtools/compumethods/compuinternaltophys.py +56 -0
  32. odxtools/compumethods/compuinversevalue.py +7 -0
  33. odxtools/compumethods/compumethod.py +94 -15
  34. odxtools/compumethods/compuphystointernal.py +56 -0
  35. odxtools/compumethods/compurationalcoeffs.py +20 -9
  36. odxtools/compumethods/compuscale.py +67 -32
  37. odxtools/compumethods/createanycompumethod.py +31 -172
  38. odxtools/compumethods/identicalcompumethod.py +31 -6
  39. odxtools/compumethods/limit.py +70 -36
  40. odxtools/compumethods/linearcompumethod.py +70 -181
  41. odxtools/compumethods/linearsegment.py +190 -0
  42. odxtools/compumethods/ratfunccompumethod.py +106 -0
  43. odxtools/compumethods/ratfuncsegment.py +87 -0
  44. odxtools/compumethods/scalelinearcompumethod.py +132 -26
  45. odxtools/compumethods/scaleratfunccompumethod.py +113 -0
  46. odxtools/compumethods/tabintpcompumethod.py +123 -92
  47. odxtools/compumethods/texttablecompumethod.py +117 -57
  48. odxtools/createanydiagcodedtype.py +10 -67
  49. odxtools/database.py +167 -87
  50. odxtools/dataobjectproperty.py +25 -32
  51. odxtools/decodestate.py +14 -17
  52. odxtools/description.py +47 -0
  53. odxtools/determinenumberofitems.py +4 -5
  54. odxtools/diagcodedtype.py +37 -106
  55. odxtools/diagcomm.py +24 -12
  56. odxtools/diagdatadictionaryspec.py +120 -96
  57. odxtools/diaglayercontainer.py +46 -54
  58. odxtools/diaglayers/basevariant.py +128 -0
  59. odxtools/diaglayers/basevariantraw.py +123 -0
  60. odxtools/diaglayers/diaglayer.py +432 -0
  61. odxtools/{diaglayerraw.py → diaglayers/diaglayerraw.py} +105 -120
  62. odxtools/diaglayers/diaglayertype.py +42 -0
  63. odxtools/diaglayers/ecushareddata.py +96 -0
  64. odxtools/diaglayers/ecushareddataraw.py +87 -0
  65. odxtools/diaglayers/ecuvariant.py +124 -0
  66. odxtools/diaglayers/ecuvariantraw.py +129 -0
  67. odxtools/diaglayers/functionalgroup.py +110 -0
  68. odxtools/diaglayers/functionalgroupraw.py +106 -0
  69. odxtools/{diaglayer.py → diaglayers/hierarchyelement.py} +273 -472
  70. odxtools/diaglayers/hierarchyelementraw.py +58 -0
  71. odxtools/diaglayers/protocol.py +64 -0
  72. odxtools/diaglayers/protocolraw.py +91 -0
  73. odxtools/diagnostictroublecode.py +8 -9
  74. odxtools/diagservice.py +57 -44
  75. odxtools/diagvariable.py +113 -0
  76. odxtools/docrevision.py +5 -7
  77. odxtools/dopbase.py +15 -15
  78. odxtools/dtcdop.py +170 -50
  79. odxtools/dynamicendmarkerfield.py +134 -0
  80. odxtools/dynamiclengthfield.py +47 -42
  81. odxtools/dyndefinedspec.py +177 -0
  82. odxtools/dynenddopref.py +38 -0
  83. odxtools/ecuvariantmatcher.py +6 -7
  84. odxtools/element.py +13 -15
  85. odxtools/encodestate.py +199 -22
  86. odxtools/endofpdufield.py +31 -18
  87. odxtools/environmentdata.py +8 -1
  88. odxtools/environmentdatadescription.py +198 -36
  89. odxtools/exceptions.py +11 -2
  90. odxtools/field.py +10 -10
  91. odxtools/functionalclass.py +3 -5
  92. odxtools/inputparam.py +3 -12
  93. odxtools/internalconstr.py +14 -5
  94. odxtools/isotp_state_machine.py +14 -6
  95. odxtools/leadinglengthinfotype.py +37 -18
  96. odxtools/library.py +66 -0
  97. odxtools/loadfile.py +64 -0
  98. odxtools/matchingparameter.py +3 -3
  99. odxtools/message.py +0 -7
  100. odxtools/minmaxlengthtype.py +61 -33
  101. odxtools/modification.py +3 -5
  102. odxtools/multiplexer.py +135 -75
  103. odxtools/multiplexercase.py +39 -18
  104. odxtools/multiplexerdefaultcase.py +15 -12
  105. odxtools/multiplexerswitchkey.py +4 -5
  106. odxtools/nameditemlist.py +33 -8
  107. odxtools/negoutputparam.py +3 -5
  108. odxtools/odxcategory.py +83 -0
  109. odxtools/odxlink.py +62 -53
  110. odxtools/odxtypes.py +93 -8
  111. odxtools/outputparam.py +5 -16
  112. odxtools/parameterinfo.py +219 -61
  113. odxtools/parameters/codedconstparameter.py +45 -32
  114. odxtools/parameters/createanyparameter.py +19 -193
  115. odxtools/parameters/dynamicparameter.py +25 -4
  116. odxtools/parameters/lengthkeyparameter.py +83 -25
  117. odxtools/parameters/matchingrequestparameter.py +48 -18
  118. odxtools/parameters/nrcconstparameter.py +76 -54
  119. odxtools/parameters/parameter.py +97 -73
  120. odxtools/parameters/parameterwithdop.py +41 -38
  121. odxtools/parameters/physicalconstantparameter.py +41 -20
  122. odxtools/parameters/reservedparameter.py +36 -18
  123. odxtools/parameters/systemparameter.py +74 -7
  124. odxtools/parameters/tableentryparameter.py +47 -7
  125. odxtools/parameters/tablekeyparameter.py +142 -55
  126. odxtools/parameters/tablestructparameter.py +79 -58
  127. odxtools/parameters/valueparameter.py +39 -21
  128. odxtools/paramlengthinfotype.py +56 -33
  129. odxtools/parentref.py +20 -3
  130. odxtools/physicaldimension.py +3 -8
  131. odxtools/progcode.py +26 -11
  132. odxtools/protstack.py +3 -5
  133. odxtools/py.typed +0 -0
  134. odxtools/relateddoc.py +7 -9
  135. odxtools/request.py +120 -10
  136. odxtools/response.py +123 -23
  137. odxtools/scaleconstr.py +14 -8
  138. odxtools/servicebinner.py +1 -1
  139. odxtools/singleecujob.py +12 -10
  140. odxtools/snrefcontext.py +29 -0
  141. odxtools/specialdata.py +3 -5
  142. odxtools/specialdatagroup.py +7 -9
  143. odxtools/specialdatagroupcaption.py +3 -6
  144. odxtools/standardlengthtype.py +80 -14
  145. odxtools/state.py +3 -5
  146. odxtools/statechart.py +13 -19
  147. odxtools/statetransition.py +8 -18
  148. odxtools/staticfield.py +107 -0
  149. odxtools/subcomponent.py +288 -0
  150. odxtools/swvariable.py +21 -0
  151. odxtools/table.py +9 -9
  152. odxtools/tablerow.py +30 -15
  153. odxtools/teammember.py +3 -5
  154. odxtools/templates/comparam-spec.odx-c.xml.jinja2 +4 -24
  155. odxtools/templates/comparam-subset.odx-cs.xml.jinja2 +5 -26
  156. odxtools/templates/diag_layer_container.odx-d.xml.jinja2 +15 -31
  157. odxtools/templates/{index.xml.xml.jinja2 → index.xml.jinja2} +1 -1
  158. odxtools/templates/macros/printAudience.xml.jinja2 +1 -1
  159. odxtools/templates/macros/printBaseVariant.xml.jinja2 +53 -0
  160. odxtools/templates/macros/printCompanyData.xml.jinja2 +4 -7
  161. odxtools/templates/macros/printComparam.xml.jinja2 +6 -4
  162. odxtools/templates/macros/printComparamRef.xml.jinja2 +5 -12
  163. odxtools/templates/macros/printCompuMethod.xml.jinja2 +147 -0
  164. odxtools/templates/macros/printDOP.xml.jinja2 +27 -137
  165. odxtools/templates/macros/printDescription.xml.jinja2 +18 -0
  166. odxtools/templates/macros/printDiagComm.xml.jinja2 +1 -1
  167. odxtools/templates/macros/printDiagLayer.xml.jinja2 +222 -0
  168. odxtools/templates/macros/printDiagVariable.xml.jinja2 +66 -0
  169. odxtools/templates/macros/printDynDefinedSpec.xml.jinja2 +48 -0
  170. odxtools/templates/macros/printDynamicEndmarkerField.xml.jinja2 +16 -0
  171. odxtools/templates/macros/printDynamicLengthField.xml.jinja2 +1 -1
  172. odxtools/templates/macros/printEcuSharedData.xml.jinja2 +30 -0
  173. odxtools/templates/macros/printEcuVariant.xml.jinja2 +53 -0
  174. odxtools/templates/macros/printEcuVariantPattern.xml.jinja2 +1 -1
  175. odxtools/templates/macros/printElementId.xml.jinja2 +8 -3
  176. odxtools/templates/macros/printEndOfPdu.xml.jinja2 +1 -1
  177. odxtools/templates/macros/printEnvDataDesc.xml.jinja2 +1 -1
  178. odxtools/templates/macros/printFunctionalClass.xml.jinja2 +1 -1
  179. odxtools/templates/macros/printFunctionalGroup.xml.jinja2 +40 -0
  180. odxtools/templates/macros/printHierarchyElement.xml.jinja2 +24 -0
  181. odxtools/templates/macros/printLibrary.xml.jinja2 +21 -0
  182. odxtools/templates/macros/printMux.xml.jinja2 +5 -3
  183. odxtools/templates/macros/printOdxCategory.xml.jinja2 +28 -0
  184. odxtools/templates/macros/printParam.xml.jinja2 +18 -19
  185. odxtools/templates/macros/printProtStack.xml.jinja2 +1 -1
  186. odxtools/templates/macros/printProtocol.xml.jinja2 +30 -0
  187. odxtools/templates/macros/printRequest.xml.jinja2 +1 -1
  188. odxtools/templates/macros/printResponse.xml.jinja2 +1 -1
  189. odxtools/templates/macros/printService.xml.jinja2 +3 -2
  190. odxtools/templates/macros/printSingleEcuJob.xml.jinja2 +5 -26
  191. odxtools/templates/macros/printSpecialData.xml.jinja2 +1 -1
  192. odxtools/templates/macros/printState.xml.jinja2 +1 -1
  193. odxtools/templates/macros/printStateChart.xml.jinja2 +1 -1
  194. odxtools/templates/macros/printStateTransition.xml.jinja2 +1 -1
  195. odxtools/templates/macros/printStaticField.xml.jinja2 +15 -0
  196. odxtools/templates/macros/printStructure.xml.jinja2 +1 -1
  197. odxtools/templates/macros/printSubComponent.xml.jinja2 +104 -0
  198. odxtools/templates/macros/printTable.xml.jinja2 +4 -5
  199. odxtools/templates/macros/printUnitSpec.xml.jinja2 +3 -5
  200. odxtools/uds.py +2 -10
  201. odxtools/unit.py +4 -8
  202. odxtools/unitgroup.py +3 -5
  203. odxtools/unitspec.py +17 -17
  204. odxtools/utils.py +38 -20
  205. odxtools/variablegroup.py +32 -0
  206. odxtools/version.py +2 -2
  207. odxtools/{write_pdx_file.py → writepdxfile.py} +22 -12
  208. odxtools/xdoc.py +3 -5
  209. {odxtools-6.6.1.dist-info → odxtools-9.3.0.dist-info}/METADATA +44 -33
  210. odxtools-9.3.0.dist-info/RECORD +228 -0
  211. {odxtools-6.6.1.dist-info → odxtools-9.3.0.dist-info}/WHEEL +1 -1
  212. odxtools/createcompanydatas.py +0 -17
  213. odxtools/createsdgs.py +0 -19
  214. odxtools/diaglayertype.py +0 -30
  215. odxtools/load_file.py +0 -13
  216. odxtools/load_odx_d_file.py +0 -6
  217. odxtools/load_pdx_file.py +0 -8
  218. odxtools/templates/macros/printVariant.xml.jinja2 +0 -208
  219. odxtools-6.6.1.dist-info/RECORD +0 -180
  220. {odxtools-6.6.1.dist-info → odxtools-9.3.0.dist-info}/LICENSE +0 -0
  221. {odxtools-6.6.1.dist-info → odxtools-9.3.0.dist-info}/entry_points.txt +0 -0
  222. {odxtools-6.6.1.dist-info → odxtools-9.3.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,147 @@
1
+ {#- -*- mode: sgml; tab-width: 1; indent-tabs-mode: nil -*-
2
+ #
3
+ # SPDX-License-Identifier: MIT
4
+ -#}
5
+
6
+ {%- import('macros/printElementId.xml.jinja2') as peid %}
7
+ {%- import('macros/printAdminData.xml.jinja2') as pad %}
8
+ {%- import('macros/printSpecialData.xml.jinja2') as psd %}
9
+ {%- import('macros/printDescription.xml.jinja2') as pd %}
10
+
11
+
12
+ {%- macro printLimit(tag_name, limit_obj) -%}
13
+ {%- if limit_obj is not none %}
14
+ <{{tag_name}}
15
+ {%- if limit_obj.interval_type is not none %}
16
+ {{- make_xml_attrib("INTERVAL-TYPE", limit_obj.interval_type.value) }}
17
+ {%- endif %}
18
+ {%- if limit_obj.value_raw is none %}
19
+ {#- #}/>
20
+ {%- else %}
21
+ {#- #}>{{- limit_obj.value_raw | e }}</{{tag_name}}>
22
+ {%- endif -%}
23
+ {%- endif -%}
24
+ {%- endmacro -%}
25
+
26
+ {%- macro printCompuInverseValue(civ) -%}
27
+ <COMPU-INVERSE-VALUE>
28
+ {%- if civ.v is not none %}
29
+ <V>{{civ.v}}</V>
30
+ {%- endif %}
31
+ {%- if civ.vt is not none %}
32
+ <VT>{{civ.vt | e}}</VT>
33
+ {%- endif %}
34
+ </COMPU-INVERSE-VALUE>
35
+ {%- endmacro -%}
36
+
37
+ {%- macro printCompuDefaultValue(cdv) -%}
38
+ <COMPU-DEFAULT-VALUE>
39
+ {%- if cdv.v is not none %}
40
+ <V>{{cdv.v}}</V>
41
+ {%- endif %}
42
+ {%- if cdv.vt is not none %}
43
+ <VT>{{cdv.vt | e}}</VT>
44
+ {%- endif %}
45
+ {%- if cdv.compu_inverse_value is not none %}
46
+ {{printCompuInverseValue(cdv.compu_inverse_value)}}
47
+ {%- endif %}
48
+ </COMPU-DEFAULT-VALUE>
49
+ {%- endmacro -%}
50
+
51
+ {%- macro printCompuScale(cs) -%}
52
+ <COMPU-SCALE>
53
+ {%- if cs.short_label is not none %}
54
+ <SHORT-LABEL>{{cs.short_label|e}}</SHORT-LABEL>
55
+ {%- endif %}
56
+ {{- pd.printDescription(cs.description)|indent(2, first=True) }}
57
+ {{- printLimit("LOWER-LIMIT", cs.lower_limit)|indent(2, first=True) }}
58
+ {{- printLimit("UPPER-LIMIT", cs.upper_limit)|indent(2, first=True) }}
59
+ {%- if cs.compu_inverse_value is not none %}
60
+ {{printCompuInverseValue(cs.compu_inverse_value)}}
61
+ {%- endif %}
62
+ {%- if cs.compu_const is not none %}
63
+ <COMPU-CONST>
64
+ {%- if cs.compu_const.v is not none %}
65
+ <V>{{cs.compu_const.v}}</V>
66
+ {%- endif %}
67
+ {%- if cs.compu_const.vt is not none %}
68
+ <VT>{{cs.compu_const.vt | e}}</VT>
69
+ {%- endif %}
70
+ </COMPU-CONST>
71
+ {%- endif %}
72
+ {%- set crc = cs.compu_rational_coeffs %}
73
+ {%- if crc is not none %}
74
+ <COMPU-RATIONAL-COEFFS>
75
+ <COMPU-NUMERATOR>
76
+ {%- for v in crc.numerators %}
77
+ <V>{{v}}</V>
78
+ {%- endfor %}
79
+ </COMPU-NUMERATOR>
80
+ {%- if crc.denominators %}
81
+ <COMPU-DENOMINATOR>
82
+ {%- for v in crc.denominators %}
83
+ <V>{{v}}</V>
84
+ {%- endfor %}
85
+ </COMPU-DENOMINATOR>
86
+ {%- endif %}
87
+ </COMPU-RATIONAL-COEFFS>
88
+ {%- endif %}
89
+ </COMPU-SCALE>
90
+ {%- endmacro -%}
91
+
92
+ {%- macro printProgCode(pc) -%}
93
+ <PROG-CODE>
94
+ <CODE-FILE>{{pc.code_file}}</CODE-FILE>
95
+ {%- if pc.encryption is not none %}
96
+ <ENCRYPTION>{{pc.encryption}}</ENCRYPTION>
97
+ {%- endif %}
98
+ <SYNTAX>{{pc.syntax}}</SYNTAX>
99
+ <REVISION>{{pc.revision}}</REVISION>
100
+ {%- if pc.entry_point is not none %}
101
+ <ENTRYPOINT>{{pc.entrypoint}}</ENTRYPOINT>
102
+ {%- endif %}
103
+ {%- if pc.library_refs %}
104
+ <LIBRARY-REFS>
105
+ {%- for libref in pc.library_refs %}
106
+ <LIBRARY-REF ID-REF="{{libref.ref_id}}" />
107
+ {%- endfor %}
108
+ </LIBRARY-REFS>
109
+ {%- endif %}
110
+ </PROG-CODE>
111
+ {%- endmacro -%}
112
+
113
+ {%- macro printCompuMethod(cm) -%}
114
+ <COMPU-METHOD>
115
+ <CATEGORY>{{cm.category.value}}</CATEGORY>
116
+ {%- if cm.compu_internal_to_phys is not none %}
117
+ <COMPU-INTERNAL-TO-PHYS>
118
+ <COMPU-SCALES>
119
+ {%- for cs in cm.compu_internal_to_phys.compu_scales %}
120
+ {{ printCompuScale(cs) | indent(3) }}
121
+ {%- endfor %}
122
+ </COMPU-SCALES>
123
+ {%- if cm.compu_internal_to_phys.prog_code is not none %}
124
+ {{ printProgCode(cm.compu_internal_to_phys.prog_code) | indent(3) }}
125
+ {%- endif %}
126
+ {%- if cm.compu_internal_to_phys.compu_default_value is not none %}
127
+ {{ printCompuDefaultValue(cm.compu_internal_to_phys.compu_default_value) | indent(3) }}
128
+ {%- endif %}
129
+ </COMPU-INTERNAL-TO-PHYS>
130
+ {%- endif %}
131
+ {%- if cm.compu_phys_to_internal is not none %}
132
+ <COMPU-PHYS-TO-INTERNAL>
133
+ <COMPU-SCALES>
134
+ {%- for cs in cm.compu_phys_to_internal.compu_scales %}
135
+ {{ printCompuScale(cs) | indent(3) }}
136
+ {%- endfor %}
137
+ </COMPU-SCALES>
138
+ {%- if cm.compu_phys_to_internal.prog_code is not none %}
139
+ {{ printProgCode(cm.compu_phys_to_internal.prog_code) | indent(3) }}
140
+ {%- endif %}
141
+ {%- if cm.compu_phys_to_internal.compu_default_value is not none %}
142
+ {{ printCompuDefaultValue(cm.compu_phys_to_internal.compu_default_value) | indent(3) }}
143
+ {%- endif %}
144
+ </COMPU-PHYS-TO-INTERNAL>
145
+ {%- endif %}
146
+ </COMPU-METHOD>
147
+ {%- endmacro -%}
@@ -6,6 +6,9 @@
6
6
  {%- import('macros/printElementId.xml.jinja2') as peid %}
7
7
  {%- import('macros/printAdminData.xml.jinja2') as pad %}
8
8
  {%- import('macros/printSpecialData.xml.jinja2') as psd %}
9
+ {%- import('macros/printCompuMethod.xml.jinja2') as pcm %}
10
+ {%- import('macros/printDescription.xml.jinja2') as pd %}
11
+
9
12
 
10
13
  {%- macro printDiagCodedType(dct) -%}
11
14
  <DIAG-CODED-TYPE {{-make_xml_attrib("BASE-DATA-TYPE", dct.base_data_type.value)}}
@@ -30,7 +33,6 @@
30
33
  </DIAG-CODED-TYPE>
31
34
  {%- endmacro -%}
32
35
 
33
-
34
36
  {%- macro printPhysicalType(physical_type) %}
35
37
  {%- if physical_type.display_radix is not none %}
36
38
  <PHYSICAL-TYPE BASE-DATA-TYPE="{{physical_type.base_data_type.value}}" DISPLAY-RADIX="{{physical_type.display_radix.name}}" />
@@ -43,27 +45,14 @@
43
45
  {%- endif %}
44
46
  {%- endmacro -%}
45
47
 
46
- {%- macro printLimitValue(lv) -%}
47
- {%- if hasattr(lv, 'hex') -%}
48
- {#- bytes or bytarray limit #}
49
- {{lv.hex()}}
50
- {%- else -%}
51
- {{lv}}
52
- {%- endif -%}
53
- {%- endmacro -%}
54
-
55
48
  {%- macro printScaleConstr(sc) %}
56
49
  <SCALE-CONSTR VALIDITY="{{sc.validity.value}}">
57
50
  {%- if sc.short_label is not none %}
58
51
  <SHORT-LABEL>{{sc.short_label|e}}</SHORT-LABEL>
59
52
  {%- endif %}
60
- {%- if sc.description and sc.description.strip() %}
61
- <DESC>
62
- {{sc.description}}
63
- </DESC>
64
- {%- endif %}
65
- <LOWER-LIMIT>{{printLimitValue(sc.lower_limit.value)}}</LOWER-LIMIT>
66
- <UPPER-LIMIT>{{printLimitValue(sc.upper_limit.value)}}</UPPER-LIMIT>
53
+ {{pd.printDescription(sc.description)}}
54
+ {{pcm.printLimit("LOWER-LIMIT", sc.lower_limit) }}
55
+ {{pcm.printLimit("UPPER-LIMIT", sc.upper_limit) }}
67
56
  </SCALE-CONSTR>
68
57
  {%- endmacro -%}
69
58
 
@@ -73,12 +62,8 @@
73
62
  {%- else %}
74
63
  <INTERNAL-CONSTR>
75
64
  {%- endif %}
76
- {%- if ic.lower_limit %}
77
- <LOWER-LIMIT>{{printLimitValue(ic.lower_limit.value)}}</LOWER-LIMIT>
78
- {%- endif %}
79
- {%- if ic.upper_limit %}
80
- <UPPER-LIMIT>{{printLimitValue(ic.upper_limit.value)}}</UPPER-LIMIT>
81
- {%- endif %}
65
+ {{pcm.printLimit("LOWER-LIMIT", ic.lower_limit) }}
66
+ {{pcm.printLimit("UPPER-LIMIT", ic.upper_limit) }}
82
67
  {%- if ic.scale_constrs %}
83
68
  <SCALE-CONSTRS>
84
69
  {%- for sc in ic.scale_constrs %}
@@ -93,117 +78,6 @@
93
78
  {%- endif %}
94
79
  {%- endmacro -%}
95
80
 
96
- {%- macro printCompuMethod(cm) -%}
97
- <COMPU-METHOD>
98
- <CATEGORY>{{cm.category}}</CATEGORY>
99
- {%- if cm.category == "TEXTTABLE" %}
100
- <COMPU-INTERNAL-TO-PHYS>
101
- <COMPU-SCALES>
102
- {%- for cs in cm.internal_to_phys %}
103
- <COMPU-SCALE>
104
- {%- if cs.short_label and cs.short_label.strip() %}
105
- <SHORT-LABEL>{{cs.short_label|e}}</SHORT-LABEL>
106
- {%- endif %}
107
- {%- if cs.description and cs.description.strip() %}
108
- <DESC>
109
- {{cs.description}}
110
- </DESC>
111
- {%- endif %}
112
- {%- if cs.lower_limit is not none %}
113
- <LOWER-LIMIT>{{printLimitValue(cs.lower_limit.value)}}</LOWER-LIMIT>
114
- {%- endif %}
115
- {%- if cs.upper_limit is not none %}
116
- <UPPER-LIMIT>{{printLimitValue(cs.upper_limit.value)}}</UPPER-LIMIT>
117
- {%- endif %}
118
- {%- if cs.compu_inverse_value is not none %}
119
- <COMPU-INVERSE-VALUE>
120
- <V>{{cs.compu_inverse_value}}</V>
121
- </COMPU-INVERSE-VALUE>
122
- {%- endif %}
123
- <COMPU-CONST>
124
- <VT>{{cs.compu_const | e}}</VT>
125
- </COMPU-CONST>
126
- </COMPU-SCALE>
127
- {%- endfor %}
128
- </COMPU-SCALES>
129
- {%- if cm.compu_default_value is not none %}
130
- <COMPU-DEFAULT-VALUE>
131
- <VT>{{cm.compu_default_value.compu_const}}</VT>
132
- {%- if cm.compu_default_value.compu_inverse_value is not none %}
133
- <COMPU-INVERSE-VALUE>
134
- <V>{{cm.compu_default_value.compu_inverse_value}}</V>
135
- </COMPU-INVERSE-VALUE>
136
- {%- endif %}
137
- </COMPU-DEFAULT-VALUE>
138
- {%- endif %}
139
- </COMPU-INTERNAL-TO-PHYS>
140
- {%- elif cm.category == "LINEAR" %}
141
- <COMPU-INTERNAL-TO-PHYS>
142
- <COMPU-SCALES>
143
- <COMPU-SCALE>
144
- {%- if cm.internal_lower_limit is not none and cm.internal_lower_limit.interval_type.value != "INFINITE" %}
145
- <LOWER-LIMIT>{{printLimitValue(cm.internal_lower_limit.value)}}</LOWER-LIMIT>
146
- {%- endif %}
147
- {%- if cm.internal_upper_limit is not none and cm.internal_upper_limit.interval_type.value != "INFINITE" %}
148
- <UPPER-LIMIT>{{printLimitValue(cm.internal_upper_limit.value)}}</UPPER-LIMIT>
149
- {%- endif %}
150
- <COMPU-RATIONAL-COEFFS>
151
- <COMPU-NUMERATOR>
152
- <V>{{cm.offset}}</V>
153
- <V>{{cm.factor}}</V>
154
- </COMPU-NUMERATOR>
155
- {%- if cm.denominator != 1 %}
156
- <COMPU-DENOMINATOR>
157
- <V>{{cm.denominator}}</V>
158
- </COMPU-DENOMINATOR>
159
- {%- endif %}
160
- </COMPU-RATIONAL-COEFFS>
161
- </COMPU-SCALE>
162
- </COMPU-SCALES>
163
- </COMPU-INTERNAL-TO-PHYS>
164
- {%- elif cm.category == "SCALE-LINEAR" %}
165
- <COMPU-INTERNAL-TO-PHYS>
166
- <COMPU-SCALES>
167
- {%- for lm in cm.linear_methods %}
168
- <COMPU-SCALE>
169
- {%- if lm.internal_lower_limit is not none and lm.internal_lower_limit.interval_type.value != "INFINITE" %}
170
- <LOWER-LIMIT>{{printLimitValue(lm.internal_lower_limit.value)}}</LOWER-LIMIT>
171
- {%- endif %}
172
- {%- if lm.internal_upper_limit is not none and lm.internal_upper_limit.interval_type.value != "INFINITE" %}
173
- <UPPER-LIMIT>{{printLimitValue(lm.internal_upper_limit.value)}}</UPPER-LIMIT>
174
- {%- endif %}
175
- <COMPU-RATIONAL-COEFFS>
176
- <COMPU-NUMERATOR>
177
- <V>{{lm.offset}}</V>
178
- <V>{{lm.factor}}</V>
179
- </COMPU-NUMERATOR>
180
- {%- if lm.denominator != 1 %}
181
- <COMPU-DENOMINATOR>
182
- <V>{{lm.denominator}}</V>
183
- </COMPU-DENOMINATOR>
184
- {%- endif %}
185
- </COMPU-RATIONAL-COEFFS>
186
- </COMPU-SCALE>
187
- {%- endfor %}
188
- </COMPU-SCALES>
189
- </COMPU-INTERNAL-TO-PHYS>
190
- {%- elif cm.category == "TAB-INTP" %}
191
- <COMPU-INTERNAL-TO-PHYS>
192
- <COMPU-SCALES>
193
- {%- for idx in range( cm.internal_points | length ) %}
194
- <COMPU-SCALE>
195
- <LOWER-LIMIT INTERVAL-TYPE="CLOSED">{{ printLimitValue(cm.internal_points[idx]) }}</LOWER-LIMIT>
196
- <COMPU-CONST>
197
- <V>{{ cm.physical_points[idx] }}</V>
198
- </COMPU-CONST>
199
- </COMPU-SCALE>
200
- {%- endfor %}
201
- </COMPU-SCALES>
202
- </COMPU-INTERNAL-TO-PHYS>
203
- {%- endif %}
204
- </COMPU-METHOD>
205
- {%- endmacro -%}
206
-
207
81
  {%- macro printDopBaseAttribs(dop) %}
208
82
  {{- make_xml_attrib("ID", dop.odx_id.local_id) }}
209
83
  {{- make_xml_attrib("OID", dop.oid) }}
@@ -229,7 +103,7 @@
229
103
  {%- macro printDataObjectProp(dop) %}
230
104
  <DATA-OBJECT-PROP {{- printDopBaseAttribs(dop) }}>
231
105
  {{- printDopBaseSubtags(dop) }}
232
- {{- printCompuMethod(dop.compu_method)|indent(1) }}
106
+ {{- pcm.printCompuMethod(dop.compu_method)|indent(1) }}
233
107
  {{- printDiagCodedType(dop.diag_coded_type)|indent(1) }}
234
108
  {{- printPhysicalType(dop.physical_type)|indent(1) }}
235
109
  {%- if dop.internal_constr %}
@@ -250,13 +124,13 @@
250
124
  {{- printDopBaseSubtags(dop)|indent(1) }}
251
125
  {{- printDiagCodedType(dop.diag_coded_type)|indent(1) }}
252
126
  {{- printPhysicalType(dop.physical_type)|indent(1) }}
253
- {{- printCompuMethod(dop.compu_method)|indent(1) }}
127
+ {{- pcm.printCompuMethod(dop.compu_method)|indent(1) }}
254
128
  <DTCS>
255
129
  {%- for dtc in dop.dtcs_raw %}
256
130
  {%- if hasattr(dtc, "ref_id") %}
257
131
  <DTC-REF ID-REF="{{dtc.ref_id}}" />
258
132
  {%- else %}
259
- <DTC ID="{{dtc.odx_id.local_id}}">
133
+ <DTC {{-peid.printElementIdAttribs(dtc)}}>
260
134
  <SHORT-NAME>{{dtc.short_name}}</SHORT-NAME>
261
135
  <TROUBLE-CODE>{{dtc.trouble_code}}</TROUBLE-CODE>
262
136
  {%- if dtc.display_trouble_code is not none %}
@@ -271,5 +145,21 @@
271
145
  {%- endif %}
272
146
  {%- endfor %}
273
147
  </DTCS>
148
+ {%- if dop.linked_dtc_dops_raw %}
149
+ <LINKED-DTC-DOPS>
150
+ {%- for linked_dtc_dop in dop.linked_dtc_dops_raw %}
151
+ <LINKED-DTC-DOP>
152
+ {%- if linked_dtc_dop.not_inherited_dtc_snrefs %}
153
+ <NOT-INHERITED-DTC-SNREFS>
154
+ {%- for ni_snref in linked_dtc_dop.not_inherited_dtc_snrefs %}
155
+ <NOT-INHERITED-DTC-SNREF SHORT-NAME="{{ni_snref}}" />
156
+ {%- endfor %}
157
+ </NOT-INHERITED-DTC-SNREFS>
158
+ {%- endif %}
159
+ <DTC-DOP-REF ID-REF="{{linked_dtc_dop.dtc_dop_ref.ref_id}}" />
160
+ </LINKED-DTC-DOP>
161
+ {%- endfor %}
162
+ </LINKED-DTC-DOPS>
163
+ {%- endif %}
274
164
  </DTC-DOP>
275
165
  {%- endmacro -%}
@@ -0,0 +1,18 @@
1
+ {#- -*- mode: sgml; tab-width: 1; sgml-basic-offset: 1; indent-tabs-mode: nil -*-
2
+ #
3
+ # SPDX-License-Identifier: MIT
4
+ -#}
5
+
6
+ {%- macro printDescription(desc) %}
7
+ {%- if desc is not none %}
8
+ <DESC {{- make_xml_attrib("TI", desc.text_identifier)}}>{{desc.text}}
9
+ {%- if desc.external_docs %}
10
+ <EXTERNAL-DOCS>
11
+ {%- for ed in desc.external_docs %}
12
+ <EXTERNAL-DOC HREF="{{ed}}" />
13
+ {%- endfor %}
14
+ </EXTERNAL-DOCS>
15
+ {%- endif -%}
16
+ </DESC>
17
+ {%- endif %}
18
+ {%- endmacro %}
@@ -9,7 +9,7 @@
9
9
  {%- import('macros/printSpecialData.xml.jinja2') as psd %}
10
10
 
11
11
  {%- macro printDiagCommAttribs(dc) -%}
12
- ID="{{dc.odx_id.local_id}}"
12
+ {{-peid.printElementIdAttribs(dc)}}
13
13
  {{-make_xml_attrib("SEMANTIC", dc.semantic)}}
14
14
  {{-make_xml_attrib("DIAGNOSTIC-CLASS", dc.diagnostic_class and dc.diagnostic_class.value)}}
15
15
  {{-make_bool_xml_attrib("IS-MANDATORY", dc.is_mandatory_raw)}}
@@ -0,0 +1,222 @@
1
+ {#- -*- mode: sgml; tab-width: 1; indent-tabs-mode: nil -*-
2
+ #
3
+ # SPDX-License-Identifier: MIT
4
+ -#}
5
+
6
+ {%- import('macros/printElementId.xml.jinja2') as peid %}
7
+ {%- import('macros/printDOP.xml.jinja2') as pdop %}
8
+ {%- import('macros/printTable.xml.jinja2') as pt %}
9
+ {%- import('macros/printFunctionalClass.xml.jinja2') as pfc %}
10
+ {%- import('macros/printStructure.xml.jinja2') as pst %}
11
+ {%- import('macros/printEndOfPdu.xml.jinja2') as peopdu %}
12
+ {%- import('macros/printStaticField.xml.jinja2') as psf %}
13
+ {%- import('macros/printDynamicLengthField.xml.jinja2') as pdlf %}
14
+ {%- import('macros/printDynamicEndmarkerField.xml.jinja2') as pdemf %}
15
+ {%- import('macros/printMux.xml.jinja2') as pm %}
16
+ {%- import('macros/printEnvData.xml.jinja2') as ped %}
17
+ {%- import('macros/printEnvDataDesc.xml.jinja2') as pedd %}
18
+ {%- import('macros/printUnitSpec.xml.jinja2') as punit %}
19
+ {%- import('macros/printService.xml.jinja2') as ps %}
20
+ {%- import('macros/printSingleEcuJob.xml.jinja2') as psej %}
21
+ {%- import('macros/printRequest.xml.jinja2') as prq %}
22
+ {%- import('macros/printResponse.xml.jinja2') as presp %}
23
+ {%- import('macros/printStateChart.xml.jinja2') as psc %}
24
+ {%- import('macros/printAudience.xml.jinja2') as paud %}
25
+ {%- import('macros/printSubComponent.xml.jinja2') as psubcomp %}
26
+ {%- import('macros/printLibrary.xml.jinja2') as plib %}
27
+ {%- import('macros/printSpecialData.xml.jinja2') as psd %}
28
+ {%- import('macros/printEcuVariantPattern.xml.jinja2') as pvpat %}
29
+ {%- import('macros/printAdminData.xml.jinja2') as pad %}
30
+
31
+ {%- macro printDiagLayerAttribs(dl) -%}
32
+ {#- #} {{-peid.printElementIdAttribs(dl)}}{# -#}
33
+ {%- endmacro -%}
34
+
35
+ {%- macro printDiagLayerSubtags(dl) -%}
36
+ {%- set dlr = dl.diag_layer_raw %}
37
+ {{ peid.printElementIdSubtags(dlr)|indent(1) }}
38
+ {%- if dlr.admin_data is not none %}
39
+ {{ pad.printAdminData(dlr.admin_data) }}
40
+ {%- endif %}
41
+ {%- if dlr.company_datas %}
42
+ <COMPANY-DATAS>
43
+ {%- for cd in dlr.company_datas %}
44
+ {{ pcd.printCompanyData(cd) }}
45
+ {%- endfor %}
46
+ </COMPANY-DATAS>
47
+ {%- endif %}
48
+ {%- if dlr.functional_classes %}
49
+ <FUNCT-CLASSS>
50
+ {%- for fc in dlr.functional_classes %}
51
+ {{ pfc.printFunctionalClass(fc)|indent(3) }}
52
+ {%- endfor%}
53
+ </FUNCT-CLASSS>
54
+ {%- endif %}
55
+ {%- if dlr.diag_data_dictionary_spec is not none %}
56
+ {%- set ddds = dlr.diag_data_dictionary_spec %}
57
+ <DIAG-DATA-DICTIONARY-SPEC>
58
+ {%- if ddds.dtc_dops %}
59
+ <DTC-DOPS>
60
+ {%- for dop in ddds.dtc_dops -%}
61
+ {{ pdop.printDtcDop(dop)|indent(3) }}
62
+ {%- endfor %}
63
+ </DTC-DOPS>
64
+ {%- endif %}
65
+ {%- if ddds.env_data_descs %}
66
+ <ENV-DATA-DESCS>
67
+ {%- for env_data_desc in ddds.env_data_descs -%}
68
+ {{ pedd.printEnvDataDesc(env_data_desc)|indent(3) }}
69
+ {%- endfor %}
70
+ </ENV-DATA-DESCS>
71
+ {%- endif %}
72
+ {%- if ddds.data_object_props %}
73
+ <DATA-OBJECT-PROPS>
74
+ {%- for dop in ddds.data_object_props %}
75
+ {{- pdop.printDataObjectProp(dop)|indent(3) }}
76
+ {%- endfor %}
77
+ </DATA-OBJECT-PROPS>
78
+ {%- endif %}
79
+ {%- if ddds.structures %}
80
+ <STRUCTURES>
81
+ {%- for st in ddds.structures %}
82
+ {{ pst.printStructure(st)|indent(3) }}
83
+ {%- endfor %}
84
+ </STRUCTURES>
85
+ {%- endif %}
86
+ {%- if ddds.static_fields %}
87
+ <STATIC-FIELDS>
88
+ {%- for sf in ddds.static_fields %}
89
+ {{ psf.printStaticField(sf)|indent(3) }}
90
+ {%- endfor %}
91
+ </STATIC-FIELDS>
92
+ {%- endif %}
93
+ {%- if ddds.dynamic_length_fields %}
94
+ <DYNAMIC-LENGTH-FIELDS>
95
+ {%- for dlf in ddds.dynamic_length_fields %}
96
+ {{ pdlf.printDynamicLengthField(dlf)|indent(3) }}
97
+ {%- endfor %}
98
+ </DYNAMIC-LENGTH-FIELDS>
99
+ {%- endif %}
100
+ {%- if ddds.dynamic_endmarker_fields %}
101
+ <DYNAMIC-ENDMARKER-FIELDS>
102
+ {%- for demf in ddds.dynamic_endmarker_fields %}
103
+ {{ pdemf.printDynamicEndmarkerField(demf)|indent(3) }}
104
+ {%- endfor %}
105
+ </DYNAMIC-ENDMARKER-FIELDS>
106
+ {%- endif %}
107
+ {%- if ddds.end_of_pdu_fields %}
108
+ <END-OF-PDU-FIELDS>
109
+ {%- for eopdu in ddds.end_of_pdu_fields %}
110
+ {{ peopdu.printEndOfPdu(eopdu)|indent(3) }}
111
+ {%- endfor %}
112
+ </END-OF-PDU-FIELDS>
113
+ {%- endif %}
114
+ {%- if ddds.muxs %}
115
+ <MUXS>
116
+ {%- for mux in ddds.muxs %}
117
+ {{ pm.printMux(mux)|indent(3) }}
118
+ {%- endfor %}
119
+ </MUXS>
120
+ {%- endif %}
121
+ {%- if ddds.env_datas %}
122
+ <ENV-DATAS>
123
+ {%- for env_data in ddds.env_datas %}
124
+ {{ ped.printEnvData(env_data)|indent(3) }}
125
+ {%- endfor %}
126
+ </ENV-DATAS>
127
+ {%- endif %}
128
+ {%- if ddds.unit_spec %}
129
+ {{ punit.printUnitSpec(ddds.unit_spec)|indent(2) }}
130
+ {%- endif %}
131
+ {%- if ddds.tables %}
132
+ <TABLES>
133
+ {%- for table in ddds.tables -%}
134
+ {{ pt.printTable(table)|indent(3) }}
135
+ {%- endfor %}
136
+ </TABLES>
137
+ {{- psd.printSpecialDataGroups(ddds.sdgs)|indent(2, first=True) }}
138
+ {%- endif %}
139
+ </DIAG-DATA-DICTIONARY-SPEC>
140
+ {%- endif %}
141
+ {%- if dlr.diag_comms_raw %}
142
+ <DIAG-COMMS>
143
+ {%- for dc in dlr.diag_comms_raw %}
144
+
145
+ {#- use some serious duck typing to determine the kind of diag-comm
146
+ #- object. this would not be necessary if something like
147
+ #- isinstance() was available in jinja...
148
+ #}
149
+
150
+ {%- if hasattr(dc, "ref_id") %}
151
+ {#- -> reference to a diag-comm object #}
152
+ <DIAG-COMM-REF ID-REF="{{dc.ref_id}}" />
153
+ {%- elif hasattr(dc, "request") %}
154
+ {#- -> service #}
155
+ {{ ps.printService(dc)|indent(2) }}
156
+ {%- elif hasattr(dc, "prog_codes") %}
157
+ {#- -> single-ECU job #}
158
+ {{ psej.printSingleEcuJob(dc)|indent(2) }}
159
+ {%- else %}
160
+ <!-- Error: database contains an unrecognized DIAG-COMM. -->
161
+ {%- endif %}
162
+ {%- endfor %}
163
+ </DIAG-COMMS>
164
+ {%- endif %}
165
+ {%- if dlr.requests %}
166
+ <REQUESTS>
167
+ {%- for req in dlr.requests %}
168
+ {{ prq.printRequest(req)|indent(2) }}
169
+ {%- endfor %}
170
+ </REQUESTS>
171
+ {%- endif %}
172
+ {%- if dlr.positive_responses %}
173
+ <POS-RESPONSES>
174
+ {%- for resp in dlr.positive_responses %}
175
+ {{ presp.printResponse(resp, "POS-RESPONSE")|indent(2) }}
176
+ {%- endfor %}
177
+ </POS-RESPONSES>
178
+ {%- endif %}
179
+ {%- if dlr.negative_responses %}
180
+ <NEG-RESPONSES>
181
+ {%- for resp in dlr.negative_responses %}
182
+ {{ presp.printResponse(resp, "NEG-RESPONSE")|indent(2) }}
183
+ {%- endfor %}
184
+ </NEG-RESPONSES>
185
+ {%- endif %}
186
+ {%- if dlr.global_negative_responses %}
187
+ <GLOBAL-NEG-RESPONSES>
188
+ {%- for resp in dlr.global_negative_responses %}
189
+ {{ presp.printResponse(resp, "GLOBAL-NEG-RESPONSE")|indent(2) }}
190
+ {%- endfor %}
191
+ </GLOBAL-NEG-RESPONSES>
192
+ {%- endif %}
193
+ {%- if dlr.state_charts %}
194
+ <STATE-CHARTS>
195
+ {%- for sc in dlr.state_charts %}
196
+ {{ psc.printStateChart(sc) }}
197
+ {%- endfor %}
198
+ </STATE-CHARTS>
199
+ {%- endif %}
200
+ {%- if dlr.additional_audiences %}
201
+ <ADDITIONAL-AUDIENCES>
202
+ {%- for audience in dlr.additional_audiences %}
203
+ {{ paud.printAdditionalAudience(audience)|indent(2) }}
204
+ {%- endfor %}
205
+ </ADDITIONAL-AUDIENCES>
206
+ {%- endif %}
207
+ {%- if dlr.sub_components %}
208
+ <SUB-COMPONENTS>
209
+ {%- for sc in dlr.sub_components %}
210
+ {{ psubcomp.printSubComponent(sc)|indent(2) }}
211
+ {%- endfor %}
212
+ </SUB-COMPONENTS>
213
+ {%- endif %}
214
+ {%- if dlr.libraries %}
215
+ <LIBRARYS>
216
+ {%- for lib in dlr.libraries %}
217
+ {{ plib.printLibrary(lib)|indent(2) }}
218
+ {%- endfor %}
219
+ </LIBRARYS>
220
+ {%- endif %}
221
+ {{- psd.printSpecialDataGroups(dlr.sdgs)|indent(0, first=True) }}
222
+ {%- endmacro -%}
@@ -0,0 +1,66 @@
1
+ {#- -*- mode: sgml; tab-width: 2; indent-tabs-mode: nil -*-
2
+ #
3
+ # SPDX-License-Identifier: MIT
4
+ -#}
5
+ {%- import('macros/printElementId.xml.jinja2') as peid %}
6
+ {%- import('macros/printAdminData.xml.jinja2') as pad %}
7
+ {%- import('macros/printDescription.xml.jinja2') as pd %}
8
+
9
+ {%- macro printDiagVariable(diag_var) -%}
10
+ <DIAG-VARIABLE {{-peid.printElementIdAttribs(diag_var)}}>
11
+ {{ peid.printElementIdSubtags(diag_variable)|indent(2) }}
12
+ {%- if diag_variable.admin_data is not none %}
13
+ {{ pad.printAdminData(diag_variable.admin_data)|indent(2) }}
14
+ {%- endif %}
15
+ <VARIABLE-GROUP-REF ID-REF="{{ diag_var.ref_id }}" />
16
+ {%- if diag_variable.sw_variables %}
17
+ <SW-VARIABLES>
18
+ {%- for sw_var in diag_variable.sw_variables %}
19
+ <SW-VARIABLE {{-peid.printElementIdAttribs(sw_var)}}>
20
+ {{ peid.printElementIdSubtags(sw_var)|indent(6) }}
21
+ {%- if sw_var.origin is not none %}
22
+ <ORIGIN>{{ sw_var.origin }}</ORIGIN>
23
+ {%- endif %}
24
+ </SW-VARIABLE>
25
+ {%- endfor %}
26
+ </SW-VARIABLES>
27
+ {%- endif %}
28
+ {%- if diag_variable.comm_relations %}
29
+ <COMM-RELATIONS>
30
+ {%- for comm_relation in diag_variable.comm_relations %}
31
+ <COMM-RELATION>
32
+ {{ pd.printDescription(comm_relation.description) }}
33
+ <RELATION-TYPE>{{comm_relation.relation_type}}</RELATION-TYPE>
34
+ {%- if comm_relation.diag_comm_ref is not none %}
35
+ <DIAG-COMM-REF ID-REF="{{comm_relation.diag_comm_ref.ref_id}}" />
36
+ {%- endif %}
37
+ {%- if comm_relation.diag_comm_snref is not none %}
38
+ <DIAG-COMM-SNREF SHORT-NAME="{{comm_relation.diag_comm_snref}}" />
39
+ {%- endif %}
40
+ {%- if comm_relation.in_param_if_ref is not none %}
41
+ <IN-PARAM-IF-REF ID-REF="{{comm_relation.in_param_if_ref.ref_id}}" />
42
+ {%- endif %}
43
+ {%- if comm_relation.in_param_if_snref is not none %}
44
+ <IN-PARAM-IF-SNREF SHORT-NAME="{{comm_relation.in_param_if_snref}}" />
45
+ {%- endif %}
46
+ {%- if comm_relation.out_param_if_ref is not none %}
47
+ <OUT-PARAM-IF-REF ID-REF="{{comm_relation.out_param_if_ref.ref_id}}" />
48
+ {%- endif %}
49
+ {%- if comm_relation.out_param_if_snref is not none %}
50
+ <OUT-PARAM-IF-SNREF SHORT-NAME="{{comm_relation.out_param_if_snref}}" />
51
+ {%- endif %}
52
+ {%- if comm_relation.value_type_raw is not none %}
53
+ <VALUE-TYPE>{{comm_relation.value_type_raw.value}}</VALUE-TYPE>
54
+ {%- endif %}
55
+ <COMM-RELATION>
56
+ {%- endfor %}
57
+ </COMM-RELATIONS>
58
+ {%- endif %}
59
+ </DIAG-VARIABLE>
60
+ {%- endmacro -%}
61
+
62
+ {%- macro printVariableGroup(var_group) -%}
63
+ <VARIABLE-GROUP {{-peid.printElementIdAttribs(var_group)}}>
64
+ {{ peid.printElementIdSubtags(diag_variable)|indent(2) }}
65
+ </VARIABLE-GROUP>
66
+ {%- endmacro -%}