armodel 1.4.0__py3-none-any.whl → 1.5.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 (72) hide show
  1. armodel/__init__.py +2 -1
  2. armodel/cli/arxml_dump_cli.py +9 -7
  3. armodel/cli/arxml_format_cli.py +72 -0
  4. armodel/cli/connector_update_cli.py +11 -4
  5. armodel/data_models/__init__.py +0 -0
  6. armodel/data_models/sw_connector.py +22 -0
  7. armodel/lib/data_analyzer.py +1 -1
  8. armodel/models/__init__.py +3 -2
  9. armodel/models/annotation.py +20 -0
  10. armodel/models/ar_object.py +163 -18
  11. armodel/models/ar_package.py +228 -24
  12. armodel/models/ar_ref.py +85 -6
  13. armodel/models/bsw_module_template.py +113 -27
  14. armodel/models/calibration.py +107 -4
  15. armodel/models/common_structure.py +142 -52
  16. armodel/models/communication.py +10 -1
  17. armodel/models/data_def_properties.py +16 -0
  18. armodel/models/data_dictionary.py +46 -9
  19. armodel/models/data_prototype.py +24 -5
  20. armodel/models/datatype.py +69 -20
  21. armodel/models/end_to_end_protection.py +67 -0
  22. armodel/models/fibex/__init__.py +0 -0
  23. armodel/models/fibex/can_communication.py +6 -0
  24. armodel/models/fibex/fibex_4_multiplatform.py +145 -0
  25. armodel/models/fibex/fibex_core.py +341 -0
  26. armodel/models/fibex/lin_communication.py +17 -0
  27. armodel/models/fibex/lin_topology.py +7 -0
  28. armodel/models/general_structure.py +44 -18
  29. armodel/models/global_constraints.py +4 -4
  30. armodel/models/implementation.py +79 -32
  31. armodel/models/internal_behavior.py +63 -0
  32. armodel/models/m2_msr.py +6 -4
  33. armodel/models/mode_declaration.py +8 -0
  34. armodel/models/multilanguage_data.py +42 -0
  35. armodel/models/per_instance_memory.py +14 -0
  36. armodel/models/port_interface.py +27 -4
  37. armodel/models/port_prototype.py +57 -19
  38. armodel/models/record_layout.py +118 -0
  39. armodel/models/rpt_scenario.py +20 -0
  40. armodel/models/service_mapping.py +11 -0
  41. armodel/models/service_needs.py +48 -0
  42. armodel/models/sw_component.py +293 -45
  43. armodel/models/system_template/__init__.py +0 -0
  44. armodel/models/system_template/network_management.py +7 -0
  45. armodel/models/system_template/transport_protocols.py +7 -0
  46. armodel/models/timing.py +91 -0
  47. armodel/parser/abstract_arxml_parser.py +248 -0
  48. armodel/parser/arxml_parser.py +1571 -844
  49. armodel/parser/connector_xlsx_parser.py +190 -0
  50. armodel/parser/excel_parser.py +18 -0
  51. armodel/tests/test_armodel/models/test_ar_object.py +152 -0
  52. armodel/tests/test_armodel/models/test_ar_package.py +1 -1
  53. armodel/tests/test_armodel/models/test_common_structure.py +2 -2
  54. armodel/tests/test_armodel/models/test_data_dictionary.py +7 -7
  55. armodel/tests/test_armodel/models/test_data_prototype.py +3 -3
  56. armodel/tests/test_armodel/models/test_datatype.py +11 -11
  57. armodel/tests/test_armodel/models/test_general_structure.py +1 -1
  58. armodel/tests/test_armodel/models/test_implementation.py +26 -0
  59. armodel/tests/test_armodel/models/test_m2_msr.py +4 -4
  60. armodel/tests/test_armodel/models/test_port_interface.py +5 -5
  61. armodel/tests/test_armodel/parser/test_arxml_parser.py +15 -0
  62. armodel/tests/test_armodel/parser/test_parse_bswmd.py +74 -42
  63. armodel/tests/test_armodel/parser/test_sw_components.py +93 -0
  64. armodel/writer/abstract_arxml_writer.py +123 -0
  65. armodel/writer/arxml_writer.py +1701 -358
  66. {armodel-1.4.0.dist-info → armodel-1.5.0.dist-info}/METADATA +114 -3
  67. armodel-1.5.0.dist-info/RECORD +91 -0
  68. {armodel-1.4.0.dist-info → armodel-1.5.0.dist-info}/WHEEL +1 -1
  69. {armodel-1.4.0.dist-info → armodel-1.5.0.dist-info}/entry_points.txt +2 -0
  70. armodel-1.4.0.dist-info/RECORD +0 -60
  71. {armodel-1.4.0.dist-info → armodel-1.5.0.dist-info}/LICENSE +0 -0
  72. {armodel-1.4.0.dist-info → armodel-1.5.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,341 @@
1
+ from abc import ABCMeta
2
+ from typing import List
3
+
4
+ from armodel.models.ar_ref import RefType
5
+
6
+ from ..ar_object import ARFloat, ARLiteral, ARNumerical, ARObject, ARPositiveInteger
7
+ from ..general_structure import Identifiable
8
+
9
+
10
+ class FibexElement(Identifiable):
11
+ __metaclass__ = ABCMeta
12
+
13
+ def __init__(self, parent: ARObject, short_name: str):
14
+ if type(self) == FibexElement:
15
+ raise NotImplementedError("FibexElement is an abstract class.")
16
+
17
+ super().__init__(parent, short_name)
18
+
19
+ class PhysicalChannel (Identifiable):
20
+ __metaclass__ = ABCMeta
21
+
22
+ def __init__(self, parent: ARObject, short_name: str):
23
+ if type(self) == PhysicalChannel:
24
+ raise NotImplementedError("PhysicalChannel is an abstract class.")
25
+
26
+ super().__init__(parent, short_name)
27
+
28
+
29
+ class CommunicationCluster(FibexElement):
30
+ __metaclass__ = ABCMeta
31
+
32
+ def __init__(self, parent: ARObject, short_name: str):
33
+ if type(self) == CommunicationCluster:
34
+ raise NotImplementedError("CommunicationCluster is an abstract class.")
35
+
36
+ super().__init__(parent, short_name)
37
+
38
+ self.baudrate = None # type: ARFloat
39
+ self.physical_channels = [] # type: List[PhysicalChannel]
40
+ self.protocol_name = None # type: ARLiteral
41
+ self.protocol_version = None # type: ARLiteral
42
+
43
+ def addPhysicalChannel(self, channel: PhysicalChannel):
44
+ self.physical_channels.append(channel)
45
+
46
+ def getPhysicalChannels(self) -> List[PhysicalChannel]:
47
+ return self.physical_channels
48
+
49
+ @property
50
+ def protocolName(self) -> ARLiteral:
51
+ return self.protocol_name
52
+
53
+ @protocolName.setter
54
+ def protocolName(self, value: ARLiteral):
55
+ self.protocol_name = value
56
+
57
+ @property
58
+ def protocolVersion(self) -> ARLiteral:
59
+ return self.protocol_version
60
+
61
+ @protocolVersion.setter
62
+ def protocolVersion(self, value: ARLiteral):
63
+ self.protocol_version = value
64
+
65
+ class Pdu(FibexElement):
66
+ __metaclass__ = ABCMeta
67
+
68
+ def __init__(self, parent: ARObject, short_name: str):
69
+ if type(self) == Pdu:
70
+ raise NotImplementedError("Pdu is an abstract class.")
71
+
72
+ super().__init__(parent, short_name)
73
+
74
+ self.length = None # type: ARNumerical
75
+
76
+ class PduToFrameMapping(Identifiable):
77
+ def __init__(self, parent: ARObject, short_name: str):
78
+ super().__init__(parent, short_name)
79
+
80
+ self.packing_byte_order = None # type: ARLiteral
81
+ self.pdu_ref = None # type: RefType
82
+ self.start_position = None # type: ARNumerical
83
+
84
+ @property
85
+ def packingByteOrder(self) -> ARLiteral:
86
+ return self.packing_byte_order
87
+
88
+ @packingByteOrder.setter
89
+ def packingByteOrder(self, value: ARLiteral):
90
+ self.packing_byte_order = value
91
+
92
+ @property
93
+ def pduRef(self) -> RefType:
94
+ return self.pdu_ref
95
+
96
+ @pduRef.setter
97
+ def pduRef(self, value: RefType):
98
+ self.pdu_ref = value
99
+
100
+ @property
101
+ def startPosition(self) -> ARNumerical:
102
+ return self.start_position
103
+
104
+ @startPosition.setter
105
+ def startPosition(self, value: ARNumerical):
106
+ self.start_position = value
107
+
108
+ class Frame(Identifiable):
109
+ __metaclass__ = ABCMeta
110
+
111
+ def __init__(self, parent: ARObject, short_name: str):
112
+ if type(self) == Frame:
113
+ raise NotImplementedError("Frame is an abstract class.")
114
+
115
+ super().__init__(parent, short_name)
116
+
117
+ self.frame_length = None
118
+ self.pdu_to_frame_mappings = [] # type: List[PduToFrameMapping]
119
+
120
+ @property
121
+ def frameLength(self) -> ARNumerical:
122
+ return self.frame_length
123
+
124
+ @frameLength.setter
125
+ def frameLength(self, value: ARNumerical):
126
+ self.frame_length = value
127
+
128
+ def createPduToFrameMapping(self, short_name: str) -> PduToFrameMapping:
129
+ if (short_name not in self.elements):
130
+ mapping = PduToFrameMapping(self, short_name)
131
+ self.elements[short_name] = mapping
132
+ self.pdu_to_frame_mappings.append(mapping)
133
+ return self.elements[short_name]
134
+
135
+ def getPduToFrameMappings(self) -> List[PduToFrameMapping]:
136
+ return list(sorted(filter(lambda a: isinstance(a, PduToFrameMapping), self.elements.values()), key= lambda o:o.short_name))
137
+
138
+ class ContainedIPduProps(ARObject):
139
+ def __init__(self):
140
+ super().__init__()
141
+
142
+ self._collection_semantics = None # type: ARLiteral
143
+ self._header_id_long_header = None # type: ARPositiveInteger
144
+ self._header_id_short_header = None # type: ARPositiveInteger
145
+ self._offset = None # type: ARNumerical
146
+ self._timeout = None # type: ARNumerical
147
+ self._trigger = None # type: ARLiteral
148
+ self._update_indication_bit_position = None # type: ARNumerical
149
+
150
+ @property
151
+ def headerIdLongHeader(self) -> ARPositiveInteger:
152
+ return self._header_id_long_header
153
+
154
+ @headerIdLongHeader.setter
155
+ def headerIdLongHeader(self, value: ARPositiveInteger):
156
+ self._header_id_long_header = value
157
+
158
+ @property
159
+ def headerIdShortHeader(self) -> ARPositiveInteger:
160
+ return self._header_id_short_header
161
+
162
+ @headerIdShortHeader.setter
163
+ def headerIdShortHeader(self, value: ARPositiveInteger):
164
+ self._header_id_short_header = value
165
+
166
+ @property
167
+ def offset(self) -> ARNumerical:
168
+ return self._offset
169
+
170
+ @offset.setter
171
+ def offset(self, value: ARNumerical):
172
+ self._offset = value
173
+
174
+ @property
175
+ def timeout(self):
176
+ return self._timeout
177
+
178
+ @timeout.setter
179
+ def timeout(self, value):
180
+ self._timeout = value
181
+
182
+ @property
183
+ def collectionSemantics(self) -> ARLiteral:
184
+ return self._collection_semantics
185
+
186
+ @collectionSemantics.setter
187
+ def collectionSemantics(self, value: ARLiteral):
188
+ self._collection_semantics = value
189
+
190
+ @property
191
+ def trigger(self) -> ARLiteral:
192
+ return self._trigger
193
+
194
+ @trigger.setter
195
+ def trigger(self, value: ARLiteral):
196
+ self._trigger = value
197
+
198
+ @property
199
+ def updateIndicationBitPosition(self) -> ARNumerical:
200
+ return self._update_indication_bit_position
201
+
202
+ @updateIndicationBitPosition.setter
203
+ def updateIndicationBitPosition(self, value: ARNumerical):
204
+ self._update_indication_bit_position = value
205
+
206
+ class IPdu(Pdu):
207
+ __metaclass__ = ABCMeta
208
+
209
+ def __init__(self, parent: ARObject, short_name: str):
210
+ if type(self) == IPdu:
211
+ raise NotImplementedError("IPdu is an abstract class.")
212
+
213
+ super().__init__(parent, short_name)
214
+
215
+ self._contained_ipdu_props = None # type: ContainedIPduProps
216
+
217
+ @property
218
+ def containedIPduProps(self) -> ContainedIPduProps:
219
+ return self._contained_ipdu_props
220
+
221
+ @containedIPduProps.setter
222
+ def containedIPduProps(self, value: ContainedIPduProps):
223
+ self._contained_ipdu_props = value
224
+
225
+
226
+ class NmPdu(Pdu):
227
+ def __init__(self, parent: ARObject, short_name: str):
228
+ super().__init__(parent, short_name)
229
+
230
+
231
+ class NPdu(IPdu):
232
+ def __init__(self, parent: ARObject, short_name: str):
233
+ super().__init__(parent, short_name)
234
+
235
+ class DcmIPdu(IPdu):
236
+ def __init__(self, parent: ARObject, short_name: str):
237
+ super().__init__(parent, short_name)
238
+
239
+ class FrameTriggering(Identifiable):
240
+ __metaclass__ = ABCMeta
241
+
242
+ def __init__(self, parent: ARObject, short_name: str):
243
+ if type(self) == FrameTriggering:
244
+ raise NotImplementedError("FrameTriggering is an abstract class.")
245
+
246
+ super().__init__(parent, short_name)
247
+
248
+ class ISignal(FibexElement):
249
+ def __init__(self, parent: ARObject, short_name: str):
250
+ super().__init__(parent, short_name)
251
+
252
+ self._data_transformation_ref = None
253
+ self._data_type_policy = None
254
+ self._i_signal_props = None
255
+ self._i_signal_type = None
256
+ self._init_value = None
257
+ self._length = None
258
+ self._network_representation_props = None
259
+ self._system_signal_ref = None # type: RefType
260
+ self._timeout_substitution_value = None
261
+ self._transformation_i_signal_props = []
262
+
263
+ @property
264
+ def dataTransformationRef(self):
265
+ return self._data_transformation_ref
266
+
267
+ @dataTransformationRef.setter
268
+ def dataTransformationRef(self, value):
269
+ self._data_transformation_ref = value
270
+
271
+ @property
272
+ def dataTypePolicy(self):
273
+ return self._data_type_policy
274
+
275
+ @dataTypePolicy.setter
276
+ def dataTypePolicy(self, value):
277
+ self._data_type_policy = value
278
+
279
+ @property
280
+ def iSignalProps(self):
281
+ return self._i_signal_props
282
+
283
+ @iSignalProps.setter
284
+ def iSignalProps(self, value):
285
+ self._i_signal_props = value
286
+
287
+ @property
288
+ def iSignalType(self):
289
+ return self._i_signal_type
290
+
291
+ @iSignalType.setter
292
+ def iSignalType(self, value):
293
+ self._i_signal_type = value
294
+
295
+ @property
296
+ def initValue(self):
297
+ return self._init_value
298
+
299
+ @initValue.setter
300
+ def initValue(self, value):
301
+ self._init_value = value
302
+
303
+ @property
304
+ def length(self):
305
+ return self._length
306
+
307
+ @length.setter
308
+ def length(self, value):
309
+ self._length = value
310
+
311
+ @property
312
+ def networkRepresentationProps(self):
313
+ return self._network_representation_props
314
+
315
+ @networkRepresentationProps.setter
316
+ def networkRepresentationProps(self, value):
317
+ self._network_representation_props = value
318
+
319
+ @property
320
+ def systemSignalRef(self):
321
+ return self._system_signal_ref
322
+
323
+ @systemSignalRef.setter
324
+ def systemSignalRef(self, value):
325
+ self._system_signal_ref = value
326
+
327
+ @property
328
+ def timeoutSubstitutionValue(self):
329
+ return self._timeout_substitution_value
330
+
331
+ @timeoutSubstitutionValue.setter
332
+ def timeoutSubstitutionValue(self, value):
333
+ self._timeout_substitution_value = value
334
+
335
+ @property
336
+ def transformationISignalProps(self):
337
+ return self._transformation_i_signal_props
338
+
339
+ @transformationISignalProps.setter
340
+ def transformationISignalProps(self, value):
341
+ self._transformation_i_signal_props = value
@@ -0,0 +1,17 @@
1
+
2
+ from abc import ABCMeta
3
+ from ..ar_object import ARObject
4
+ from .fibex_core import Frame
5
+
6
+ class LinFrame(Frame):
7
+ __metaclass__ = ABCMeta
8
+
9
+ def __init__(self, parent: ARObject, short_name: str):
10
+ if type(self) == LinFrame:
11
+ raise NotImplementedError("LinFrame is an abstract class.")
12
+
13
+ super().__init__(parent, short_name)
14
+
15
+ class LinUnconditionalFrame(LinFrame):
16
+ def __init__(self, parent: ARObject, short_name: str):
17
+ super().__init__(parent, short_name)
@@ -0,0 +1,7 @@
1
+
2
+ from ..ar_object import ARObject
3
+ from .fibex_core import CommunicationCluster
4
+
5
+ class LinCluster(CommunicationCluster):
6
+ def __init__(self, parent: ARObject, short_name: str):
7
+ super().__init__(parent, short_name)
@@ -1,9 +1,10 @@
1
1
  from abc import ABCMeta
2
2
  from typing import List
3
3
 
4
+ from .ar_ref import RefType
5
+ from .multilanguage_data import MultiLanguageOverviewParagraph, MultilanguageLongName
4
6
  from .ar_object import ARObject
5
7
 
6
-
7
8
  class Sd(ARObject):
8
9
  def __init__(self):
9
10
  super().__init__()
@@ -47,20 +48,38 @@ class Referrable(ARObject, metaclass=ABCMeta):
47
48
  raise NotImplementedError("Referrable is an abstract class.")
48
49
  ARObject.__init__(self)
49
50
 
50
- self.parent = parent
51
+ self._parent = parent
51
52
  self.short_name = short_name
52
53
 
54
+ @property
55
+ def parent(self):
56
+ return self._parent
57
+
58
+ @parent.setter
59
+ def parent(self, value):
60
+ self._parent = value
61
+
62
+ @property
63
+ def shortName(self):
64
+ return self.short_name
65
+
66
+ @shortName.setter
67
+ def shortName(self, value):
68
+ self.short_name = value
69
+
53
70
  @property
54
71
  def full_name(self) -> str:
55
- return self.parent.full_name + "/" + self.short_name
72
+ return self._parent.full_name + "/" + self.short_name
56
73
 
57
74
  class MultilanguageReferrable(Referrable, metaclass=ABCMeta):
58
75
  def __init__(self, parent: ARObject, short_name: str):
59
76
  if type(self) == MultilanguageReferrable:
60
77
  raise NotImplementedError("MultilanguageReferrable is an abstract class.")
78
+
61
79
  super().__init__(parent, short_name)
62
- self.parent = parent
63
- self.long_name = None
80
+
81
+ self._parent = parent
82
+ self.long_name = None # type: MultilanguageLongName
64
83
 
65
84
  class CollectableElement(ARObject, metaclass=ABCMeta):
66
85
  def __init__(self):
@@ -71,6 +90,11 @@ class CollectableElement(ARObject, metaclass=ABCMeta):
71
90
  def getTotalElement(self) -> int:
72
91
  #return len(list(filter(lambda a: not isinstance(a, ARPackage) , self.elements.values())))
73
92
  return len(self.elements.values())
93
+
94
+ def removeElement(self, key):
95
+ if key not in self.elements:
96
+ raise KeyError("Invalid key <%s> for removing element" % key)
97
+ self.elements.pop(key)
74
98
 
75
99
  def getElements(self):
76
100
  return self.elements.values()
@@ -89,7 +113,7 @@ class Identifiable(MultilanguageReferrable, CollectableElement, metaclass=ABCMet
89
113
 
90
114
  self.admin_data = None # type: AdminData
91
115
  self._category = None
92
- self.desc = None
116
+ self.desc = None # type: MultiLanguageOverviewParagraph
93
117
 
94
118
  @property
95
119
  def category(self):
@@ -122,24 +146,24 @@ class SwcBswRunnableMapping(ARObject):
122
146
  '''
123
147
  super().__init__()
124
148
 
125
- self.bsw_entity_ref = None # type: RefType
126
- self.swc_runnable_ref = None # type: RefType
149
+ self.bswEntityRef = None # type: RefType
150
+ self.swcRunnableRef = None # type: RefType
127
151
 
128
152
  class SwcBswMapping(Identifiable):
129
153
  def __init__(self, parent: ARObject, short_name: str):
130
154
  super().__init__(parent, short_name)
131
155
 
132
- self.bsw_behavior_ref = None # type: RefType
133
- self.runnable_mappings = []
134
- self.swc_behavior_ref = None # type: RefType
135
- self.synchronized_mode_groups = []
136
- self.synchronized_triggers = []
156
+ self.bswBehaviorRef = None # type: RefType
157
+ self._runnableMappings = []
158
+ self.swcBehaviorRef = None # type: RefType
159
+ self.synchronizedModeGroups = []
160
+ self.synchronizedTriggers = []
137
161
 
138
162
  def addRunnableMapping(self, mapping: SwcBswRunnableMapping):
139
- self.runnable_mappings.append(mapping)
163
+ self._runnableMappings.append(mapping)
140
164
 
141
165
  def getRunnableMappings(self) -> List[SwcBswRunnableMapping]:
142
- return self.runnable_mappings
166
+ return self._runnableMappings
143
167
 
144
168
  class ARElement(PackageableElement, metaclass=ABCMeta):
145
169
  def __init__(self, parent: ARObject, short_name: str):
@@ -154,7 +178,9 @@ class AtpStructureElement(AtpFeature, metaclass=ABCMeta):
154
178
  raise NotImplementedError("AtpStructureElement is an abstract class.")
155
179
  super().__init__(parent, short_name)
156
180
 
157
- class Limit:
181
+ class Limit(ARObject):
158
182
  def __init__(self):
159
- self.interval_type = None
160
- self.value = None
183
+ super().__init__()
184
+
185
+ self.intervalType = None # type: str
186
+ self.value = None # type: str
@@ -1,5 +1,5 @@
1
1
  from .ar_ref import RefType
2
- from .ar_object import ARObject
2
+ from .ar_object import ARNumerical, ARObject
3
3
  from .general_structure import Identifiable, Limit
4
4
 
5
5
  from typing import List
@@ -23,9 +23,9 @@ class DataConstrRule(ARObject):
23
23
  def __init__(self):
24
24
  super().__init__()
25
25
 
26
- self.constr_level = None # type: int
27
- self.internal_constrs = None # type: InternalConstrs
28
- self.phys_constrs = None # type: PhysConstrs
26
+ self.constrLevel = None # type: ARNumerical
27
+ self.internalConstrs = None # type: InternalConstrs
28
+ self.physConstrs = None # type: PhysConstrs
29
29
 
30
30
  class DataConstr(Identifiable):
31
31
  def __init__(self, parent: ARObject, short_name: str):
@@ -1,6 +1,6 @@
1
1
  from abc import ABCMeta
2
2
  from typing import List
3
- from .ar_object import ARObject
3
+ from .ar_object import ARLiteral, ARNumerical, ARObject
4
4
  from .general_structure import PackageableElement, Identifiable
5
5
  from .common_structure import ResourceConsumption
6
6
  from .ar_ref import RefType
@@ -12,10 +12,42 @@ class EngineeringObject(ARObject, metaclass=ABCMeta):
12
12
 
13
13
  super().__init__()
14
14
 
15
- self.category = ""
16
- self.domain = None # type: str
17
- self.revision_label = None # type: str
18
- self.short_label = "" # type: str
15
+ self.category = None # type: ARLiteral
16
+ self.domain = None # type: ARLiteral
17
+ self.revision_label = None # type: ARLiteral
18
+ self.short_label = None # type: ARLiteral
19
+
20
+ def setCategory(self, category: any):
21
+ if isinstance(category, ARLiteral):
22
+ self.category = category
23
+ else:
24
+ self.category = ARLiteral()
25
+ self.category.setValue(str(category))
26
+ return self
27
+
28
+ def getCategory(self) -> ARLiteral:
29
+ return self.category
30
+
31
+ def setDomain(self, domain: ARLiteral):
32
+ self.domain = domain
33
+ return self
34
+
35
+ def getDomain(self) -> ARLiteral:
36
+ return self.domain
37
+
38
+ def setRevisionLabel(self, revision_label: ARLiteral):
39
+ self.revision_label = revision_label
40
+ return self
41
+
42
+ def getRevisionLabel(self) -> ARLiteral:
43
+ return self.revision_label
44
+
45
+ def setShortLabel(self, label: ARLiteral):
46
+ self.short_label = label
47
+ return self
48
+
49
+ def getShortLabel(self) -> ARLiteral:
50
+ return self.short_label
19
51
 
20
52
  class AutosarEngineeringObject(EngineeringObject):
21
53
  def __init__(self):
@@ -25,17 +57,17 @@ class Code(Identifiable):
25
57
  def __init__(self, parent: ARObject, short_name: str):
26
58
  super().__init__(parent, short_name)
27
59
 
28
- self.artifact_descriptors = [] # type: List[AutosarEngineeringObject]
29
- self.callback_header_refs = [] # type: List[RefType]
60
+ self._artifactDescriptors = [] # type: List[AutosarEngineeringObject]
61
+ self.callbackHeaderRefs = [] # type: List[RefType]
30
62
 
31
63
  def addArtifactDescriptor(self, desc: AutosarEngineeringObject):
32
- self.artifact_descriptors.append(desc)
64
+ self._artifactDescriptors.append(desc)
33
65
 
34
66
  def getArtifactDescriptors(self, category:str = "") -> List[AutosarEngineeringObject]:
35
67
  if (category == ""):
36
- return self.artifact_descriptors
68
+ return self._artifactDescriptors
37
69
  else:
38
- return list(filter(lambda a: a.category == category, self.artifact_descriptors))
70
+ return list(filter(lambda a: a.getCategory().getText() == category, self._artifactDescriptors))
39
71
 
40
72
  class Implementation(PackageableElement, metaclass=ABCMeta):
41
73
  def __init__(self, parent: ARObject, short_name: str) -> None:
@@ -43,20 +75,21 @@ class Implementation(PackageableElement, metaclass=ABCMeta):
43
75
  raise NotImplementedError("Implementation is an abstract class.")
44
76
 
45
77
  super().__init__(parent, short_name)
46
- self.build_action_manifest = None # 0..1
47
- self.compiler = None # *
48
- self.generated_artifact = None # *
49
- self.hw_element = None # *
50
- self.linker = None # *
51
- self.mc_support = None # 0..1
52
- self.programming_language = "" # 1
53
- self.required_artifact = None # *
54
- self.required_generator_tool = None # *
55
- self.resource_consumption = None # type: ResourceConsumption
56
- self.sw_version = "" # 1
57
- self.swc_bsw_mapping_ref = None # type: RefType
58
- self.used_code_generator = "" # 0..1
59
- self.vendor_id = 0 # 1
78
+
79
+ self.build_action_manifest_ref = None # type: RefType
80
+ self.compilers = None
81
+ self.generated_artifacts = None
82
+ self.hw_element_refs = [] # type: List[RefType]
83
+ self.linker = []
84
+ self.mc_support = None
85
+ self.programming_language = None # type: ARLiteral
86
+ self.required_artifacts = []
87
+ self.required_generator_tools = []
88
+ self.resource_consumption = None # type: ResourceConsumption
89
+ self.sw_version = "" # type: ARLiteral
90
+ self.swc_bsw_mapping_ref = None # type: RefType
91
+ self.used_code_generator = None # type: ARLiteral
92
+ self.vendor_id = 0 # type: ARNumerical
60
93
 
61
94
  def createCodeDescriptor(self, short_name: str) -> Code:
62
95
  if (short_name not in self.elements):
@@ -67,22 +100,36 @@ class Implementation(PackageableElement, metaclass=ABCMeta):
67
100
  def getCodeDescriptors(self)-> List[Code]:
68
101
  return list(filter(lambda a : isinstance(a, Code), self.elements.values()))
69
102
 
103
+ def setResourceConsumption(self, consumption: ResourceConsumption):
104
+ self.elements[consumption.short_name] = consumption
105
+ self.resource_consumption = consumption
106
+ return self
107
+
108
+ def getResourceConsumption(self) -> ResourceConsumption:
109
+ return self.resource_consumption
110
+
70
111
  class BswImplementation(Implementation):
71
112
  def __init__(self, parent: ARObject, short_name: str) -> None:
72
113
  super().__init__(parent, short_name)
73
114
 
74
- self.ar_release_version = ""
75
- self.revision_label_string = "" # 1
76
- self.behavior_ref = None # type: RefType
77
- self.preconfigured_configuration_ref = None # *
78
- self.recommended_configuration_ref = None # *
79
- self.vendor_api_infix = "" # 0..1
80
- self.vendor_specific_module_def_ref = None # *
115
+ self.ar_release_version = None # type: ARLiteral
116
+ self.behavior_ref = None # type: RefType
117
+ self.preconfiguredConfigurationRef = [] # type: List[RefType]
118
+ self.recommendedConfigurationRef = [] # type: List[RefType]
119
+ self.vendorApiInfix = None # type: str
120
+ self._vendorSpecificModuleDefRef = [] # type: List[RefType]
121
+
122
+ def addVendorSpecificModuleDefRef(self, ref: RefType):
123
+ self._vendorSpecificModuleDefRef.append(ref)
81
124
 
125
+ def getVendorSpecificModuleDefRefs(self):
126
+ return self._vendorSpecificModuleDefRef
127
+
82
128
  class SwcImplementation(Implementation):
83
129
  def __init__(self, parent: ARObject, short_name: str) -> None:
84
130
  super().__init__(parent, short_name)
85
131
 
86
132
  self.behavior_ref = None # type: RefType
87
133
  self.per_instance_memory_size = None
88
- self.required_rte_vendor = ""
134
+ self.required_rte_vendor = ""
135
+