odxtools 8.2.1__py3-none-any.whl → 8.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.
- odxtools/diaglayers/diaglayer.py +6 -1
- odxtools/diaglayers/diaglayerraw.py +14 -1
- odxtools/subcomponent.py +288 -0
- odxtools/templates/macros/printDiagLayer.xml.jinja2 +8 -0
- odxtools/templates/macros/printSubComponent.xml.jinja2 +104 -0
- odxtools/version.py +2 -2
- {odxtools-8.2.1.dist-info → odxtools-8.3.1.dist-info}/METADATA +1 -1
- {odxtools-8.2.1.dist-info → odxtools-8.3.1.dist-info}/RECORD +12 -10
- {odxtools-8.2.1.dist-info → odxtools-8.3.1.dist-info}/LICENSE +0 -0
- {odxtools-8.2.1.dist-info → odxtools-8.3.1.dist-info}/WHEEL +0 -0
- {odxtools-8.2.1.dist-info → odxtools-8.3.1.dist-info}/entry_points.txt +0 -0
- {odxtools-8.2.1.dist-info → odxtools-8.3.1.dist-info}/top_level.txt +0 -0
odxtools/diaglayers/diaglayer.py
CHANGED
@@ -24,6 +24,7 @@ from ..servicebinner import ServiceBinner
|
|
24
24
|
from ..singleecujob import SingleEcuJob
|
25
25
|
from ..snrefcontext import SnRefContext
|
26
26
|
from ..specialdatagroup import SpecialDataGroup
|
27
|
+
from ..subcomponent import SubComponent
|
27
28
|
from ..unitgroup import UnitGroup
|
28
29
|
from .diaglayerraw import DiagLayerRaw
|
29
30
|
from .diaglayertype import DiagLayerType
|
@@ -261,9 +262,13 @@ class DiagLayer:
|
|
261
262
|
return self.diag_layer_raw.import_refs
|
262
263
|
|
263
264
|
@property
|
264
|
-
def libraries(self) ->
|
265
|
+
def libraries(self) -> NamedItemList[Library]:
|
265
266
|
return self.diag_layer_raw.libraries
|
266
267
|
|
268
|
+
@property
|
269
|
+
def sub_components(self) -> NamedItemList[SubComponent]:
|
270
|
+
return self.diag_layer_raw.sub_components
|
271
|
+
|
267
272
|
@property
|
268
273
|
def sdgs(self) -> List[SpecialDataGroup]:
|
269
274
|
return self.diag_layer_raw.sdgs
|
@@ -22,6 +22,7 @@ from ..singleecujob import SingleEcuJob
|
|
22
22
|
from ..snrefcontext import SnRefContext
|
23
23
|
from ..specialdatagroup import SpecialDataGroup
|
24
24
|
from ..statechart import StateChart
|
25
|
+
from ..subcomponent import SubComponent
|
25
26
|
from ..utils import dataclass_fields_asdict
|
26
27
|
from .diaglayertype import DiagLayerType
|
27
28
|
|
@@ -47,7 +48,7 @@ class DiagLayerRaw(IdentifiableElement):
|
|
47
48
|
import_refs: List[OdxLinkRef]
|
48
49
|
state_charts: NamedItemList[StateChart]
|
49
50
|
additional_audiences: NamedItemList[AdditionalAudience]
|
50
|
-
|
51
|
+
sub_components: NamedItemList[SubComponent]
|
51
52
|
libraries: NamedItemList[Library]
|
52
53
|
sdgs: List[SpecialDataGroup]
|
53
54
|
|
@@ -154,6 +155,11 @@ class DiagLayerRaw(IdentifiableElement):
|
|
154
155
|
Library.from_et(el, doc_frags) for el in et_element.iterfind("LIBRARYS/LIBRARY")
|
155
156
|
]
|
156
157
|
|
158
|
+
sub_components = [
|
159
|
+
SubComponent.from_et(el, doc_frags)
|
160
|
+
for el in et_element.iterfind("SUB-COMPONENTS/SUB-COMPONENT")
|
161
|
+
]
|
162
|
+
|
157
163
|
sdgs = [
|
158
164
|
SpecialDataGroup.from_et(sdge, doc_frags) for sdge in et_element.iterfind("SDGS/SDG")
|
159
165
|
]
|
@@ -174,6 +180,7 @@ class DiagLayerRaw(IdentifiableElement):
|
|
174
180
|
state_charts=NamedItemList(state_charts),
|
175
181
|
additional_audiences=NamedItemList(additional_audiences),
|
176
182
|
libraries=NamedItemList(libraries),
|
183
|
+
sub_components=NamedItemList(sub_components),
|
177
184
|
sdgs=sdgs,
|
178
185
|
**kwargs)
|
179
186
|
|
@@ -208,6 +215,8 @@ class DiagLayerRaw(IdentifiableElement):
|
|
208
215
|
odxlinks.update(additional_audience._build_odxlinks())
|
209
216
|
for library in self.libraries:
|
210
217
|
odxlinks.update(library._build_odxlinks())
|
218
|
+
for sub_comp in self.sub_components:
|
219
|
+
odxlinks.update(sub_comp._build_odxlinks())
|
211
220
|
for sdg in self.sdgs:
|
212
221
|
odxlinks.update(sdg._build_odxlinks())
|
213
222
|
|
@@ -262,6 +271,8 @@ class DiagLayerRaw(IdentifiableElement):
|
|
262
271
|
additional_audience._resolve_odxlinks(odxlinks)
|
263
272
|
for library in self.libraries:
|
264
273
|
library._resolve_odxlinks(odxlinks)
|
274
|
+
for sub_component in self.sub_components:
|
275
|
+
sub_component._resolve_odxlinks(odxlinks)
|
265
276
|
for sdg in self.sdgs:
|
266
277
|
sdg._resolve_odxlinks(odxlinks)
|
267
278
|
|
@@ -294,5 +305,7 @@ class DiagLayerRaw(IdentifiableElement):
|
|
294
305
|
additional_audience._resolve_snrefs(context)
|
295
306
|
for library in self.libraries:
|
296
307
|
library._resolve_snrefs(context)
|
308
|
+
for sub_component in self.sub_components:
|
309
|
+
sub_component._resolve_snrefs(context)
|
297
310
|
for sdg in self.sdgs:
|
298
311
|
sdg._resolve_snrefs(context)
|
odxtools/subcomponent.py
ADDED
@@ -0,0 +1,288 @@
|
|
1
|
+
# SPDX-License-Identifier: MIT
|
2
|
+
from dataclasses import dataclass
|
3
|
+
from typing import Any, Dict, List, Optional
|
4
|
+
from xml.etree import ElementTree
|
5
|
+
|
6
|
+
from .diagnostictroublecode import DiagnosticTroubleCode
|
7
|
+
from .diagservice import DiagService
|
8
|
+
from .dtcdop import DtcDop
|
9
|
+
from .element import IdentifiableElement, NamedElement
|
10
|
+
from .environmentdata import EnvironmentData
|
11
|
+
from .environmentdatadescription import EnvironmentDataDescription
|
12
|
+
from .exceptions import odxraise, odxrequire
|
13
|
+
from .matchingparameter import MatchingParameter
|
14
|
+
from .nameditemlist import NamedItemList
|
15
|
+
from .odxlink import OdxDocFragment, OdxLinkDatabase, OdxLinkId, OdxLinkRef, resolve_snref
|
16
|
+
from .parameters.parameter import Parameter
|
17
|
+
from .snrefcontext import SnRefContext
|
18
|
+
from .table import Table
|
19
|
+
from .tablerow import TableRow
|
20
|
+
from .utils import dataclass_fields_asdict
|
21
|
+
|
22
|
+
|
23
|
+
@dataclass
|
24
|
+
class SubComponentPattern:
|
25
|
+
matching_parameters: List[MatchingParameter]
|
26
|
+
|
27
|
+
@staticmethod
|
28
|
+
def from_et(et_element: ElementTree.Element,
|
29
|
+
doc_frags: List[OdxDocFragment]) -> "SubComponentPattern":
|
30
|
+
|
31
|
+
matching_parameters = [
|
32
|
+
MatchingParameter.from_et(el, doc_frags)
|
33
|
+
for el in et_element.iterfind("MATCHING-PARAMETERS/MATCHING-PARAMETER")
|
34
|
+
]
|
35
|
+
|
36
|
+
return SubComponentPattern(matching_parameters=matching_parameters)
|
37
|
+
|
38
|
+
|
39
|
+
@dataclass
|
40
|
+
class SubComponentParamConnector(IdentifiableElement):
|
41
|
+
diag_comm_snref: str
|
42
|
+
|
43
|
+
# TODO: we currently only support SNREFs, not SNPATHREFs
|
44
|
+
out_param_if_refs: List[str]
|
45
|
+
in_param_if_refs: List[str]
|
46
|
+
|
47
|
+
@property
|
48
|
+
def service(self) -> DiagService:
|
49
|
+
return self._service
|
50
|
+
|
51
|
+
@property
|
52
|
+
def out_param_ifs(self) -> NamedItemList[Parameter]:
|
53
|
+
return self._out_param_ifs
|
54
|
+
|
55
|
+
@property
|
56
|
+
def in_param_ifs(self) -> NamedItemList[Parameter]:
|
57
|
+
return self._in_param_ifs
|
58
|
+
|
59
|
+
@staticmethod
|
60
|
+
def from_et(et_element: ElementTree.Element,
|
61
|
+
doc_frags: List[OdxDocFragment]) -> "SubComponentParamConnector":
|
62
|
+
kwargs = dataclass_fields_asdict(IdentifiableElement.from_et(et_element, doc_frags))
|
63
|
+
|
64
|
+
diag_comm_snref = odxrequire(
|
65
|
+
odxrequire(et_element.find("DIAG-COMM-SNREF")).get("SHORT-NAME"))
|
66
|
+
|
67
|
+
out_param_if_refs = []
|
68
|
+
for elem in et_element.find("OUT-PARAM-IF-REFS") or []:
|
69
|
+
if elem.tag != "OUT-PARAM-IF-SNREF":
|
70
|
+
odxraise("Currently, only SNREFS are supported for OUT-PARAM-IF-REFS")
|
71
|
+
continue
|
72
|
+
|
73
|
+
out_param_if_refs.append(odxrequire(elem.get("SHORT-NAME")))
|
74
|
+
|
75
|
+
in_param_if_refs = []
|
76
|
+
for elem in et_element.find("IN-PARAM-IF-REFS") or []:
|
77
|
+
if elem.tag != "IN-PARAM-IF-SNREF":
|
78
|
+
odxraise("Currently, only SNREFS are supported for IN-PARAM-IF-REFS")
|
79
|
+
continue
|
80
|
+
|
81
|
+
in_param_if_refs.append(odxrequire(elem.get("SHORT-NAME")))
|
82
|
+
|
83
|
+
return SubComponentParamConnector(
|
84
|
+
diag_comm_snref=diag_comm_snref,
|
85
|
+
out_param_if_refs=out_param_if_refs,
|
86
|
+
in_param_if_refs=in_param_if_refs,
|
87
|
+
**kwargs)
|
88
|
+
|
89
|
+
def _build_odxlinks(self) -> Dict[OdxLinkId, Any]:
|
90
|
+
return {}
|
91
|
+
|
92
|
+
def _resolve_odxlinks(self, odxlinks: OdxLinkDatabase) -> None:
|
93
|
+
pass
|
94
|
+
|
95
|
+
def _resolve_snrefs(self, context: SnRefContext) -> None:
|
96
|
+
service = resolve_snref(self.diag_comm_snref,
|
97
|
+
odxrequire(context.diag_layer).diag_comms, DiagService)
|
98
|
+
self._service = service
|
99
|
+
|
100
|
+
if self._service.request is not None:
|
101
|
+
odxraise()
|
102
|
+
return
|
103
|
+
if not self._service.positive_responses:
|
104
|
+
odxraise()
|
105
|
+
return
|
106
|
+
request = odxrequire(service.request)
|
107
|
+
response = service.positive_responses[0]
|
108
|
+
|
109
|
+
in_param_ifs = []
|
110
|
+
for x in self.in_param_if_refs:
|
111
|
+
in_param_ifs.append(resolve_snref(x, request.parameters, Parameter))
|
112
|
+
|
113
|
+
out_param_ifs = []
|
114
|
+
for x in self.out_param_if_refs:
|
115
|
+
out_param_ifs.append(resolve_snref(x, response.parameters, Parameter))
|
116
|
+
|
117
|
+
self._in_param_ifs = NamedItemList(in_param_ifs)
|
118
|
+
self._out_param_ifs = NamedItemList(out_param_ifs)
|
119
|
+
|
120
|
+
|
121
|
+
@dataclass
|
122
|
+
class TableRowConnector(NamedElement):
|
123
|
+
table_ref: OdxLinkRef
|
124
|
+
table_row_snref: str
|
125
|
+
|
126
|
+
@property
|
127
|
+
def table(self) -> Table:
|
128
|
+
return self._table
|
129
|
+
|
130
|
+
@property
|
131
|
+
def table_row(self) -> TableRow:
|
132
|
+
return self._table_row
|
133
|
+
|
134
|
+
@staticmethod
|
135
|
+
def from_et(et_element: ElementTree.Element,
|
136
|
+
doc_frags: List[OdxDocFragment]) -> "TableRowConnector":
|
137
|
+
kwargs = dataclass_fields_asdict(NamedElement.from_et(et_element, doc_frags))
|
138
|
+
|
139
|
+
table_ref = odxrequire(OdxLinkRef.from_et(et_element.find("TABLE-REF"), doc_frags))
|
140
|
+
table_row_snref_el = odxrequire(et_element.find("TABLE-ROW-SNREF"))
|
141
|
+
table_row_snref = odxrequire(table_row_snref_el.get("SHORT-NAME"))
|
142
|
+
|
143
|
+
return TableRowConnector(table_ref=table_ref, table_row_snref=table_row_snref, **kwargs)
|
144
|
+
|
145
|
+
def _build_odxlinks(self) -> Dict[OdxLinkId, Any]:
|
146
|
+
return {}
|
147
|
+
|
148
|
+
def _resolve_odxlinks(self, odxlinks: OdxLinkDatabase) -> None:
|
149
|
+
self._table = odxlinks.resolve(self.table_ref, Table)
|
150
|
+
|
151
|
+
def _resolve_snrefs(self, context: SnRefContext) -> None:
|
152
|
+
self._table_row = resolve_snref(self.table_row_snref, self._table.table_rows, TableRow)
|
153
|
+
|
154
|
+
|
155
|
+
@dataclass
|
156
|
+
class DtcConnector(NamedElement):
|
157
|
+
dtc_dop_ref: OdxLinkRef
|
158
|
+
dtc_snref: str
|
159
|
+
|
160
|
+
@property
|
161
|
+
def dtc_dop(self) -> DtcDop:
|
162
|
+
return self._dtc_dop
|
163
|
+
|
164
|
+
@property
|
165
|
+
def dtc(self) -> DiagnosticTroubleCode:
|
166
|
+
return self._dtc
|
167
|
+
|
168
|
+
@staticmethod
|
169
|
+
def from_et(et_element: ElementTree.Element, doc_frags: List[OdxDocFragment]) -> "DtcConnector":
|
170
|
+
kwargs = dataclass_fields_asdict(NamedElement.from_et(et_element, doc_frags))
|
171
|
+
|
172
|
+
dtc_dop_ref = odxrequire(OdxLinkRef.from_et(et_element.find("DTC-DOP-REF"), doc_frags))
|
173
|
+
dtc_snref_el = odxrequire(et_element.find("DTC-SNREF"))
|
174
|
+
dtc_snref = odxrequire(dtc_snref_el.get("SHORT-NAME"))
|
175
|
+
|
176
|
+
return DtcConnector(dtc_dop_ref=dtc_dop_ref, dtc_snref=dtc_snref, **kwargs)
|
177
|
+
|
178
|
+
def _build_odxlinks(self) -> Dict[OdxLinkId, Any]:
|
179
|
+
return {}
|
180
|
+
|
181
|
+
def _resolve_odxlinks(self, odxlinks: OdxLinkDatabase) -> None:
|
182
|
+
self._dtc_dop = odxlinks.resolve(self.dtc_dop_ref, DtcDop)
|
183
|
+
|
184
|
+
def _resolve_snrefs(self, context: SnRefContext) -> None:
|
185
|
+
self._dtc = resolve_snref(self.dtc_snref, self._dtc_dop.dtcs, DiagnosticTroubleCode)
|
186
|
+
|
187
|
+
|
188
|
+
@dataclass
|
189
|
+
class EnvDataConnector(NamedElement):
|
190
|
+
env_data_desc_ref: OdxLinkRef
|
191
|
+
env_data_snref: str
|
192
|
+
|
193
|
+
@property
|
194
|
+
def env_data_desc(self) -> EnvironmentDataDescription:
|
195
|
+
return self._env_data_desc
|
196
|
+
|
197
|
+
@property
|
198
|
+
def env_data(self) -> EnvironmentData:
|
199
|
+
return self._env_data
|
200
|
+
|
201
|
+
@staticmethod
|
202
|
+
def from_et(et_element: ElementTree.Element,
|
203
|
+
doc_frags: List[OdxDocFragment]) -> "EnvDataConnector":
|
204
|
+
kwargs = dataclass_fields_asdict(NamedElement.from_et(et_element, doc_frags))
|
205
|
+
|
206
|
+
env_data_desc_ref = odxrequire(
|
207
|
+
OdxLinkRef.from_et(et_element.find("ENV-DATA-DESC-REF"), doc_frags))
|
208
|
+
env_data_snref_el = odxrequire(et_element.find("ENV-DATA-SNREF"))
|
209
|
+
env_data_snref = odxrequire(env_data_snref_el.get("SHORT-NAME"))
|
210
|
+
|
211
|
+
return EnvDataConnector(
|
212
|
+
env_data_desc_ref=env_data_desc_ref, env_data_snref=env_data_snref, **kwargs)
|
213
|
+
|
214
|
+
def _build_odxlinks(self) -> Dict[OdxLinkId, Any]:
|
215
|
+
return {}
|
216
|
+
|
217
|
+
def _resolve_odxlinks(self, odxlinks: OdxLinkDatabase) -> None:
|
218
|
+
self._env_data_desc = odxlinks.resolve(self.env_data_desc_ref, EnvironmentDataDescription)
|
219
|
+
|
220
|
+
def _resolve_snrefs(self, context: SnRefContext) -> None:
|
221
|
+
self._env_data = resolve_snref(self.env_data_snref, self._env_data_desc.env_datas,
|
222
|
+
EnvironmentData)
|
223
|
+
|
224
|
+
|
225
|
+
@dataclass
|
226
|
+
class SubComponent(IdentifiableElement):
|
227
|
+
"""Sub-components describe collections of related diagnostic variables
|
228
|
+
|
229
|
+
Note that the communication paradigm via diagnostic variables is
|
230
|
+
somewhat uncommon. If your ECU does not define any, there's no
|
231
|
+
need for it to define sub-components.
|
232
|
+
|
233
|
+
"""
|
234
|
+
|
235
|
+
#sub_component_patterns: NamedItemList[SubComponentPattern]
|
236
|
+
sub_component_param_connectors: NamedItemList[SubComponentParamConnector]
|
237
|
+
table_row_connectors: NamedItemList[TableRowConnector]
|
238
|
+
env_data_connectors: NamedItemList[EnvDataConnector]
|
239
|
+
dtc_connectors: NamedItemList[DtcConnector]
|
240
|
+
|
241
|
+
semantic: Optional[str]
|
242
|
+
|
243
|
+
@staticmethod
|
244
|
+
def from_et(et_element: ElementTree.Element, doc_frags: List[OdxDocFragment]) -> "SubComponent":
|
245
|
+
kwargs = dataclass_fields_asdict(IdentifiableElement.from_et(et_element, doc_frags))
|
246
|
+
|
247
|
+
semantic = et_element.get("SEMANTIC")
|
248
|
+
|
249
|
+
sub_component_param_connectors = [
|
250
|
+
SubComponentParamConnector.from_et(el, doc_frags) for el in et_element.iterfind(
|
251
|
+
"SUB-COMPONENT-PARAM-CONNECTORS/SUB-COMPONENT-PARAM-CONNECTOR")
|
252
|
+
]
|
253
|
+
table_row_connectors = [
|
254
|
+
TableRowConnector.from_et(el, doc_frags)
|
255
|
+
for el in et_element.iterfind("TABLE-ROW-CONNECTORS/TABLE-ROW-CONNECTOR")
|
256
|
+
]
|
257
|
+
env_data_connectors = [
|
258
|
+
EnvDataConnector.from_et(el, doc_frags)
|
259
|
+
for el in et_element.iterfind("ENV-DATA-CONNECTORS/ENV-DATA-CONNECTOR")
|
260
|
+
]
|
261
|
+
dtc_connectors = [
|
262
|
+
DtcConnector.from_et(el, doc_frags)
|
263
|
+
for el in et_element.iterfind("DTC-CONNECTORS/DTC-CONNECTOR")
|
264
|
+
]
|
265
|
+
|
266
|
+
return SubComponent(
|
267
|
+
semantic=semantic,
|
268
|
+
sub_component_param_connectors=NamedItemList(sub_component_param_connectors),
|
269
|
+
table_row_connectors=NamedItemList(table_row_connectors),
|
270
|
+
env_data_connectors=NamedItemList(env_data_connectors),
|
271
|
+
dtc_connectors=NamedItemList(dtc_connectors),
|
272
|
+
**kwargs)
|
273
|
+
|
274
|
+
def _build_odxlinks(self) -> Dict[OdxLinkId, Any]:
|
275
|
+
result = {}
|
276
|
+
|
277
|
+
for dtc_conn in self.dtc_connectors:
|
278
|
+
result.update(dtc_conn._build_odxlinks())
|
279
|
+
|
280
|
+
return result
|
281
|
+
|
282
|
+
def _resolve_odxlinks(self, odxlinks: OdxLinkDatabase) -> None:
|
283
|
+
for dtc_conn in self.dtc_connectors:
|
284
|
+
dtc_conn._resolve_odxlinks(odxlinks)
|
285
|
+
|
286
|
+
def _resolve_snrefs(self, context: SnRefContext) -> None:
|
287
|
+
for dtc_conn in self.dtc_connectors:
|
288
|
+
dtc_conn._resolve_snrefs(context)
|
@@ -22,6 +22,7 @@
|
|
22
22
|
{%- import('macros/printResponse.xml.jinja2') as presp %}
|
23
23
|
{%- import('macros/printStateChart.xml.jinja2') as psc %}
|
24
24
|
{%- import('macros/printAudience.xml.jinja2') as paud %}
|
25
|
+
{%- import('macros/printSubComponent.xml.jinja2') as psubcomp %}
|
25
26
|
{%- import('macros/printLibrary.xml.jinja2') as plib %}
|
26
27
|
{%- import('macros/printSpecialData.xml.jinja2') as psd %}
|
27
28
|
{%- import('macros/printEcuVariantPattern.xml.jinja2') as pvpat %}
|
@@ -203,6 +204,13 @@
|
|
203
204
|
{%- endfor %}
|
204
205
|
</ADDITIONAL-AUDIENCES>
|
205
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 %}
|
206
214
|
{%- if dlr.libraries %}
|
207
215
|
<LIBRARYS>
|
208
216
|
{%- for lib in dlr.libraries %}
|
@@ -0,0 +1,104 @@
|
|
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/printEcuVariantPattern.xml.jinja2') as pevp %}
|
8
|
+
|
9
|
+
{%- macro printSubComponentPattern(pat) %}
|
10
|
+
<SUB-COMPONENT-PATTERN>
|
11
|
+
<MATCHING-PARAMETERS>
|
12
|
+
{%- for mp in pat.matching_parameters %}
|
13
|
+
{{ pvp.printMatchingParameter(mp)|indent(4) }}
|
14
|
+
{%- endfor %}
|
15
|
+
</MATCHING-PARAMETERS>
|
16
|
+
</SUB-COMPONENT-PATTERN>
|
17
|
+
{%- endmacro %}
|
18
|
+
|
19
|
+
{%- macro printSubComponentParamConnector(conn) %}
|
20
|
+
<SUB-COMPONENT-PARAM-CONNECTOR{#- #} {{-peid.printElementIdAttribs(conn)}}>
|
21
|
+
{{ peid.printElementIdSubtags(conn)|indent(2) }}
|
22
|
+
<DIAG-COMM-SNREF {{- make_xml_attrib("SHORT-NAME", conn.diag_comm_snref ) }} />
|
23
|
+
{%- if conn.out_param_if_refs %}
|
24
|
+
<OUT-PARAM-IF-REFS>
|
25
|
+
{%- for snref in conn.out_param_if_refs %}
|
26
|
+
<OUT-PARAM-IF-SNREF SHORT-NAME="{{snref}}" />
|
27
|
+
{%- endfor %}
|
28
|
+
</OUT-PARAM-IF-REFS>
|
29
|
+
{%- endif %}
|
30
|
+
{%- if conn.in_param_if_refs %}
|
31
|
+
<IN-PARAM-IF-REFS>
|
32
|
+
{%- for snref in conn.in_param_if_refs %}
|
33
|
+
<IN-PARAM-IF-SNREF SHORT-NAME="{{snref}}" />
|
34
|
+
{%- endfor %}
|
35
|
+
</IN-PARAM-IF-REFS>
|
36
|
+
{%- endif %}
|
37
|
+
</SUB-COMPONENT-PARAM-CONNECTOR>
|
38
|
+
{%- endmacro %}
|
39
|
+
|
40
|
+
{%- macro printTableRowConnector(conn) %}
|
41
|
+
<TABLE-ROW-CONNECTOR>
|
42
|
+
{{ peid.printElementIdSubtags(conn)|indent(2) }}
|
43
|
+
<TABLE-REF ID-REF="{{ conn.table_ref.ref_id }}" />
|
44
|
+
<TABLE-ROW-SNREF {{- make_xml_attrib("SHORT-NAME", conn.table_row_snref ) }} />
|
45
|
+
</TABLE-ROW-CONNECTOR>
|
46
|
+
{%- endmacro %}
|
47
|
+
|
48
|
+
{%- macro printEnvDataConnector(conn) %}
|
49
|
+
<ENV-DATA-CONNECTOR>
|
50
|
+
{{ peid.printElementIdSubtags(conn)|indent(2) }}
|
51
|
+
<ENV-DATA-DESC-REF ID-REF="{{ conn.env_data_desc_ref.ref_id }}" />
|
52
|
+
<ENV-DATA-SNREF {{- make_xml_attrib("SHORT-NAME", conn.env_data_snref ) }} />
|
53
|
+
</ENV-DATA-CONNECTOR>
|
54
|
+
{%- endmacro %}
|
55
|
+
|
56
|
+
{%- macro printDtcConnector(conn) %}
|
57
|
+
<DTC-CONNECTOR>
|
58
|
+
{{ peid.printElementIdSubtags(conn)|indent(2) }}
|
59
|
+
<DTC-DOP-REF ID-REF="{{ conn.dtc_dop_ref.ref_id }}" />
|
60
|
+
<DOP-SNREF {{- make_xml_attrib("SHORT-NAME", conn.dtc_snref ) }} />
|
61
|
+
</DTC-CONNECTOR>
|
62
|
+
{%- endmacro %}
|
63
|
+
|
64
|
+
{%- macro printSubComponent(sc) %}
|
65
|
+
<SUB-COMPONENT{#- #} {{-peid.printElementIdAttribs(sc)}}
|
66
|
+
{{- make_xml_attrib("SEMANTIC", sc.semantic) }}>
|
67
|
+
{{ peid.printElementIdSubtags(sc)|indent(2) }}
|
68
|
+
{%- if sc.sub_component_patterns %}
|
69
|
+
<SUB-COMPONENT-PATTERNS>
|
70
|
+
{%- for scp in sc.sub_component_patterns %}
|
71
|
+
{{ printSubComponentPattern(scp)|indent(4) }}
|
72
|
+
{%- endfor %}
|
73
|
+
</SUB-COMPONENT-PATTERNS>
|
74
|
+
{%- endif %}
|
75
|
+
{%- if sc.sub_component_param_connectors %}
|
76
|
+
<SUB-COMPONENT-PARAM-CONNECTORS>
|
77
|
+
{%- for conn in sc.sub_component_param_connectors %}
|
78
|
+
{{ printSubComponentParamConnector(conn)|indent(4) }}
|
79
|
+
{%- endfor %}
|
80
|
+
</SUB-COMPONENT-PARAM-CONNECTORS>
|
81
|
+
{%- endif %}
|
82
|
+
{%- if sc.table_row_connectors %}
|
83
|
+
<TABLE-ROW-CONNECTORS>
|
84
|
+
{%- for conn in sc.table_row_connectors %}
|
85
|
+
{{ printTableRowConnector(conn)|indent(4) }}
|
86
|
+
{%- endfor %}
|
87
|
+
</TABLE-ROW-CONNECTORS>
|
88
|
+
{%- endif %}
|
89
|
+
{%- if sc.env_data_connectors %}
|
90
|
+
<ENV-DATA-CONNECTORS>
|
91
|
+
{%- for conn in sc.env_data_connectors %}
|
92
|
+
{{ printEnvDataConnector(conn)|indent(4) }}
|
93
|
+
{%- endfor %}
|
94
|
+
</ENV-DATA-CONNECTORS>
|
95
|
+
{%- endif %}
|
96
|
+
{%- if sc.dtc_connectors %}
|
97
|
+
<DTC-CONNECTORS>
|
98
|
+
{%- for conn in sc.dtc_connectors %}
|
99
|
+
{{ printDtcConnector(conn)|indent(4) }}
|
100
|
+
{%- endfor %}
|
101
|
+
</DTC-CONNECTORS>
|
102
|
+
{%- endif %}
|
103
|
+
</SUB-COMPONENT>
|
104
|
+
{%- endmacro %}
|
odxtools/version.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: odxtools
|
3
|
-
Version: 8.
|
3
|
+
Version: 8.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>
|
@@ -93,6 +93,7 @@ odxtools/statechart.py,sha256=ZT8amPjec25pexwnOAPiifGEmKa68rliOILLnB6tNJc,2956
|
|
93
93
|
odxtools/statetransition.py,sha256=axZ1ePyyWAsxslTI5KDjZxC42uNyoPc6N7cNIhP5pxE,1860
|
94
94
|
odxtools/staticfield.py,sha256=NBZa5UZD4BD4UekpqF5bq_IzFjxUafmvpCHIEptOl-s,4434
|
95
95
|
odxtools/structure.py,sha256=W8uX1YQuJUApKfeLxYqlnU3EZ3AjTqcYpCUStR43ORI,582
|
96
|
+
odxtools/subcomponent.py,sha256=OPnpbliL7OTfYy9dR0hpQclyqQiTUEa2e2n7GmIoZVE,10401
|
96
97
|
odxtools/swvariable.py,sha256=tp8XJUokYOcAUkrQLM92IYDf7evIefwZR_DgMm33iYQ,622
|
97
98
|
odxtools/table.py,sha256=zgpVveH8neSNhdcsPp0jG4f6H00M0NKCuAME8MSrf-Q,4024
|
98
99
|
odxtools/tablerow.py,sha256=hOi7FCX7TiCRxErCD1hKU6h2hT5_8V3ghtt8dJXOiQY,6307
|
@@ -103,7 +104,7 @@ odxtools/unitgroup.py,sha256=_WNpnYFmkiHQnOY8XhIviiQLXziY3kplH--7ufAWXyI,2067
|
|
103
104
|
odxtools/unitspec.py,sha256=RMdEQoLrPhGt9vo32fkwbTqymicHFkFQnydFoi3uBog,2924
|
104
105
|
odxtools/utils.py,sha256=PJFXkG74BzoheurrDYOwHZ6EuIcr1sdxf1tQGk6zSgs,1122
|
105
106
|
odxtools/variablegroup.py,sha256=--5sMDOMUg4I3hFyoVOFcGCTOrctrrMADdmH3Mn4wHk,848
|
106
|
-
odxtools/version.py,sha256=
|
107
|
+
odxtools/version.py,sha256=j47e8zDIT9nXsPhJuJRzlh56ZyB-E1uGl-54XUFn9kk,411
|
107
108
|
odxtools/writepdxfile.py,sha256=ZEoNkSxheqnXm836-HOpd04O6ipMXYKFzXZy6PM0YLc,7813
|
108
109
|
odxtools/xdoc.py,sha256=gDq-8l8x-Tj1ZJOttPxZchcO5_jEPwcXxMgT29VgTS0,1433
|
109
110
|
odxtools/cli/__init__.py,sha256=T7ano_FIyzBASxYpmcA5VJXU5bQLIy_Qk0HE_SDKelY,106
|
@@ -139,8 +140,8 @@ odxtools/compumethods/tabintpcompumethod.py,sha256=Gyf2qV5y53SHIcum5d5HQVGszoZCd
|
|
139
140
|
odxtools/compumethods/texttablecompumethod.py,sha256=vDYafbM0YaipjfN0NSlCFMiIPvp8waMNj3thNcwuYgk,5929
|
140
141
|
odxtools/diaglayers/basevariant.py,sha256=mXS-SF-tcwtdV-rxZZCH6_yqdA-yhtMX1SGo1MS8w7k,4452
|
141
142
|
odxtools/diaglayers/basevariantraw.py,sha256=A9h6p2Ri0sPPTW217rtEdNpAt5g6t0MwP9sgXqZ8pFo,4673
|
142
|
-
odxtools/diaglayers/diaglayer.py,sha256=
|
143
|
-
odxtools/diaglayers/diaglayerraw.py,sha256=
|
143
|
+
odxtools/diaglayers/diaglayer.py,sha256=aCL4dMehy-Q4JXp7ReRYxL0RwSJk-w2V7tvX7nN4ilg,16237
|
144
|
+
odxtools/diaglayers/diaglayerraw.py,sha256=rQEH3Jzg6bzTmu0EyYhAoBlsL6qVm7Z46o2xlbL0nEo,12970
|
144
145
|
odxtools/diaglayers/diaglayertype.py,sha256=FXL-EVBdrAURuHSHo9OthFuEYEybQO66aMB1o2GxVdI,1340
|
145
146
|
odxtools/diaglayers/ecushareddata.py,sha256=QoV50wQIrJ2-faLtU1P7RrjdacbhPY2BfUtVtIyWqCM,3347
|
146
147
|
odxtools/diaglayers/ecushareddataraw.py,sha256=cvkBhqTLOAey7Pt1bjQ3Jkkenp-D3Zh5djpB4ZWWUvw,3375
|
@@ -182,7 +183,7 @@ odxtools/templates/macros/printCompuMethod.xml.jinja2,sha256=9DilxMWnqOsXu7bNNlD
|
|
182
183
|
odxtools/templates/macros/printDOP.xml.jinja2,sha256=t-6U0gZLdV2n6-YW5pkVFnHNVTAOnfqMch-mk_fGyjo,5146
|
183
184
|
odxtools/templates/macros/printDescription.xml.jinja2,sha256=7jcYEIXr7hbbKqSvIUIgXaQSXV4dKAR9UhY352BZct8,452
|
184
185
|
odxtools/templates/macros/printDiagComm.xml.jinja2,sha256=_SByYBYzPG9t7VNnAohFAXsgng9VrQcSacXH923wRzY,2239
|
185
|
-
odxtools/templates/macros/printDiagLayer.xml.jinja2,sha256=
|
186
|
+
odxtools/templates/macros/printDiagLayer.xml.jinja2,sha256=gQQhNGpVQRfVichgJdwBS6gMvoLfi-nlGat9imlW62Y,6901
|
186
187
|
odxtools/templates/macros/printDiagVariable.xml.jinja2,sha256=sQEU42Onf0WkRJZJyNUgeeGICc3MZaQJPQ0YKY6lRrU,2656
|
187
188
|
odxtools/templates/macros/printDynDefinedSpec.xml.jinja2,sha256=uX3C40VmlbH7sndlJNyTvq8upzaoq8vCk6S93gtpFIY,1742
|
188
189
|
odxtools/templates/macros/printDynamicEndmarkerField.xml.jinja2,sha256=6BmxPKesQvfy46iTiPSFu_iJffC6umZ_YRsTEd-0y5Q,587
|
@@ -213,11 +214,12 @@ odxtools/templates/macros/printStateChart.xml.jinja2,sha256=XW1EhF1k8ogbEDt-QMjS
|
|
213
214
|
odxtools/templates/macros/printStateTransition.xml.jinja2,sha256=J2t0yU82UBegUSH9sAbnkdgEYPTUU0A7I-CokuPQxDo,510
|
214
215
|
odxtools/templates/macros/printStaticField.xml.jinja2,sha256=fkV07zrL2pTo6b5ZPD14V0uC1aEk2P4roXyDhp-ah38,521
|
215
216
|
odxtools/templates/macros/printStructure.xml.jinja2,sha256=CJUPZv_9lko63C5fNpOn5LlQqLCuS--qyhtx4NyD5Rk,567
|
217
|
+
odxtools/templates/macros/printSubComponent.xml.jinja2,sha256=ETo-k0K7px5nu9kgVjgDnjPoy8rYRfzq5ojvsZhM3Rw,3416
|
216
218
|
odxtools/templates/macros/printTable.xml.jinja2,sha256=5DQjjJ-UxQ75ntov0S0LGnm_V7YWtKadBpNbmV1aBb8,1501
|
217
219
|
odxtools/templates/macros/printUnitSpec.xml.jinja2,sha256=opS6_Gr94WlAtREEyX4sLo-D-17Gni9Wvr3y1nfVgSA,2715
|
218
|
-
odxtools-8.
|
219
|
-
odxtools-8.
|
220
|
-
odxtools-8.
|
221
|
-
odxtools-8.
|
222
|
-
odxtools-8.
|
223
|
-
odxtools-8.
|
220
|
+
odxtools-8.3.1.dist-info/LICENSE,sha256=NeGPFQdTa6EKeON3aShVlPAIquJnbbiOfj0suz6rzyQ,1074
|
221
|
+
odxtools-8.3.1.dist-info/METADATA,sha256=Ithh6Q0qSLSpzHYKciZ3NA-hZNdvaItrk4kaRL8WHXw,44084
|
222
|
+
odxtools-8.3.1.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
|
223
|
+
odxtools-8.3.1.dist-info/entry_points.txt,sha256=_sBDzuNoT8LbbCjfc-OJiUt5WPrtOq_x-rr9txhrPjY,53
|
224
|
+
odxtools-8.3.1.dist-info/top_level.txt,sha256=pdS02kE5ZdgsaBRZDpX3NBFlaSx3zotsqX4E4V6tXEI,9
|
225
|
+
odxtools-8.3.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|