armodel 1.8.0__py3-none-any.whl → 1.8.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. armodel/models/M2/AUTOSARTemplates/AutosarTopLevelStructure.py +0 -1
  2. armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswBehavior.py +14 -14
  3. armodel/models/M2/AUTOSARTemplates/CommonStructure/FlatMap.py +2 -3
  4. armodel/models/M2/AUTOSARTemplates/CommonStructure/Implementation.py +1 -1
  5. armodel/models/M2/AUTOSARTemplates/CommonStructure/ImplementationDataTypes.py +7 -7
  6. armodel/models/M2/AUTOSARTemplates/CommonStructure/InternalBehavior.py +1 -1
  7. armodel/models/M2/AUTOSARTemplates/CommonStructure/ModeDeclaration.py +4 -4
  8. armodel/models/M2/AUTOSARTemplates/CommonStructure/ResourceConsumption/__init__.py +3 -3
  9. armodel/models/M2/AUTOSARTemplates/CommonStructure/Timing/TimingConstraint/ExecutionOrderConstraint.py +3 -3
  10. armodel/models/M2/AUTOSARTemplates/CommonStructure/Timing/TimingConstraint/TimingExtensions.py +3 -3
  11. armodel/models/M2/AUTOSARTemplates/ECUCDescriptionTemplate.py +86 -9
  12. armodel/models/M2/AUTOSARTemplates/ECUCParameterDefTemplate.py +1249 -0
  13. armodel/models/M2/AUTOSARTemplates/GenericStructure/AbstractStructure.py +13 -10
  14. armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ARPackage.py +238 -225
  15. armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ArObject.py +5 -4
  16. armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/Identifiable.py +46 -25
  17. armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/PrimitiveTypes.py +33 -3
  18. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Components/__init__.py +18 -20
  19. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Datatype/Datatypes.py +23 -19
  20. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/EndToEndProtection.py +4 -4
  21. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/PortInterface/__init__.py +71 -27
  22. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ServiceMapping.py +9 -9
  23. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/__init__.py +172 -128
  24. armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/FibexCore/CoreCommunication.py +11 -11
  25. armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/FibexCore/CoreTopology.py +8 -8
  26. armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/FibexCore/EcuInstance.py +2 -2
  27. armodel/models/M2/AUTOSARTemplates/SystemTemplate/NetworkManagement.py +6 -6
  28. armodel/models/M2/AUTOSARTemplates/SystemTemplate/__init__.py +6 -6
  29. armodel/models/M2/MSR/AsamHdo/AdminData.py +101 -8
  30. armodel/parser/abstract_arxml_parser.py +8 -5
  31. armodel/parser/arxml_parser.py +332 -16
  32. armodel/tests/test_armodel/models/test_ECUCParameterDefTemplate.py +116 -0
  33. armodel/tests/test_armodel/models/test_Identifiable.py +85 -0
  34. armodel/tests/test_armodel/models/test_ar_object.py +85 -86
  35. armodel/tests/test_armodel/models/test_ar_package.py +70 -70
  36. armodel/tests/test_armodel/models/test_ar_ref.py +36 -36
  37. armodel/tests/test_armodel/models/test_common_structure.py +37 -35
  38. armodel/tests/test_armodel/models/test_datatype.py +4 -4
  39. armodel/tests/test_armodel/models/test_general_structure.py +19 -18
  40. armodel/tests/test_armodel/models/test_port_interface.py +2 -6
  41. armodel/tests/test_armodel/parser/test_arxml_parser.py +8 -8
  42. armodel/writer/abstract_arxml_writer.py +6 -2
  43. armodel/writer/arxml_writer.py +376 -29
  44. {armodel-1.8.0.dist-info → armodel-1.8.1.dist-info}/METADATA +17 -1
  45. {armodel-1.8.0.dist-info → armodel-1.8.1.dist-info}/RECORD +49 -46
  46. {armodel-1.8.0.dist-info → armodel-1.8.1.dist-info}/LICENSE +0 -0
  47. {armodel-1.8.0.dist-info → armodel-1.8.1.dist-info}/WHEEL +0 -0
  48. {armodel-1.8.0.dist-info → armodel-1.8.1.dist-info}/entry_points.txt +0 -0
  49. {armodel-1.8.0.dist-info → armodel-1.8.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,1249 @@
1
+ from abc import ABCMeta
2
+ from typing import List
3
+
4
+ from ....models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import AREnum, Boolean, Float, Identifier, Limit
5
+ from ....models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import PositiveInteger, RefType, UnlimitedInteger
6
+ from ....models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import RegularExpression, String, VerbatimString
7
+ from ....models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Identifiable
8
+ from ....models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
9
+
10
+
11
+ # class EcucConditionFormula(FormulaExpression)
12
+
13
+ class EcucConditionSpecification(ARObject):
14
+ """
15
+ Represents an ECUC (Electronic Control Unit Configuration) condition specification
16
+ in the AUTOSAR model.
17
+ This class is used to define conditions that can be applied to ECUC parameters
18
+ or configurations. It inherits from the ARObject base class.
19
+ Attributes:
20
+ conditionFormula (EcucConditionFormula): Represents the formula or expression
21
+ that defines the condition. This attribute is currently commented out
22
+ and not initialized.
23
+ """
24
+ def __init__(self):
25
+ super().__init__()
26
+
27
+ # self.conditionFormula: EcucConditionFormula = None
28
+
29
+
30
+ class EcucValidationCondition(Identifiable):
31
+ """
32
+ Represents an ECUC validation condition in the AUTOSAR model.
33
+
34
+ This class is used to define a validation condition for an ECUC parameter
35
+ within the AUTOSAR framework. It inherits from the `Identifiable` class.
36
+
37
+ Attributes:
38
+ parent (ARObject): The parent ARObject to which this validation condition belongs.
39
+ short_name (str): A short name identifier for the validation condition.
40
+ """
41
+ def __init__(self, parent: ARObject, short_name: str):
42
+ super().__init__(parent, short_name)
43
+
44
+
45
+ class EcucScopeEnum(AREnum):
46
+ def __init__(self):
47
+ super().__init__([])
48
+
49
+
50
+ class EcucDefinitionElement(Identifiable, metaclass=ABCMeta):
51
+ """
52
+ Represents an ECUC (Electronic Control Unit Configuration) definition element
53
+ with various attributes and methods to manage its properties.
54
+ Attributes:
55
+ ecucCond (EcucConditionSpecification): The condition specification for the ECUC element.
56
+ ecucValidationConds (List[EcucValidationCondition]): A list of validation conditions for the ECUC element.
57
+ lowerMultiplicity (PositiveInteger): The lower multiplicity of the ECUC element.
58
+ relatedTraceItemRef (RefType): A reference to a related trace item.
59
+ scope (EcucScopeEnum): The scope of the ECUC element.
60
+ upperMultiplicity (PositiveInteger): The upper multiplicity of the ECUC element.
61
+ upperMultiplicityInfinite (Boolean): Indicates if the upper multiplicity is infinite.
62
+ Methods:
63
+ getEcucCond() -> EcucConditionSpecification:
64
+ Returns the ECUC condition specification.
65
+ setEcucCond(value: EcucConditionSpecification):
66
+ Sets the ECUC condition specification.
67
+ getEcucValidationConds() -> List[EcucValidationCondition]:
68
+ Returns the list of ECUC validation conditions.
69
+ addEcucValidationCond(value: EcucValidationCondition):
70
+ Adds a validation condition to the list of ECUC validation conditions.
71
+ getLowerMultiplicity() -> PositiveInteger:
72
+ Returns the lower multiplicity of the ECUC element.
73
+ setLowerMultiplicity(value: PositiveInteger):
74
+ Sets the lower multiplicity of the ECUC element.
75
+ getRelatedTraceItemRef() -> RefType:
76
+ Returns the reference to the related trace item.
77
+ setRelatedTraceItemRef(value: RefType):
78
+ Sets the reference to the related trace item.
79
+ getScope() -> EcucScopeEnum:
80
+ Returns the scope of the ECUC element.
81
+ setScope(value: EcucScopeEnum):
82
+ Sets the scope of the ECUC element.
83
+ getUpperMultiplicity() -> PositiveInteger:
84
+ Returns the upper multiplicity of the ECUC element.
85
+ setUpperMultiplicity(value: PositiveInteger):
86
+ Sets the upper multiplicity of the ECUC element.
87
+ getUpperMultiplicityInfinite() -> Boolean:
88
+ Returns whether the upper multiplicity is infinite.
89
+ setUpperMultiplicityInfinite(value: Boolean):
90
+ Sets whether the upper multiplicity is infinite.
91
+ """
92
+ def __init__(self, parent: ARObject, short_name: str):
93
+ super().__init__(parent, short_name)
94
+
95
+ self.ecucCond: EcucConditionSpecification = None
96
+ self.ecucValidationConds: List[EcucValidationCondition] = []
97
+ self.lowerMultiplicity: PositiveInteger = None
98
+ self.relatedTraceItemRef: RefType = None
99
+ self.scope: EcucScopeEnum = None
100
+ self.upperMultiplicity: PositiveInteger = None
101
+ self.upperMultiplicityInfinite: Boolean = None
102
+
103
+ def getEcucCond(self) -> EcucConditionSpecification:
104
+ return self.ecucCond
105
+
106
+ def setEcucCond(self, value: EcucConditionSpecification):
107
+ if value is not None:
108
+ self.ecucCond = value
109
+ return self
110
+
111
+ def getEcucValidationConds(self) -> List[EcucValidationCondition]:
112
+ return self.ecucValidationConds
113
+
114
+ def addEcucValidationCond(self, value: EcucValidationCondition):
115
+ if value is not None:
116
+ self.ecucValidationConds.append(value)
117
+ return self
118
+
119
+ def getLowerMultiplicity(self) -> PositiveInteger:
120
+ return self.lowerMultiplicity
121
+
122
+ def setLowerMultiplicity(self, value: PositiveInteger):
123
+ if value is not None:
124
+ self.lowerMultiplicity = value
125
+ return self
126
+
127
+ def getRelatedTraceItemRef(self) -> RefType:
128
+ return self.relatedTraceItemRef
129
+
130
+ def setRelatedTraceItemRef(self, value: RefType):
131
+ if value is not None:
132
+ self.relatedTraceItemRef = value
133
+ return self
134
+
135
+ def getScope(self) -> EcucScopeEnum:
136
+ return self.scope
137
+
138
+ def setScope(self, value: EcucScopeEnum):
139
+ if value is not None:
140
+ self.scope = value
141
+ return self
142
+
143
+ def getUpperMultiplicity(self) -> PositiveInteger:
144
+ return self.upperMultiplicity
145
+
146
+ def setUpperMultiplicity(self, value: PositiveInteger):
147
+ if value is not None:
148
+ self.upperMultiplicity = value
149
+ return self
150
+
151
+ def getUpperMultiplicityInfinite(self) -> Boolean:
152
+ return self.upperMultiplicityInfinite
153
+
154
+ def setUpperMultiplicityInfinite(self, value: Boolean):
155
+ if value is not None:
156
+ self.upperMultiplicityInfinite = value
157
+ return self
158
+
159
+
160
+ class EcucDestinationUriDefRefType(RefType):
161
+ """
162
+ EcucDestinationUriDefRefType is a class that represents a reference type
163
+ specific to ECUC Destination URI definitions.
164
+
165
+ This class inherits from the `RefType` base class and is used to define
166
+ references to ECUC Destination URI definitions in the AUTOSAR model.
167
+
168
+ Methods:
169
+ __init__(): Initializes an instance of EcucDestinationUriDefRefType
170
+ by invoking the constructor of the parent `RefType` class.
171
+ """
172
+ def __init__(self):
173
+ super().__init__()
174
+
175
+
176
+ class EcucConfigurationClassEnum(AREnum):
177
+ def __init__(self):
178
+ super().__init__([])
179
+
180
+
181
+ class EcucConfigurationVariantEnum(AREnum):
182
+ def __init__(self):
183
+ super().__init__([])
184
+
185
+
186
+ class EcucAbstractConfigurationClass(ARObject, metaclass=ABCMeta):
187
+ """
188
+ Represents an abstract configuration class for ECUC (Electronic Control Unit Configuration).
189
+ This class provides methods to get and set the configuration class and variant.
190
+ Attributes:
191
+ configClass (EcucConfigurationClassEnum): The configuration class of the ECUC.
192
+ configVariant (EcucConfigurationVariantEnum): The configuration variant of the ECUC.
193
+ Methods:
194
+ getConfigClass() -> EcucConfigurationClassEnum:
195
+ Retrieves the current configuration class.
196
+ setConfigClass(value: EcucConfigurationClassEnum):
197
+ Sets the configuration class to the specified value.
198
+ Returns the instance for method chaining.
199
+ getConfigVariant() -> EcucConfigurationVariantEnum:
200
+ Retrieves the current configuration variant.
201
+ setConfigVariant(value: EcucConfigurationVariantEnum):
202
+ Sets the configuration variant to the specified value.
203
+ Returns the instance for method chaining.
204
+ """
205
+ def __init__(self):
206
+ super().__init__()
207
+
208
+ self.configClass: EcucConfigurationClassEnum = None
209
+ self.configVariant: EcucConfigurationVariantEnum = None
210
+
211
+ def getConfigClass(self) -> EcucConfigurationClassEnum:
212
+ return self.configClass
213
+
214
+ def setConfigClass(self, value: EcucConfigurationClassEnum):
215
+ if value is not None:
216
+ self.configClass = value
217
+ return self
218
+
219
+ def getConfigVariant(self) -> EcucConfigurationVariantEnum:
220
+ return self.configVariant
221
+
222
+ def setConfigVariant(self, value: EcucConfigurationVariantEnum):
223
+ if value is not None:
224
+ self.configVariant = value
225
+ return self
226
+
227
+
228
+ class EcucMultiplicityConfigurationClass(EcucAbstractConfigurationClass):
229
+ """
230
+ EcucMultiplicityConfigurationClass is a subclass of EcucAbstractConfigurationClass.
231
+
232
+ This class represents a specific configuration class for handling multiplicity
233
+ in ECUC (Electronic Control Unit Configuration) parameter definitions. It
234
+ inherits from the EcucAbstractConfigurationClass to provide base functionality
235
+ and extend it for multiplicity-specific configurations.
236
+
237
+ Methods:
238
+ __init__(): Initializes an instance of EcucMultiplicityConfigurationClass
239
+ and invokes the constructor of the parent class.
240
+ """
241
+ def __init__(self):
242
+ super().__init__()
243
+
244
+
245
+ class EcucContainerDef(EcucDefinitionElement, metaclass=ABCMeta):
246
+ """
247
+ Represents an ECUC container definition in the AUTOSAR model.
248
+ This class defines various properties and methods to manage ECUC container
249
+ definitions, including destination URI references, multiplicity configuration
250
+ classes, origin, and other configuration-related attributes.
251
+ Attributes:
252
+ destinationUriRef (EcucDestinationUriDefRefType): The destination URI reference.
253
+ multiplicityConfigClasses (List[EcucMultiplicityConfigurationClass]): A list of
254
+ multiplicity configuration classes associated with the container.
255
+ origin (String): The origin of the container.
256
+ postBuildVariantMultiplicity (Boolean): Indicates if the container supports
257
+ post-build variant multiplicity.
258
+ requiresIndex (Boolean): Indicates if the container requires an index.
259
+ multipleConfigurationContainer (Boolean): Indicates if the container supports
260
+ multiple configurations.
261
+ Methods:
262
+ getDestinationUriRef() -> EcucDestinationUriDefRefType:
263
+ Returns the destination URI reference.
264
+ setDestinationUriRef(value: EcucDestinationUriDefRefType):
265
+ Sets the destination URI reference.
266
+ getMultiplicityConfigClasses() -> List[EcucMultiplicityConfigurationClass]:
267
+ Returns the list of multiplicity configuration classes.
268
+ addMultiplicityConfigClass(value: EcucMultiplicityConfigurationClass):
269
+ Adds a multiplicity configuration class to the list.
270
+ getOrigin() -> String:
271
+ Returns the origin of the container.
272
+ setOrigin(value: String):
273
+ Sets the origin of the container.
274
+ getPostBuildVariantMultiplicity() -> Boolean:
275
+ Returns whether the container supports post-build variant multiplicity.
276
+ setPostBuildVariantMultiplicity(value: Boolean):
277
+ Sets whether the container supports post-build variant multiplicity.
278
+ getRequiresIndex() -> Boolean:
279
+ Returns whether the container requires an index.
280
+ setRequiresIndex(value: Boolean):
281
+ Sets whether the container requires an index.
282
+ getMultipleConfigurationContainer() -> Boolean:
283
+ Returns whether the container supports multiple configurations.
284
+ setMultipleConfigurationContainer(value: Boolean):
285
+ Sets whether the container supports multiple configurations.
286
+ """
287
+ def __init__(self, parent: ARObject, short_name: str):
288
+ super().__init__(parent, short_name)
289
+
290
+ self.destinationUriRef: EcucDestinationUriDefRefType = None
291
+ self.multiplicityConfigClasses: List[EcucMultiplicityConfigurationClass] = []
292
+ self.origin: String = None
293
+ self.postBuildVariantMultiplicity: Boolean = None
294
+ self.requiresIndex: Boolean = None
295
+ self.multipleConfigurationContainer: Boolean = None
296
+
297
+ def getDestinationUriRef(self) -> EcucDestinationUriDefRefType:
298
+ return self.destinationUriRef
299
+
300
+ def setDestinationUriRef(self, value: EcucDestinationUriDefRefType):
301
+ if value is not None:
302
+ self.destinationUriRef = value
303
+ return self
304
+
305
+ def getMultiplicityConfigClasses(self) -> List[EcucMultiplicityConfigurationClass]:
306
+ return self.multiplicityConfigClasses
307
+
308
+ def addMultiplicityConfigClass(self, value: EcucMultiplicityConfigurationClass):
309
+ if value is not None:
310
+ self.multiplicityConfigClasses.append(value)
311
+ return self
312
+
313
+ def getOrigin(self) -> String:
314
+ return self.origin
315
+
316
+ def setOrigin(self, value: String):
317
+ if value is not None:
318
+ self.origin = value
319
+ return self
320
+
321
+ def getPostBuildVariantMultiplicity(self) -> Boolean:
322
+ return self.postBuildVariantMultiplicity
323
+
324
+ def setPostBuildVariantMultiplicity(self, value: Boolean):
325
+ if value is not None:
326
+ self.postBuildVariantMultiplicity = value
327
+ return self
328
+
329
+ def getRequiresIndex(self) -> Boolean:
330
+ return self.requiresIndex
331
+
332
+ def setRequiresIndex(self, value: Boolean):
333
+ if value is not None:
334
+ self.requiresIndex = value
335
+ return self
336
+
337
+ def getMultipleConfigurationContainer(self) -> Boolean:
338
+ return self.multipleConfigurationContainer
339
+
340
+ def setMultipleConfigurationContainer(self, value: Boolean):
341
+ if value is not None:
342
+ self.multipleConfigurationContainer = value
343
+ return self
344
+
345
+
346
+ class EcucValueConfigurationClass(EcucAbstractConfigurationClass):
347
+ """
348
+ EcucValueConfigurationClass is a subclass of EcucAbstractConfigurationClass.
349
+
350
+ This class represents a specific type of ECU configuration class used in the AUTOSAR standard.
351
+ It is designed to handle value-based configurations for ECU parameters.
352
+
353
+ Methods:
354
+ __init__(): Initializes an instance of EcucValueConfigurationClass by invoking the constructor
355
+ of its superclass, EcucAbstractConfigurationClass.
356
+ """
357
+ def __init__(self):
358
+ super().__init__()
359
+
360
+
361
+ class EcucCommonAttributes(EcucDefinitionElement, metaclass=ABCMeta):
362
+ """
363
+ EcucCommonAttributes is an abstract base class that represents common attributes
364
+ for ECUC (Electronic Control Unit Configuration) definition elements. This class
365
+ cannot be instantiated directly and must be subclassed.
366
+ Attributes:
367
+ multiplicityConfigClasses (List[EcucMultiplicityConfigurationClass]):
368
+ A list of multiplicity configuration classes associated with the ECUC element.
369
+ origin (String):
370
+ The origin of the ECUC element.
371
+ postBuildVariantMultiplicity (Boolean):
372
+ Indicates whether the ECUC element supports post-build variant multiplicity.
373
+ postBuildVariantValue (Boolean):
374
+ Indicates whether the ECUC element supports post-build variant values.
375
+ requiresIndex (Boolean):
376
+ Specifies whether the ECUC element requires an index.
377
+ valueConfigClasses (List[EcucValueConfigurationClass]):
378
+ A list of value configuration classes associated with the ECUC element.
379
+ Methods:
380
+ getMultiplicityConfigClasses() -> List[EcucMultiplicityConfigurationClass]:
381
+ Returns the list of multiplicity configuration classes.
382
+ addMultiplicityConfigClass(value: EcucMultiplicityConfigurationClass):
383
+ Adds a multiplicity configuration class to the list.
384
+ getOrigin() -> String:
385
+ Returns the origin of the ECUC element.
386
+ setOrigin(value: String):
387
+ Sets the origin of the ECUC element.
388
+ getPostBuildVariantMultiplicity() -> Boolean:
389
+ Returns whether the ECUC element supports post-build variant multiplicity.
390
+ setPostBuildVariantMultiplicity(value: Boolean):
391
+ Sets whether the ECUC element supports post-build variant multiplicity.
392
+ getPostBuildVariantValue() -> Boolean:
393
+ Returns whether the ECUC element supports post-build variant values.
394
+ setPostBuildVariantValue(value: Boolean):
395
+ Sets whether the ECUC element supports post-build variant values.
396
+ getRequiresIndex() -> Boolean:
397
+ Returns whether the ECUC element requires an index.
398
+ setRequiresIndex(value: Boolean):
399
+ Sets whether the ECUC element requires an index.
400
+ getValueConfigClasses() -> List[EcucValueConfigurationClass]:
401
+ Returns the list of value configuration classes.
402
+ addValueConfigClass(value: EcucValueConfigurationClass):
403
+ Adds a value configuration class to the list.
404
+ """
405
+ def __init__(self, parent: ARObject, short_name: str):
406
+ if type(self) is EcucCommonAttributes:
407
+ raise TypeError("Cannot instantiate abstract class EcucCommonAttributes")
408
+
409
+ super().__init__(parent, short_name)
410
+
411
+ self.multiplicityConfigClasses: List[EcucMultiplicityConfigurationClass] = []
412
+ self.origin: String = None
413
+ self.postBuildVariantMultiplicity: Boolean = None
414
+ self.postBuildVariantValue: Boolean = None
415
+ self.requiresIndex: Boolean = None
416
+ self.valueConfigClasses: List[EcucValueConfigurationClass] = []
417
+
418
+ def getMultiplicityConfigClasses(self) -> List[EcucMultiplicityConfigurationClass]:
419
+ return self.multiplicityConfigClasses
420
+
421
+ def addMultiplicityConfigClass(self, value: EcucMultiplicityConfigurationClass):
422
+ if value is not None:
423
+ self.multiplicityConfigClasses.append(value)
424
+ return self
425
+
426
+ def getOrigin(self) -> String:
427
+ return self.origin
428
+
429
+ def setOrigin(self, value: String):
430
+ if value is not None:
431
+ self.origin = value
432
+ return self
433
+
434
+ def getPostBuildVariantMultiplicity(self) -> Boolean:
435
+ return self.postBuildVariantMultiplicity
436
+
437
+ def setPostBuildVariantMultiplicity(self, value: Boolean):
438
+ if value is not None:
439
+ self.postBuildVariantMultiplicity = value
440
+ return self
441
+
442
+ def getPostBuildVariantValue(self) -> Boolean:
443
+ return self.postBuildVariantValue
444
+
445
+ def setPostBuildVariantValue(self, value: Boolean):
446
+ if value is not None:
447
+ self.postBuildVariantValue = value
448
+ return self
449
+
450
+ def getRequiresIndex(self) -> Boolean:
451
+ return self.requiresIndex
452
+
453
+ def setRequiresIndex(self, value: Boolean):
454
+ if value is not None:
455
+ self.requiresIndex = value
456
+ return self
457
+
458
+ def getValueConfigClasses(self) -> EcucValueConfigurationClass:
459
+ return self.valueConfigClasses
460
+
461
+ def addValueConfigClass(self, value: EcucValueConfigurationClass):
462
+ if value is not None:
463
+ self.valueConfigClasses.append(value)
464
+ return self
465
+
466
+
467
+ class EcucDerivationSpecification(ARObject):
468
+ """
469
+ Represents an ECUC Derivation Specification in the AUTOSAR model.
470
+
471
+ This class is a specialization of the ARObject base class and is used to define
472
+ derivation specifications for ECUC parameters in the AUTOSAR standard.
473
+ """
474
+ def __init__(self):
475
+ super().__init__()
476
+
477
+
478
+ class EcucParameterDef(EcucCommonAttributes):
479
+ """
480
+ Represents an ECUC (Electronic Control Unit Configuration) parameter definition
481
+ in the AUTOSAR model. This class extends common attributes for ECUC elements
482
+ and provides additional properties and methods specific to parameter definitions.
483
+ Attributes:
484
+ derivation (EcucDerivationSpecification): Specifies the derivation of the parameter.
485
+ symbolicNameValue (Boolean): Indicates whether the parameter has a symbolic name value.
486
+ withAuto (Boolean): Indicates whether the parameter supports automatic configuration.
487
+ Methods:
488
+ getDerivation() -> EcucDerivationSpecification:
489
+ Retrieves the derivation specification of the parameter.
490
+ setDerivation(value: EcucDerivationSpecification):
491
+ Sets the derivation specification of the parameter.
492
+ Returns the current instance for method chaining.
493
+ getSymbolicNameValue() -> Boolean:
494
+ Retrieves the symbolic name value of the parameter.
495
+ setSymbolicNameValue(value: Boolean):
496
+ Sets the symbolic name value of the parameter.
497
+ Returns the current instance for method chaining.
498
+ getWithAuto() -> Boolean:
499
+ Retrieves the automatic configuration status of the parameter.
500
+ setWithAuto(value: Boolean):
501
+ Sets the automatic configuration status of the parameter.
502
+ Returns the current instance for method chaining.
503
+ """
504
+ def __init__(self, parent: ARObject, short_name: str):
505
+ super().__init__(parent, short_name)
506
+
507
+ self.derivation: EcucDerivationSpecification = None
508
+ self.symbolicNameValue: Boolean = None
509
+ self.withAuto: Boolean = None
510
+
511
+ def getDerivation(self) -> EcucDerivationSpecification:
512
+ return self.derivation
513
+
514
+ def setDerivation(self, value: EcucDerivationSpecification):
515
+ if value is not None:
516
+ self.derivation = value
517
+ return self
518
+
519
+ def getSymbolicNameValue(self) -> Boolean:
520
+ return self.symbolicNameValue
521
+
522
+ def setSymbolicNameValue(self, value: Boolean):
523
+ if value is not None:
524
+ self.symbolicNameValue = value
525
+ return self
526
+
527
+ def getWithAuto(self) -> Boolean:
528
+ return self.withAuto
529
+
530
+ def setWithAuto(self, value: Boolean):
531
+ if value is not None:
532
+ self.withAuto = value
533
+ return self
534
+
535
+
536
+ class EcucBooleanParamDef(EcucParameterDef):
537
+ """
538
+ Represents a boolean parameter definition in the AUTOSAR ECUC model.
539
+
540
+ This class is a specialized type of `EcucParameterDef` that allows for the
541
+ definition of boolean parameters within the ECUC parameter configuration.
542
+
543
+ Attributes:
544
+ parent (ARObject): The parent object in the AUTOSAR model hierarchy.
545
+ short_name (str): The short name of the ECUC boolean parameter definition.
546
+ """
547
+ def __init__(self, parent: ARObject, short_name: str):
548
+ super().__init__(parent, short_name)
549
+
550
+ self.defaultValue: Boolean = None
551
+
552
+ def getDefaultValue(self) -> Boolean:
553
+ return self.defaultValue
554
+
555
+ def setDefaultValue(self, value: Boolean):
556
+ if value is not None:
557
+ self.defaultValue = value
558
+ return self
559
+
560
+
561
+ class EcucAbstractReferenceDef(EcucCommonAttributes, metaclass=ABCMeta):
562
+ """
563
+ EcucAbstractReferenceDef is an abstract class that extends EcucCommonAttributes and uses ABCMeta as its metaclass.
564
+ It represents an ECUC (Electronic Control Unit Configuration) abstract reference definition.
565
+ Attributes:
566
+ withAuto (Boolean): A flag indicating whether the reference is automatic. Defaults to None.
567
+ Methods:
568
+ getWithAuto() -> Boolean:
569
+ Retrieves the value of the `withAuto` attribute.
570
+ setWithAuto(value: Boolean):
571
+ Sets the value of the `withAuto` attribute. If the provided value is not None, it updates the attribute.
572
+ Returns the instance itself for method chaining.
573
+ Raises:
574
+ TypeError: If an attempt is made to instantiate this abstract class directly.
575
+ """
576
+ def __init__(self, parent, short_name):
577
+ if type(self) is EcucAbstractReferenceDef:
578
+ raise TypeError("Cannot instantiate abstract class EcucAbstractReferenceDef")
579
+
580
+ super().__init__(parent, short_name)
581
+
582
+ self.withAuto: Boolean = None
583
+
584
+ def getWithAuto(self) -> Boolean:
585
+ return self.withAuto
586
+
587
+ def setWithAuto(self, value: Boolean):
588
+ if value is not None:
589
+ self.withAuto = value
590
+ return self
591
+
592
+
593
+ class EcucAbstractInternalReferenceDef(EcucAbstractReferenceDef, metaclass=ABCMeta):
594
+ """
595
+ EcucAbstractInternalReferenceDef is an abstract class that extends EcucAbstractReferenceDef
596
+ and uses ABCMeta as its metaclass. This class cannot be instantiated directly.
597
+ Attributes:
598
+ requiresSymbolicNameValue (Boolean): A boolean attribute that indicates whether
599
+ a symbolic name value is required. Defaults to None.
600
+ Methods:
601
+ getRequiresSymbolicNameValue() -> Boolean:
602
+ Returns the value of the requiresSymbolicNameValue attribute.
603
+ setRequiresSymbolicNameValue(value: Boolean):
604
+ Sets the value of the requiresSymbolicNameValue attribute if the provided value
605
+ is not None. Returns the instance of the class.
606
+ """
607
+ def __init__(self, parent, short_name):
608
+ if type(self) is EcucAbstractInternalReferenceDef:
609
+ raise TypeError("Cannot instantiate abstract class EcucAbstractInternalReferenceDef")
610
+ super().__init__(parent, short_name)
611
+
612
+ self.requiresSymbolicNameValue: Boolean = None
613
+
614
+ def getRequiresSymbolicNameValue(self) -> Boolean:
615
+ return self.requiresSymbolicNameValue
616
+
617
+ def setRequiresSymbolicNameValue(self, value: Boolean):
618
+ if value is not None:
619
+ self.requiresSymbolicNameValue = value
620
+ return self
621
+
622
+
623
+ class EcucAbstractExternalReferenceDef(EcucAbstractReferenceDef, metaclass=ABCMeta):
624
+ def __init__(self, parent, short_name):
625
+ if type(self) is EcucAbstractExternalReferenceDef:
626
+ raise TypeError("Cannot instantiate abstract class EcucAbstractExternalReferenceDef")
627
+
628
+ super().__init__(parent, short_name)
629
+
630
+
631
+ class EcucSymbolicNameReferenceDef(EcucAbstractInternalReferenceDef):
632
+ def __init__(self, parent: ARObject, short_name: str):
633
+ super().__init__(parent, short_name)
634
+
635
+ self.destinationRef: RefType = None
636
+
637
+ def getDestinationRef(self) -> RefType:
638
+ return self.destinationRef
639
+
640
+ def setDestinationRef(self, value: RefType):
641
+ if value is not None:
642
+ self.destinationRef = value
643
+ return self
644
+
645
+
646
+ class EcucChoiceReferenceDef(EcucAbstractInternalReferenceDef):
647
+ def __init__(self, parent: ARObject, short_name: str):
648
+ super().__init__(parent, short_name)
649
+
650
+ self.destinationRef: RefType = None
651
+
652
+ def getDestinationRef(self) -> RefType:
653
+ return self.destinationRef
654
+
655
+ def setDestinationRef(self, value: RefType):
656
+ if value is not None:
657
+ self.destinationRef = value
658
+ return self
659
+
660
+
661
+ class EcucReferenceDef(EcucAbstractInternalReferenceDef):
662
+ def __init__(self, parent: ARObject, short_name: str):
663
+ super().__init__(parent, short_name)
664
+
665
+ self.destinationRef: RefType = None
666
+
667
+ def getDestinationRef(self) -> RefType:
668
+ return self.destinationRef
669
+
670
+ def setDestinationRef(self, value: RefType):
671
+ if value is not None:
672
+ self.destinationRef = value
673
+ return self
674
+
675
+
676
+ class EcucUriReferenceDef(EcucAbstractInternalReferenceDef):
677
+ def __init__(self, parent: ARObject, short_name: str):
678
+ super().__init__(parent, short_name)
679
+
680
+ self.destinationUriRef: EcucDestinationUriDefRefType = None
681
+
682
+ def getDestinationUriRef(self) -> EcucDestinationUriDefRefType:
683
+ return self.destinationUriRef
684
+
685
+ def setDestinationUriRef(self, value: EcucDestinationUriDefRefType):
686
+ if value is not None:
687
+ self.destinationUriRef = value
688
+ return self
689
+
690
+
691
+ class EcucForeignReferenceDef(EcucAbstractExternalReferenceDef):
692
+ def __init__(self, parent: ARObject, short_name: str):
693
+ super().__init__(parent, short_name)
694
+
695
+ self.destinationContext: String = None
696
+ self.destinationType: String = None
697
+
698
+ def getDestinationContext(self) -> String:
699
+ return self.destinationContext
700
+
701
+ def setDestinationContext(self, value: String):
702
+ if value is not None:
703
+ self.destinationContext = value
704
+ return self
705
+
706
+ def getDestinationType(self) -> String:
707
+ return self.destinationType
708
+
709
+ def setDestinationType(self, value: String):
710
+ if value is not None:
711
+ self.destinationType = value
712
+ return self
713
+
714
+
715
+ class EcucInstanceReferenceDef(EcucAbstractExternalReferenceDef):
716
+ def __init__(self, parent: ARObject, short_name: str):
717
+ super().__init__(parent, short_name)
718
+
719
+ self.destinationType: String = None
720
+
721
+ def getDestinationType(self) -> String:
722
+ return self.destinationType
723
+
724
+ def setDestinationType(self, value: String):
725
+ if value is not None:
726
+ self.destinationType = value
727
+ return self
728
+
729
+
730
+ class EcucAbstractStringParamDef(EcucParameterDef, metaclass=ABCMeta):
731
+ """
732
+ EcucAbstractStringParamDef is an abstract class that represents a string parameter definition
733
+ in the AUTOSAR ECUC model. It inherits from EcucParameterDef and uses ABCMeta as its metaclass
734
+ to enforce abstraction.
735
+ Attributes:
736
+ defaultValue (VerbatimString): The default value of the string parameter.
737
+ maxLength (PositiveInteger): The maximum length of the string parameter.
738
+ minLength (PositiveInteger): The minimum length of the string parameter.
739
+ regularExpression (RegularExpression): A regular expression that the string parameter must match.
740
+ Methods:
741
+ getDefaultValue() -> VerbatimString:
742
+ Returns the default value of the string parameter.
743
+ setDefaultValue(value: VerbatimString):
744
+ Sets the default value of the string parameter. Returns the instance for chaining.
745
+ getMaxLength() -> PositiveInteger:
746
+ Returns the maximum length of the string parameter.
747
+ setMaxLength(value: PositiveInteger):
748
+ Sets the maximum length of the string parameter. Returns the instance for chaining.
749
+ getMinLength() -> PositiveInteger:
750
+ Returns the minimum length of the string parameter.
751
+ setMinLength(value: PositiveInteger):
752
+ Sets the minimum length of the string parameter. Returns the instance for chaining.
753
+ getRegularExpression() -> RegularExpression:
754
+ Returns the regular expression constraint of the string parameter.
755
+ setRegularExpression(value: RegularExpression):
756
+ Sets the regular expression constraint of the string parameter. Returns the instance for chaining.
757
+ Raises:
758
+ TypeError: If an attempt is made to instantiate the abstract class directly.
759
+ """
760
+ def __init__(self, parent, short_name):
761
+ if type(self) is EcucAbstractStringParamDef:
762
+ raise TypeError("Cannot instantiate abstract class EcucAbstractStringParamDef")
763
+
764
+ super().__init__(parent, short_name)
765
+
766
+ self.defaultValue: VerbatimString = None
767
+ self.maxLength: PositiveInteger = None
768
+ self.minLength: PositiveInteger = None
769
+ self.regularExpression: RegularExpression = None
770
+
771
+ def getDefaultValue(self) -> VerbatimString:
772
+ return self.defaultValue
773
+
774
+ def setDefaultValue(self, value: VerbatimString):
775
+ if value is not None:
776
+ self.defaultValue = value
777
+ return self
778
+
779
+ def getMaxLength(self) -> PositiveInteger:
780
+ return self.maxLength
781
+
782
+ def setMaxLength(self, value: PositiveInteger):
783
+ if value is not None:
784
+ self.maxLength = value
785
+ return self
786
+
787
+ def getMinLength(self) -> PositiveInteger:
788
+ return self.minLength
789
+
790
+ def setMinLength(self, value: PositiveInteger):
791
+ if value is not None:
792
+ self.minLength = value
793
+ return self
794
+
795
+ def getRegularExpression(self) -> RegularExpression:
796
+ return self.regularExpression
797
+
798
+ def setRegularExpression(self, value: RegularExpression):
799
+ if value is not None:
800
+ self.regularExpression = value
801
+ return self
802
+
803
+
804
+ class EcucStringParamDef(EcucAbstractStringParamDef):
805
+ """
806
+ Represents a specific type of ECUC parameter definition for string parameters.
807
+
808
+ This class is a specialization of `EcucAbstractStringParamDef` and is used to
809
+ define string parameters in the AUTOSAR ECUC configuration.
810
+
811
+ Attributes:
812
+ parent (ARObject): The parent object in the AUTOSAR model hierarchy.
813
+ short_name (str): The short name of the ECUC string parameter definition.
814
+ """
815
+ def __init__(self, parent: ARObject, short_name: str):
816
+ super().__init__(parent, short_name)
817
+
818
+
819
+ class EcucFunctionNameDef(EcucAbstractStringParamDef):
820
+ """
821
+ Represents a specific type of ECUC parameter definition for function names.
822
+
823
+ This class is a specialization of `EcucAbstractStringParamDef` and is used
824
+ to define ECUC parameters that represent function names in the AUTOSAR model.
825
+
826
+ Attributes:
827
+ parent (ARObject): The parent object in the AUTOSAR hierarchy.
828
+ short_name (str): The short name of the ECUC parameter definition.
829
+ """
830
+ def __init__(self, parent: ARObject, short_name: str):
831
+ super().__init__(parent, short_name)
832
+
833
+
834
+ class EcucIntegerParamDef(EcucParameterDef):
835
+ def __init__(self, parent: ARObject, short_name: str):
836
+ super().__init__(parent, short_name)
837
+
838
+ self.defaultValue: UnlimitedInteger = None
839
+ self.max: UnlimitedInteger = None
840
+ self.min: UnlimitedInteger = None
841
+
842
+ def getDefaultValue(self) -> UnlimitedInteger:
843
+ return self.defaultValue
844
+
845
+ def setDefaultValue(self, value: UnlimitedInteger):
846
+ if value is not None:
847
+ self.defaultValue = value
848
+ return self
849
+
850
+ def getMax(self) -> UnlimitedInteger:
851
+ return self.max
852
+
853
+ def setMax(self, value: UnlimitedInteger):
854
+ if value is not None:
855
+ self.max = value
856
+ return self
857
+
858
+ def getMin(self) -> UnlimitedInteger:
859
+ return self.min
860
+
861
+ def setMin(self, value: UnlimitedInteger):
862
+ if value is not None:
863
+ self.min = value
864
+ return self
865
+
866
+
867
+ class EcucEnumerationLiteralDef(Identifiable):
868
+ """
869
+ Represents an ECUC Enumeration Literal Definition in the AUTOSAR model.
870
+ This class is used to define enumeration literals for ECUC parameters,
871
+ including their associated condition specifications and origin information.
872
+ Attributes:
873
+ ecucCond (EcucConditionSpecification): The condition specification associated with the enumeration literal.
874
+ origin (String): The origin information for the enumeration literal.
875
+ Methods:
876
+ getEcucCond() -> EcucConditionSpecification:
877
+ Retrieves the condition specification associated with the enumeration literal.
878
+ setEcucCond(value: EcucConditionSpecification):
879
+ Sets the condition specification for the enumeration literal.
880
+ Returns the current instance for method chaining.
881
+ getOrigin() -> String:
882
+ Retrieves the origin information for the enumeration literal.
883
+ setOrigin(value: String):
884
+ Sets the origin information for the enumeration literal.
885
+ Returns the current instance for method chaining.
886
+ """
887
+ def __init__(self, parent: ARObject, short_name: str):
888
+ super().__init__(parent, short_name)
889
+
890
+ self.ecucCond: EcucConditionSpecification = None
891
+ self.origin: String = None
892
+
893
+ def getEcucCond(self) -> EcucConditionSpecification:
894
+ return self.ecucCond
895
+
896
+ def setEcucCond(self, value: EcucConditionSpecification):
897
+ if value is not None:
898
+ self.ecucCond = value
899
+ return self
900
+
901
+ def getOrigin(self) -> String:
902
+ return self.origin
903
+
904
+ def setOrigin(self, value: String):
905
+ if value is not None:
906
+ self.origin = value
907
+ return self
908
+
909
+
910
+ class EcucEnumerationParamDef(EcucParameterDef):
911
+ """
912
+ Represents an ECUC (Electronic Control Unit Configuration) enumeration parameter definition.
913
+ This class is used to define an enumeration parameter in an AUTOSAR ECUC model. It allows
914
+ setting a default value and managing a list of enumeration literals.
915
+ Attributes:
916
+ defaultValue (Identifier): The default value of the enumeration parameter.
917
+ literals (List[EcucEnumerationLiteralDef]): A list of enumeration literal definitions.
918
+ Methods:
919
+ getDefaultValue() -> UnlimitedInteger:
920
+ Retrieves the default value of the enumeration parameter.
921
+ setDefaultValue(value: UnlimitedInteger):
922
+ Sets the default value of the enumeration parameter.
923
+ Returns the current instance for method chaining.
924
+ getLiterals() -> List[EcucEnumerationLiteralDef]:
925
+ Retrieves the list of enumeration literal definitions.
926
+ createLiteral(short_name: str) -> EcucEnumerationLiteralDef:
927
+ Creates a new enumeration literal with the specified short name if it does not already exist.
928
+ Adds the literal to the list of literals and returns it.
929
+ """
930
+ def __init__(self, parent: ARObject, short_name: str):
931
+ super().__init__(parent, short_name)
932
+
933
+ self.defaultValue: Identifier = None
934
+ self.literals: List[EcucEnumerationLiteralDef] = []
935
+
936
+ def getDefaultValue(self) -> UnlimitedInteger:
937
+ return self.defaultValue
938
+
939
+ def setDefaultValue(self, value: UnlimitedInteger):
940
+ if value is not None:
941
+ self.defaultValue = value
942
+ return self
943
+
944
+ def getLiterals(self) -> List[EcucEnumerationLiteralDef]:
945
+ return self.literals
946
+
947
+ def createLiteral(self, short_name: str) -> EcucEnumerationLiteralDef:
948
+ if not self.IsElementExists(short_name):
949
+ literal = EcucEnumerationLiteralDef(self, short_name)
950
+ self.addElement(literal)
951
+ self.literals.append(literal)
952
+ return self.getElement(short_name)
953
+
954
+
955
+ class EcucFloatParamDef(EcucParameterDef):
956
+ def __init__(self, parent: ARObject, short_name: str):
957
+ super().__init__(parent, short_name)
958
+
959
+ self.defaultValue: Float = None
960
+ self.max: Limit = None
961
+ self.min: Limit = None
962
+
963
+ def getDefaultValue(self) -> Float:
964
+ return self.defaultValue
965
+
966
+ def setDefaultValue(self, value: Float):
967
+ if value is not None:
968
+ self.defaultValue = value
969
+ return self
970
+
971
+ def getMax(self) -> Limit:
972
+ return self.max
973
+
974
+ def setMax(self, value: Limit):
975
+ if value is not None:
976
+ self.max = value
977
+ return self
978
+
979
+ def getMin(self) -> Limit:
980
+ return self.min
981
+
982
+ def setMin(self, value: Limit):
983
+ if value is not None:
984
+ self.min = value
985
+ return self
986
+
987
+
988
+ class EcucChoiceContainerDef(EcucContainerDef):
989
+ """
990
+ Represents an ECUC choice container definition in the AUTOSAR model.
991
+
992
+ This class is a specialized type of `EcucContainerDef` that allows for the
993
+ definition of choice containers within the ECUC parameter configuration.
994
+
995
+ Attributes:
996
+ parent (ARObject): The parent object in the AUTOSAR model hierarchy.
997
+ short_name (str): The short name of the ECUC choice container definition.
998
+ """
999
+ def __init__(self, parent: ARObject, short_name: str):
1000
+ super().__init__(parent, short_name)
1001
+
1002
+ self.choices: List["EcucParamConfContainerDef"] = []
1003
+
1004
+ def getChoices(self) -> List["EcucParamConfContainerDef"]:
1005
+ return self.choices
1006
+
1007
+ def createEcucParamConfContainerDef(self, short_name: str) -> "EcucParamConfContainerDef":
1008
+ if not self.IsElementExists(short_name):
1009
+ choice = EcucParamConfContainerDef(self, short_name)
1010
+ self.addElement(choice)
1011
+ self.choices.append(choice)
1012
+ return self.getElement(short_name)
1013
+
1014
+
1015
+ class EcucParamConfContainerDef(EcucContainerDef):
1016
+ class EcucParamConfContainerDef:
1017
+ """
1018
+ Represents a configuration container definition in the AUTOSAR ECUC model.
1019
+ This class is used to define a container that can hold parameters, references,
1020
+ and sub-containers as part of the AUTOSAR ECUC configuration.
1021
+ Attributes:
1022
+ parameters (List[EcucParameterDef]): A list of parameter definitions associated with this container.
1023
+ references (List[EcucAbstractReferenceDef]): A list of reference definitions associated with this container.
1024
+ subContainers (List[EcucContainerDef]): A list of sub-container definitions associated with this container.
1025
+ Methods:
1026
+ getParameters() -> List[EcucParameterDef]:
1027
+ Retrieves the list of parameter definitions.
1028
+ addParameter(value: EcucParameterDef):
1029
+ Adds a parameter definition to the container.
1030
+ Returns the current instance for method chaining.
1031
+ getReferences() -> List[EcucAbstractReferenceDef]:
1032
+ Retrieves the list of reference definitions.
1033
+ addReference(value: EcucAbstractReferenceDef):
1034
+ Adds a reference definition to the container.
1035
+ Returns the current instance for method chaining.
1036
+ getSubContainers() -> List[EcucContainerDef]:
1037
+ Retrieves the list of sub-container definitions.
1038
+ addSubContainers(value: EcucContainerDef):
1039
+ Adds a sub-container definition to the container.
1040
+ Returns the current instance for method chaining.
1041
+ """
1042
+
1043
+ def __init__(self, parent: ARObject, short_name: str):
1044
+ """
1045
+ Initializes an ECUCParameterDefTemplate instance.
1046
+ Args:
1047
+ parent (ARObject): The parent ARObject to which this template belongs.
1048
+ short_name (str): The short name identifier for this template.
1049
+ Attributes:
1050
+ parameters (List[EcucParameterDef]): A list of ECUC parameter definitions.
1051
+ references (List[EcucAbstractReferenceDef]): A list of ECUC abstract reference definitions.
1052
+ subContainers (List[EcucContainerDef]): A list of ECUC container definitions.
1053
+ """
1054
+ super().__init__(parent, short_name)
1055
+
1056
+ self.parameters: List[EcucParameterDef] = []
1057
+ self.references: List[EcucAbstractReferenceDef] = []
1058
+ self.subContainers: List[EcucContainerDef] = []
1059
+
1060
+ def getParameters(self) -> List[EcucParameterDef]:
1061
+ """
1062
+ Retrieves the list of ECUC parameter definitions.
1063
+
1064
+ Returns:
1065
+ List[EcucParameterDef]: A list of ECUC parameter definitions.
1066
+ """
1067
+ return self.parameters
1068
+
1069
+ def createEcucBooleanParamDef(self, short_name: str) -> EcucBooleanParamDef:
1070
+ """
1071
+ Creates a new ECUC boolean parameter definition and adds it to the container.
1072
+
1073
+ Args:
1074
+ short_name (str): The short name identifier for the new parameter definition.
1075
+
1076
+ Returns:
1077
+ EcucBooleanParamDef: The newly created ECUC boolean parameter definition.
1078
+ """
1079
+ if not self.IsElementExists(short_name):
1080
+ param = EcucBooleanParamDef(self, short_name)
1081
+ self.addElement(param)
1082
+ self.parameters.append(param)
1083
+ return self.getElement(short_name)
1084
+
1085
+ def createEcucStringParamDef(self, short_name: str) -> EcucStringParamDef:
1086
+ """
1087
+ Creates an ECUC string parameter definition with the given short name.
1088
+
1089
+ Args:
1090
+ short_name (str): The short name of the ECUC string parameter definition.
1091
+
1092
+ Returns:
1093
+ EcucStringParamDef: The ECUC string parameter definition instance associated
1094
+ with the given short name.
1095
+ """
1096
+ if not self.IsElementExists(short_name):
1097
+ param = EcucStringParamDef(self, short_name)
1098
+ self.addElement(param)
1099
+ self.parameters.append(param)
1100
+ return self.getElement(short_name)
1101
+
1102
+ def createEcucIntegerParamDef(self, short_name: str) -> EcucIntegerParamDef:
1103
+ """
1104
+ Creates an ECUC integer parameter definition with the given short name.
1105
+
1106
+ Args:
1107
+ short_name (str): The short name of the ECUC integer parameter definition.
1108
+
1109
+ Returns:
1110
+ EcucIntegerParamDef: The ECUC integer parameter definition instance associated
1111
+ with the given short name.
1112
+ """
1113
+ if not self.IsElementExists(short_name):
1114
+ param = EcucIntegerParamDef(self, short_name)
1115
+ self.addElement(param)
1116
+ self.parameters.append(param)
1117
+ return self.getElement(short_name)
1118
+
1119
+ def createEcucFloatParamDef(self, short_name: str) -> EcucFloatParamDef:
1120
+ """
1121
+ Creates an ECUC float parameter definition with the given short name.
1122
+
1123
+ Args:
1124
+ short_name (str): The short name of the ECUC float parameter definition.
1125
+
1126
+ Returns:
1127
+ EcucFloatParamDef: The ECUC float parameter definition instance associated
1128
+ with the given short name.
1129
+ """
1130
+ if not self.IsElementExists(short_name):
1131
+ param = EcucFloatParamDef(self, short_name)
1132
+ self.addElement(param)
1133
+ self.parameters.append(param)
1134
+ return self.getElement(short_name)
1135
+
1136
+ def createEcucEnumerationParamDef(self, short_name: str) -> EcucEnumerationParamDef:
1137
+ """
1138
+ Creates an ECUC enumeration parameter definition with the given short name.
1139
+
1140
+ Args:
1141
+ short_name (str): The short name of the ECUC enumeration parameter definition.
1142
+
1143
+ Returns:
1144
+ EcucEnumerationParamDef: The ECUC enumeration parameter definition instance associated
1145
+ with the given short name.
1146
+ """
1147
+ if not self.IsElementExists(short_name):
1148
+ param = EcucEnumerationParamDef(self, short_name)
1149
+ self.addElement(param)
1150
+ self.parameters.append(param)
1151
+ return self.getElement(short_name)
1152
+
1153
+ def createEcucFunctionNameDef(self, short_name: str) -> EcucFunctionNameDef:
1154
+ """
1155
+ Creates a new ECUC function name definition and adds it to the container.
1156
+
1157
+ Args:
1158
+ short_name (str): The short name identifier for the new reference definition.
1159
+
1160
+ Returns:
1161
+ EcucFunctionNameDef: The newly created ECUC function name definition.
1162
+ """
1163
+ if not self.IsElementExists(short_name):
1164
+ ref = EcucFunctionNameDef(self, short_name)
1165
+ self.addElement(ref)
1166
+ self.parameters.append(ref)
1167
+ return self.getElement(short_name)
1168
+
1169
+ def getReferences(self) -> List[EcucAbstractReferenceDef]:
1170
+ """
1171
+ Retrieves the list of ECUC abstract reference definitions.
1172
+
1173
+ Returns:
1174
+ List[EcucAbstractReferenceDef]: A list of ECUC abstract reference definitions.
1175
+ """
1176
+ return self.references
1177
+
1178
+ def createEcucSymbolicNameReferenceDef(self, short_name: str) -> EcucSymbolicNameReferenceDef:
1179
+ """
1180
+ Creates a new ECUC symbolic name reference definition and adds it to the container.
1181
+
1182
+ Args:
1183
+ short_name (str): The short name identifier for the new reference definition.
1184
+
1185
+ Returns:
1186
+ EcucSymbolicNameReferenceDef: The newly created ECUC symbolic name reference definition.
1187
+ """
1188
+ if not self.IsElementExists(short_name):
1189
+ ref = EcucSymbolicNameReferenceDef(self, short_name)
1190
+ self.addElement(ref)
1191
+ self.references.append(ref)
1192
+ return self.getElement(short_name)
1193
+
1194
+ def createEcucReferenceDef(self, short_name: str) -> EcucReferenceDef:
1195
+ """
1196
+ Creates a new ECUC reference definition and adds it to the container.
1197
+
1198
+ Args:
1199
+ short_name (str): The short name identifier for the new reference definition.
1200
+
1201
+ Returns:
1202
+ EcucReferenceDef: The newly created ECUC reference definition.
1203
+ """
1204
+ if not self.IsElementExists(short_name):
1205
+ ref = EcucReferenceDef(self, short_name)
1206
+ self.addElement(ref)
1207
+ self.references.append(ref)
1208
+ return self.getElement(short_name)
1209
+
1210
+ def getSubContainers(self) -> List[EcucContainerDef]:
1211
+ """
1212
+ Retrieves the list of ECUC container definitions.
1213
+
1214
+ Returns:
1215
+ List[EcucContainerDef]: A list of ECUC container definitions.
1216
+ """
1217
+ return self.subContainers
1218
+
1219
+ def createEcucChoiceContainerDef(self, short_name: str) -> EcucChoiceContainerDef:
1220
+ """
1221
+ Creates a new ECUC choice container definition and adds it to the container.
1222
+
1223
+ Args:
1224
+ short_name (str): The short name identifier for the new container definition.
1225
+
1226
+ Returns:
1227
+ EcucChoiceContainerDef: The newly created ECUC choice container definition.
1228
+ """
1229
+ if not self.IsElementExists(short_name):
1230
+ container = EcucChoiceContainerDef(self, short_name)
1231
+ self.addElement(container)
1232
+ self.subContainers.append(container)
1233
+ return self.getElement(short_name)
1234
+
1235
+ def createEcucParamConfContainerDef(self, short_name: str) -> EcucParamConfContainerDef:
1236
+ """
1237
+ Creates a new ECUC parameter configuration container definition and adds it to the container.
1238
+
1239
+ Args:
1240
+ short_name (str): The short name identifier for the new container definition.
1241
+
1242
+ Returns:
1243
+ EcucParamConfContainerDef: The newly created ECUC parameter configuration container definition.
1244
+ """
1245
+ if not self.IsElementExists(short_name):
1246
+ container = EcucParamConfContainerDef(self, short_name)
1247
+ self.addElement(container)
1248
+ self.subContainers.append(container)
1249
+ return self.getElement(short_name)