|
8 | 8 | from typing import Any
|
9 | 9 | from xml.etree import ElementTree
|
10 | 10 |
|
| 11 | +from packaging.version import Version |
| 12 | + |
11 | 13 | import odxtools.uds as uds
|
12 | 14 | from odxtools.additionalaudience import AdditionalAudience
|
13 | 15 | from odxtools.admindata import AdminData
|
|
44 | 46 | from odxtools.functionalclass import FunctionalClass
|
45 | 47 | from odxtools.modification import Modification
|
46 | 48 | from odxtools.nameditemlist import NamedItemList
|
| 49 | +from odxtools.odxdoccontext import OdxDocContext |
47 | 50 | from odxtools.odxlink import DocType, OdxDocFragment, OdxLinkId, OdxLinkRef
|
48 | 51 | from odxtools.odxtypes import DataType
|
49 | 52 | from odxtools.parameters.codedconstparameter import CodedConstParameter
|
|
76 | 79 | from odxtools.unitspec import UnitSpec
|
77 | 80 | from odxtools.xdoc import XDoc
|
78 | 81 |
|
| 82 | +ODX_VERSION = Version("2.2.0") |
| 83 | + |
79 | 84 |
|
80 | 85 | class SomersaultSID(IntEnum):
|
81 | 86 | """The Somersault-ECU specific service IDs.
|
@@ -3020,14 +3025,14 @@ class SomersaultSID(IntEnum):
|
3020 | 3025 | odx_cs_root = ElementTree.parse(odx_cs_dir / odx_cs_filename).getroot()
|
3021 | 3026 | subset = odx_cs_root.find("COMPARAM-SUBSET")
|
3022 | 3027 | if subset is not None:
|
3023 |
| - comparam_subsets.append(ComparamSubset.from_et(subset, [])) |
| 3028 | + comparam_subsets.append(ComparamSubset.from_et(subset, OdxDocContext(ODX_VERSION, []))) |
3024 | 3029 |
|
3025 | 3030 | comparam_specs = []
|
3026 | 3031 | for odx_c_filename in ("UDSOnCAN_CPS.odx-c",):
|
3027 | 3032 | odx_c_root = ElementTree.parse(odx_cs_dir / odx_c_filename).getroot()
|
3028 | 3033 | subset = odx_c_root.find("COMPARAM-SPEC")
|
3029 | 3034 | if subset is not None:
|
3030 |
| - comparam_specs.append(ComparamSpec.from_et(subset, [])) |
| 3035 | + comparam_specs.append(ComparamSpec.from_et(subset, OdxDocContext(ODX_VERSION, []))) |
3031 | 3036 |
|
3032 | 3037 | # create a database object
|
3033 | 3038 | database = Database()
|
|
0 commit comments