armodel 1.7.8__py3-none-any.whl → 1.8.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 (51) hide show
  1. armodel/cli/arxml_format_cli.py +1 -0
  2. armodel/models/M2/AUTOSARTemplates/AutosarTopLevelStructure.py +71 -11
  3. armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswBehavior.py +102 -12
  4. armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswInterfaces.py +80 -9
  5. armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswOverview.py +17 -10
  6. armodel/models/M2/AUTOSARTemplates/CommonStructure/Implementation.py +10 -8
  7. armodel/models/M2/AUTOSARTemplates/CommonStructure/ImplementationDataTypes.py +30 -28
  8. armodel/models/M2/AUTOSARTemplates/CommonStructure/InternalBehavior.py +7 -5
  9. armodel/models/M2/AUTOSARTemplates/CommonStructure/ModeDeclaration.py +38 -3
  10. armodel/models/M2/AUTOSARTemplates/CommonStructure/ServiceNeeds.py +96 -18
  11. armodel/models/M2/AUTOSARTemplates/CommonStructure/StandardizationTemplate/BlueprintDedicated/PortPrototypeBlueprint.py +73 -0
  12. armodel/models/M2/AUTOSARTemplates/CommonStructure/StandardizationTemplate/BlueprintDedicated/__init__.py +0 -0
  13. armodel/models/M2/AUTOSARTemplates/CommonStructure/StandardizationTemplate/Keyword.py +45 -0
  14. armodel/models/M2/AUTOSARTemplates/CommonStructure/StandardizationTemplate/__init__.py +0 -0
  15. armodel/models/M2/AUTOSARTemplates/CommonStructure/TriggerDeclaration.py +27 -0
  16. armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ARPackage.py +33 -4
  17. armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ElementCollection.py +73 -0
  18. armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/PrimitiveTypes.py +40 -14
  19. armodel/models/M2/AUTOSARTemplates/GenericStructure/LifeCycles.py +151 -1
  20. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Components/__init__.py +4 -1
  21. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/PortInterface/__init__.py +55 -12
  22. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SoftwareComponentDocumentation.py +80 -0
  23. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/RTEEvents.py +11 -1
  24. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ServiceMapping.py +34 -10
  25. armodel/models/M2/AUTOSARTemplates/SystemTemplate/DataMapping.py +11 -10
  26. armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Ethernet/EthernetTopology.py +18 -6
  27. armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/FibexCore/CoreTopology.py +8 -2
  28. armodel/models/M2/AUTOSARTemplates/SystemTemplate/RteEventToOsTaskMapping.py +35 -0
  29. armodel/models/M2/AUTOSARTemplates/SystemTemplate/SWmapping.py +25 -0
  30. armodel/models/M2/AUTOSARTemplates/SystemTemplate/SecureCommunication.py +83 -0
  31. armodel/models/M2/AUTOSARTemplates/SystemTemplate/__init__.py +84 -32
  32. armodel/models/M2/MSR/DataDictionary/DataDefProperties.py +10 -1
  33. armodel/models/M2/MSR/Documentation/BlockElements/Figure.py +163 -0
  34. armodel/models/M2/MSR/Documentation/BlockElements/__init__.py +0 -0
  35. armodel/models/M2/MSR/Documentation/TextModel/BlockElements/ListElements.py +5 -3
  36. armodel/models/M2/MSR/Documentation/TextModel/BlockElements/PaginationAndView.py +22 -1
  37. armodel/models/M2/MSR/Documentation/TextModel/BlockElements/__init__.py +94 -9
  38. armodel/models/__init__.py +4 -0
  39. armodel/models/utils/__init__.py +0 -0
  40. armodel/models/utils/uuid_mgr.py +23 -0
  41. armodel/parser/abstract_arxml_parser.py +10 -2
  42. armodel/parser/arxml_parser.py +332 -104
  43. armodel/tests/test_armodel/models/test_datatype.py +136 -138
  44. armodel/tests/test_armodel/parser/test_sw_components.py +266 -4
  45. armodel/writer/arxml_writer.py +337 -74
  46. {armodel-1.7.8.dist-info → armodel-1.8.0.dist-info}/METADATA +35 -1
  47. {armodel-1.7.8.dist-info → armodel-1.8.0.dist-info}/RECORD +51 -40
  48. {armodel-1.7.8.dist-info → armodel-1.8.0.dist-info}/LICENSE +0 -0
  49. {armodel-1.7.8.dist-info → armodel-1.8.0.dist-info}/WHEEL +0 -0
  50. {armodel-1.7.8.dist-info → armodel-1.8.0.dist-info}/entry_points.txt +0 -0
  51. {armodel-1.7.8.dist-info → armodel-1.8.0.dist-info}/top_level.txt +0 -0
@@ -8,10 +8,12 @@ from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTy
8
8
  from ....M2.AUTOSARTemplates.SWComponentTemplate.Datatype.Datatypes import AutosarDataType
9
9
  from ....M2.AUTOSARTemplates.SWComponentTemplate.Components import SymbolProps
10
10
 
11
+
11
12
  class AbstractImplementationDataTypeElement(Identifiable):
12
13
  def __init__(self, parent, short_name: str):
13
14
  super().__init__(parent, short_name)
14
15
 
16
+
15
17
  class ImplementationDataTypeElement(AbstractImplementationDataTypeElement):
16
18
  ARRAY_SIZE_SEMANTICS_FIXED_SIZE = "FIXED-SIZE"
17
19
  ARRAY_SIZE_SEMANTICS_VARIABLE_SIZE = "VARIABLE_SIZE"
@@ -30,45 +32,51 @@ class ImplementationDataTypeElement(AbstractImplementationDataTypeElement):
30
32
  return self.arrayImplPolicy
31
33
 
32
34
  def setArrayImplPolicy(self, value):
33
- self.arrayImplPolicy = value
35
+ if value is not None:
36
+ self.arrayImplPolicy = value
34
37
  return self
35
38
 
36
39
  def getArraySize(self):
37
40
  return self.arraySize
38
41
 
39
42
  def setArraySize(self, value):
40
- self.arraySize = value
43
+ if value is not None:
44
+ self.arraySize = value
41
45
  return self
42
46
 
43
47
  def getArraySizeHandling(self):
44
48
  return self.arraySizeHandling
45
49
 
46
50
  def setArraySizeHandling(self, value):
47
- self.arraySizeHandling = value
51
+ if value is not None:
52
+ self.arraySizeHandling = value
48
53
  return self
49
54
 
50
55
  def getArraySizeSemantics(self):
51
56
  return self.arraySizeSemantics
52
57
 
53
58
  def setArraySizeSemantics(self, value):
54
- self.arraySizeSemantics = value
59
+ if value is not None:
60
+ self.arraySizeSemantics = value
55
61
  return self
56
62
 
57
63
  def getIsOptional(self):
58
64
  return self.isOptional
59
65
 
60
66
  def setIsOptional(self, value):
61
- self.isOptional = value
67
+ if value is not None:
68
+ self.isOptional = value
62
69
  return self
63
70
 
64
71
  def getSwDataDefProps(self):
65
72
  return self.swDataDefProps
66
73
 
67
74
  def setSwDataDefProps(self, value):
68
- self.swDataDefProps = value
75
+ if value is not None:
76
+ self.swDataDefProps = value
69
77
  return self
70
-
71
- def createImplementationDataTypeElement(self, short_name: str): # type: (...) -> ImplementationDataTypeElement
78
+
79
+ def createImplementationDataTypeElement(self, short_name: str): # type: (...) -> ImplementationDataTypeElement
72
80
  if (short_name not in self.elements):
73
81
  event = ImplementationDataTypeElement(self, short_name)
74
82
  self.elements[short_name] = event
@@ -78,13 +86,14 @@ class ImplementationDataTypeElement(AbstractImplementationDataTypeElement):
78
86
  return list(filter(lambda c: isinstance(c, ImplementationDataTypeElement), self.elements.values()))
79
87
 
80
88
 
81
- class AbstractImplementationDataType(AutosarDataType, metaclass = ABCMeta):
89
+ class AbstractImplementationDataType(AutosarDataType, metaclass=ABCMeta):
82
90
  def __init__(self, parent: ARObject, short_name: str):
83
- if type(self) == AbstractImplementationDataType:
91
+ if type(self) is AbstractImplementationDataType:
84
92
  raise NotImplementedError("AbstractImplementationDataType is an abstract class.")
85
93
 
86
94
  super().__init__(parent, short_name)
87
95
 
96
+
88
97
  class ImplementationDataType(AbstractImplementationDataType):
89
98
 
90
99
  CATEGORY_TYPE_REFERENCE = "TYPE_REFERENCE"
@@ -99,12 +108,9 @@ class ImplementationDataType(AbstractImplementationDataType):
99
108
  self.dynamicArraySizeProfile = None # type: String
100
109
  self.isStructWithOptionalElement = None # type: Boolean
101
110
 
102
- self.subElements = [] # type: List[str]
111
+ self.subElements = [] # type: List[ImplementationDataTypeElement]
103
112
  self.symbolProps = None # type: SymbolProps
104
- self.typeEmitter = None # type: ARLiteral
105
-
106
- #self._array_type = None # ImplementationDataType
107
- #self._struct_type = None # ImplementationDataType
113
+ self.typeEmitter = None # type: ARLiteral
108
114
 
109
115
  def getDynamicArraySizeProfile(self):
110
116
  return self.dynamicArraySizeProfile
@@ -120,19 +126,15 @@ class ImplementationDataType(AbstractImplementationDataType):
120
126
  self.isStructWithOptionalElement = value
121
127
  return self
122
128
 
123
- def createImplementationDataTypeElement(self, short_name: str) -> ImplementationDataTypeElement:
124
- self.subElements.append(short_name)
125
- if (short_name not in self.elements):
126
- event = ImplementationDataTypeElement(self, short_name)
127
- self.elements[short_name] = event
128
- return self.elements[short_name]
129
+ def createImplementationDataTypeElement(self, short_name: str) -> ImplementationDataTypeElement:
130
+ if not self.IsElementExists(short_name):
131
+ type_element = ImplementationDataTypeElement(self, short_name)
132
+ self.addElement(type_element)
133
+ self.subElements.append(type_element)
134
+ return self.getElement(short_name)
129
135
 
130
- def getImplementationDataTypeElements(self) -> List[ImplementationDataTypeElement]:
131
- elements = []
132
- for sub_element in self.subElements:
133
- elements.append(self.elements[sub_element])
134
- return elements
135
- # return filter(lambda c: isinstance(c, ImplementationDataTypeElement), self.elements.values())
136
+ def getSubElements(self) -> List[ImplementationDataTypeElement]:
137
+ return self.subElements
136
138
 
137
139
  def getArrayElementType(self) -> str:
138
140
  return self._array_type
@@ -163,4 +165,4 @@ class ImplementationDataType(AbstractImplementationDataType):
163
165
  return self.symbolProps
164
166
 
165
167
  def getSymbolProps(self) -> SymbolProps:
166
- return self.symbolProps
168
+ return self.symbolProps
@@ -6,11 +6,13 @@ from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiabl
6
6
  from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARFloat, RefType
7
7
  from ....M2.AUTOSARTemplates.SWComponentTemplate.Datatype.DataPrototypes import ParameterDataPrototype, VariableDataPrototype
8
8
 
9
+
9
10
  class ReentrancyLevelEnum(Enum):
10
11
  ENUM_MULTICORE_REENTRANT = "multicoreReentrant"
11
12
  ENUM_NON_REENTRANT = "nonReentrant"
12
13
  ENUM_SINGLE_CORE_REENTRANT = "singleCoreReentrant"
13
14
 
15
+
14
16
  class ExclusiveArea(Identifiable):
15
17
  def __init__(self, parent: ARObject, short_name: str):
16
18
  super().__init__(parent, short_name)
@@ -18,16 +20,15 @@ class ExclusiveArea(Identifiable):
18
20
 
19
21
  class ExecutableEntity(Identifiable, metaclass=ABCMeta):
20
22
  def __init__(self, parent: ARObject, short_name: str):
21
- if type(self) == ExecutableEntity:
23
+ if type(self) is ExecutableEntity:
22
24
  raise NotImplementedError("ExecutableEntity is an abstract class.")
23
25
 
24
26
  super().__init__(parent, short_name)
25
27
 
26
28
  self.activationReasons = [] # type: List[ExecutableEntityActivationReason]
27
- self.canEnterExclusiveAreaRefs = [] # type: List[RefType]
29
+ self.canEnterExclusiveAreaRefs = [] # type: List[RefType]
28
30
  self.minimumStartInterval = None # type: ARFloat
29
- self.reentrancyLevel = None #
30
-
31
+ self.reentrancyLevel = None # type: ReentrancyLevelEnum
31
32
  self.swAddrMethodRef = None # type: RefType
32
33
 
33
34
  def getActivationReasons(self):
@@ -73,7 +74,7 @@ class ExecutableEntity(Identifiable, metaclass=ABCMeta):
73
74
 
74
75
  class InternalBehavior(Identifiable, metaclass=ABCMeta):
75
76
  def __init__(self, parent: ARObject, short_name: str):
76
- if type(self) == InternalBehavior:
77
+ if type(self) is InternalBehavior:
77
78
  raise NotImplementedError("InternalBehavior is an abstract class.")
78
79
  super().__init__(parent, short_name)
79
80
 
@@ -120,6 +121,7 @@ class InternalBehavior(Identifiable, metaclass=ABCMeta):
120
121
  self.staticMemories.append(prototype)
121
122
  return self.getElement(short_name)
122
123
 
124
+
123
125
  class AbstractEvent(Identifiable):
124
126
  def __init__(self, parent: ARObject, short_name: str):
125
127
  super().__init__(parent, short_name)
@@ -3,11 +3,45 @@ from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject im
3
3
  from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Identifiable
4
4
  from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARNumerical, PositiveInteger, RefType, TRefType
5
5
 
6
+
7
+ class ModeDeclarationGroupPrototypeMapping(ARObject):
8
+ def __init__(self):
9
+ super().__init__()
10
+
11
+ self.firstModeGroupRef = None # type: RefType
12
+ self.modeDeclarationMappingSetRef = None # type: RefType
13
+ self.secondModeGroupRef = None # type: RefType
14
+
15
+ def getFirstModeGroupRef(self):
16
+ return self.firstModeGroupRef
17
+
18
+ def setFirstModeGroupRef(self, value):
19
+ if value is not None:
20
+ self.firstModeGroupRef = value
21
+ return self
22
+
23
+ def getModeDeclarationMappingSetRef(self):
24
+ return self.modeDeclarationMappingSetRef
25
+
26
+ def setModeDeclarationMappingSetRef(self, value):
27
+ if value is not None:
28
+ self.modeDeclarationMappingSetRef = value
29
+ return self
30
+
31
+ def getSecondModeGroupRef(self):
32
+ return self.secondModeGroupRef
33
+
34
+ def setSecondModeGroupRef(self, value):
35
+ if value is not None:
36
+ self.secondModeGroupRef = value
37
+ return self
38
+
39
+
6
40
  class ModeDeclaration(Identifiable):
7
41
  def __init__(self, parent: ARObject, short_name: str):
8
42
  super().__init__(parent, short_name)
9
43
 
10
- self.value = None # type: ARNumerical
44
+ self.value = None # type: ARNumerical
11
45
 
12
46
  def setValue(self, value):
13
47
  self.value = value
@@ -38,6 +72,7 @@ class ModeRequestTypeMap(ARObject):
38
72
  self.modeGroupRef = value
39
73
  return self
40
74
 
75
+
41
76
  class ModeDeclarationGroup(Identifiable):
42
77
  def __init__(self, parent: ARObject, short_name: str):
43
78
  super().__init__(parent, short_name)
@@ -56,7 +91,7 @@ class ModeDeclarationGroup(Identifiable):
56
91
  return self.elements[short_name]
57
92
 
58
93
  def getModeDeclarations(self) -> List[ModeDeclaration]:
59
- return list(sorted(filter(lambda a: isinstance(a, ModeDeclaration), self.elements.values()), key= lambda o:o.short_name))
94
+ return list(sorted(filter(lambda a: isinstance(a, ModeDeclaration), self.elements.values()), key=lambda o: o.short_name))
60
95
 
61
96
  def setInitialModeRef(self, ref: RefType):
62
97
  self.initialModeRef = ref
@@ -110,4 +145,4 @@ class ModeDeclarationGroupPrototype(Identifiable):
110
145
 
111
146
  def setTypeTRef(self, value):
112
147
  self.typeTRef = value
113
- return self
148
+ return self
@@ -4,7 +4,10 @@ from ....M2.AUTOSARTemplates.SWComponentTemplate.SwcInternalBehavior.InstanceRef
4
4
  from ....M2.AUTOSARTemplates.SWComponentTemplate.SwcInternalBehavior.AutosarVariableRef import AutosarVariableRef
5
5
  from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
6
6
  from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Identifiable
7
- from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import Identifier, RefType, AREnum, Boolean, ARLiteral, DiagRequirementIdString, Integer, PositiveInteger, RefType, String, TimeValue
7
+ from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import Identifier, RefType, AREnum, Boolean, ARLiteral
8
+ from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import DiagRequirementIdString, Integer, PositiveInteger
9
+ from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import String, TimeValue
10
+
8
11
 
9
12
  class RoleBasedDataAssignment(ARObject):
10
13
  def __init__(self):
@@ -44,14 +47,14 @@ class RoleBasedDataAssignment(ARObject):
44
47
  return self
45
48
 
46
49
 
47
-
48
- class ServiceNeeds(Identifiable, metaclass = ABCMeta):
50
+ class ServiceNeeds(Identifiable, metaclass=ABCMeta):
49
51
  def __init__(self, parent: ARObject, short_name: str):
50
- if type(self) == ServiceNeeds:
52
+ if type(self) is ServiceNeeds:
51
53
  raise NotImplementedError("ServiceNeeds is an abstract class.")
52
54
 
53
55
  super().__init__(parent, short_name)
54
56
 
57
+
55
58
  class RamBlockStatusControlEnum(AREnum):
56
59
  API = "api"
57
60
  NV_RAM_MANAGER = "nvRamManager"
@@ -62,6 +65,7 @@ class RamBlockStatusControlEnum(AREnum):
62
65
  RamBlockStatusControlEnum.NV_RAM_MANAGER,
63
66
  ))
64
67
 
68
+
65
69
  class NvBlockNeedsReliabilityEnum(AREnum):
66
70
  ERROR_CORRECTION = "errorCorrection"
67
71
  ERROR_DETECTION = "errorDetection"
@@ -87,6 +91,7 @@ class NvBlockNeedsWritingPriorityEnum(AREnum):
87
91
  NvBlockNeedsWritingPriorityEnum.MEDIUM,
88
92
  ))
89
93
 
94
+
90
95
  class NvBlockNeeds(ServiceNeeds):
91
96
  def __init__(self, parent: ARObject, short_name: str):
92
97
  super().__init__(parent, short_name)
@@ -96,11 +101,9 @@ class NvBlockNeeds(ServiceNeeds):
96
101
  self.cyclicWritingPeriod = None # type: TimeValue
97
102
  self.nDataSets = None # type: PositiveInteger
98
103
  self.nRomBlocks = None # type: PositiveInteger
99
- # type: RamBlockStatusControlEnum
100
- self.ramBlockStatusControl = None
104
+ self.ramBlockStatusControl = None # type: RamBlockStatusControlEnum
101
105
  self.readonly = None # type: Boolean
102
- # type: NvBlockNeedsReliabilityEnum
103
- self.reliability = None
106
+ self.reliability = None # type: NvBlockNeedsReliabilityEnum
104
107
  self.resistantToChangedSw = None # type: Boolean
105
108
  self.restoreAtStart = None # type: Boolean
106
109
  self.selectBlockForFirstInitAll = None # type: Boolean
@@ -114,8 +117,7 @@ class NvBlockNeeds(ServiceNeeds):
114
117
  self.writeOnlyOnce = None # type: Boolean
115
118
  self.writeVerification = None # type: Boolean
116
119
  self.writingFrequency = None # type: PositiveInteger
117
- # type: NvBlockNeedsWritingPriorityEnum
118
- self.writingPriority = None
120
+ self.writingPriority = None # type: NvBlockNeedsWritingPriorityEnum
119
121
 
120
122
  def getCalcRamBlockCrc(self):
121
123
  return self.calcRamBlockCrc
@@ -293,6 +295,12 @@ class RoleBasedDataTypeAssignment(ARObject):
293
295
  self.usedImplementationDataTypeRef = value
294
296
  return self
295
297
 
298
+
299
+ class ServiceDiagnosticRelevanceEnum(AREnum):
300
+ def __init__(self):
301
+ super().__init__([])
302
+
303
+
296
304
  class ServiceDependency(Identifiable):
297
305
  def __init__(self, parent: ARObject, short_name: str):
298
306
  super().__init__(parent, short_name)
@@ -322,6 +330,7 @@ class ServiceDependency(Identifiable):
322
330
  self.symbolicNameProps = value
323
331
  return self
324
332
 
333
+
325
334
  class DiagnosticAudienceEnum(AREnum):
326
335
  AFTER_MARKET = "aftermarket"
327
336
  AFTER_SALES = "afterSales"
@@ -338,6 +347,7 @@ class DiagnosticAudienceEnum(AREnum):
338
347
  DiagnosticAudienceEnum.SUPPLIER,
339
348
  ))
340
349
 
350
+
341
351
  class DiagnosticServiceRequestCallbackTypeEnum(AREnum):
342
352
  REQUEST_CALLBACK_TYPE_MANUFACTURER = "requestCallbackTypeManufacturer"
343
353
  REQUEST_CALLBACK_TYPE_SUPPLIER = "requestCallbackTypeSupplier"
@@ -348,9 +358,10 @@ class DiagnosticServiceRequestCallbackTypeEnum(AREnum):
348
358
  DiagnosticServiceRequestCallbackTypeEnum.REQUEST_CALLBACK_TYPE_SUPPLIER,
349
359
  ))
350
360
 
351
- class DiagnosticCapabilityElement(ServiceNeeds, metaclass = ABCMeta):
361
+
362
+ class DiagnosticCapabilityElement(ServiceNeeds, metaclass=ABCMeta):
352
363
  def __init__(self, parent: ARObject, short_name: str):
353
- if type(self) == DiagnosticCapabilityElement:
364
+ if type(self) is DiagnosticCapabilityElement:
354
365
  raise NotImplementedError("DiagnosticCapabilityElement is an abstract class.")
355
366
 
356
367
  super().__init__(parent, short_name)
@@ -380,6 +391,7 @@ class DiagnosticCapabilityElement(ServiceNeeds, metaclass = ABCMeta):
380
391
  self.securityAccessLevel = value
381
392
  return self
382
393
 
394
+
383
395
  class DiagnosticRoutineTypeEnum(AREnum):
384
396
  ASYNCHRONOUS = "asynchronous"
385
397
  SYNCHRONOUS = "synchronous"
@@ -390,6 +402,7 @@ class DiagnosticRoutineTypeEnum(AREnum):
390
402
  DiagnosticRoutineTypeEnum.SYNCHRONOUS,
391
403
  ))
392
404
 
405
+
393
406
  class DiagnosticCommunicationManagerNeeds(DiagnosticCapabilityElement):
394
407
  def __init__(self, parent: ARObject, short_name: str):
395
408
  super().__init__(parent, short_name)
@@ -403,6 +416,7 @@ class DiagnosticCommunicationManagerNeeds(DiagnosticCapabilityElement):
403
416
  self.serviceRequestCallbackType = value
404
417
  return self
405
418
 
419
+
406
420
  class DiagnosticRoutineNeeds(DiagnosticCapabilityElement):
407
421
  def __init__(self, parent: ARObject, short_name: str):
408
422
  super().__init__(parent, short_name)
@@ -437,6 +451,7 @@ class DiagnosticValueAccessEnum(AREnum):
437
451
  DiagnosticValueAccessEnum.WRITE_ONLY,
438
452
  ))
439
453
 
454
+
440
455
  class DiagnosticProcessingStyleEnum(AREnum):
441
456
  PROCESSING_STYLE_ASYNCHRONOUS = "processingStyleAsynchronous"
442
457
  PROCESSING_STYLE_ASYNCHRONOUS_WITH_ERROR = "processingStyleAsynchronousWithError"
@@ -447,7 +462,8 @@ class DiagnosticProcessingStyleEnum(AREnum):
447
462
  DiagnosticProcessingStyleEnum.PROCESSING_STYLE_ASYNCHRONOUS,
448
463
  DiagnosticProcessingStyleEnum.PROCESSING_STYLE_ASYNCHRONOUS_WITH_ERROR,
449
464
  DiagnosticProcessingStyleEnum.PROCESSING_STYLE_SYNCHRONOUS,
450
- ))
465
+ ))
466
+
451
467
 
452
468
  class DiagnosticValueNeeds(DiagnosticCapabilityElement):
453
469
  def __init__(self, parent: ARObject, short_name: str):
@@ -493,14 +509,16 @@ class DiagnosticValueNeeds(DiagnosticCapabilityElement):
493
509
  def setProcessingStyle(self, value):
494
510
  self.processingStyle = value
495
511
  return self
496
-
497
- class DiagEventDebounceAlgorithm(Identifiable, metaclass = ABCMeta):
512
+
513
+
514
+ class DiagEventDebounceAlgorithm(Identifiable, metaclass=ABCMeta):
498
515
  def __init__(self, parent: ARObject, short_name: str):
499
- if type(self) == ServiceNeeds:
516
+ if type(self) is DiagEventDebounceAlgorithm:
500
517
  raise NotImplementedError("DiagEventDebounceAlgorithm is an abstract class.")
501
518
 
502
519
  super().__init__(parent, short_name)
503
520
 
521
+
504
522
  class DiagEventDebounceCounterBased(DiagEventDebounceAlgorithm):
505
523
  def __init__(self, parent: ARObject, short_name: str):
506
524
  super().__init__(parent, short_name)
@@ -583,6 +601,7 @@ class DiagEventDebounceMonitorInternal(DiagEventDebounceAlgorithm):
583
601
  def __init__(self, parent: ARObject, short_name: str):
584
602
  super().__init__(parent, short_name)
585
603
 
604
+
586
605
  class DiagEventDebounceTimeBased(DiagEventDebounceAlgorithm):
587
606
  def __init__(self, parent: ARObject, short_name: str):
588
607
  super().__init__(parent, short_name)
@@ -612,27 +631,79 @@ class DiagEventDebounceTimeBased(DiagEventDebounceAlgorithm):
612
631
  self.timePassedThreshold = value
613
632
  return self
614
633
 
634
+
635
+ class DtcKindEnum(AREnum):
636
+ def __init__(self):
637
+ super().__init__([])
638
+
639
+
615
640
  class DiagnosticEventInfoNeeds(DiagnosticCapabilityElement):
616
641
  def __init__(self, parent: ARObject, short_name: str):
617
642
  super().__init__(parent, short_name)
618
643
 
644
+ self.dtcKind = None # type: DtcKindEnum
619
645
  self.obdDtcNumber = None # type: PositiveInteger
620
646
  self.udsDtcNumber = None # type: PositiveInteger
621
647
 
648
+ def getDtcKind(self):
649
+ return self.dtcKind
650
+
651
+ def setDtcKind(self, value):
652
+ if value is not None:
653
+ self.dtcKind = value
654
+ return self
655
+
622
656
  def getObdDtcNumber(self):
623
657
  return self.obdDtcNumber
624
658
 
625
659
  def setObdDtcNumber(self, value):
626
- self.obdDtcNumber = value
660
+ if value is not None:
661
+ self.obdDtcNumber = value
627
662
  return self
628
663
 
629
664
  def getUdsDtcNumber(self):
630
665
  return self.udsDtcNumber
631
666
 
632
667
  def setUdsDtcNumber(self, value):
633
- self.udsDtcNumber = value
668
+ if value is not None:
669
+ self.udsDtcNumber = value
670
+ return self
671
+
672
+
673
+ class DiagnosticClearDtcNotificationEnum(AREnum):
674
+ def __init__(self):
675
+ super().__init__([])
676
+
677
+
678
+ class DtcFormatTypeEnum(AREnum):
679
+ def __init__(self):
680
+ super().__init__([])
681
+
682
+
683
+ class DtcStatusChangeNotificationNeeds(DiagnosticCapabilityElement):
684
+ def __init__(self, parent, short_name):
685
+ super().__init__(parent, short_name)
686
+
687
+ self.dtcFormatType = None # type: DtcFormatTypeEnum # AUTOSAR 4.3.1
688
+ self.notificationTime = None # type: DiagnosticClearDtcNotificationEnum
689
+
690
+ def getDtcFormatType(self):
691
+ return self.dtcFormatType
692
+
693
+ def setDtcFormatType(self, value):
694
+ if value is not None:
695
+ self.dtcFormatType = value
696
+ return self
697
+
698
+ def getNotificationTime(self):
699
+ return self.notificationTime
700
+
701
+ def setNotificationTime(self, value):
702
+ if value is not None:
703
+ self.notificationTime = value
634
704
  return self
635
705
 
706
+
636
707
  class DiagnosticEventNeeds(DiagnosticCapabilityElement):
637
708
  def __init__(self, parent: ARObject, short_name: str):
638
709
  super().__init__(parent, short_name)
@@ -719,6 +790,7 @@ class DiagnosticEventNeeds(DiagnosticCapabilityElement):
719
790
  self.udsDtcNumber = value
720
791
  return self
721
792
 
793
+
722
794
  class CryptoServiceNeeds(ServiceNeeds):
723
795
  def __init__(self, parent: ARObject, short_name: str):
724
796
  super().__init__(parent, short_name)
@@ -756,6 +828,12 @@ class CryptoServiceNeeds(ServiceNeeds):
756
828
  self.maximumKeyLength = value
757
829
  return self
758
830
 
831
+
759
832
  class EcuStateMgrUserNeeds(ServiceNeeds):
760
833
  def __init__(self, parent: ARObject, short_name: str):
761
834
  super().__init__(parent, short_name)
835
+
836
+
837
+ class DltUserNeeds(ServiceNeeds):
838
+ def __init__(self, parent: ARObject, short_name: str):
839
+ super().__init__(parent, short_name)
@@ -0,0 +1,73 @@
1
+ from typing import List
2
+
3
+ from ......M2.AUTOSARTemplates.CommonStructure import ValueSpecification
4
+ from ......M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
5
+ from ......M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import RefType
6
+ from ......M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import ARElement
7
+ from ......M2.AUTOSARTemplates.SWComponentTemplate.Communication import PPortComSpec
8
+
9
+
10
+ class PortPrototypeBlueprintInitValue(ARObject):
11
+ def __init__(self):
12
+ super().__init__()
13
+
14
+ self.dataPrototypeRef = None # type: RefType
15
+ self.value = None # type: ValueSpecification
16
+
17
+ def getDataPrototypeRef(self):
18
+ return self.dataPrototypeRef
19
+
20
+ def setDataPrototypeRef(self, value):
21
+ if value is not None:
22
+ self.dataPrototypeRef = value
23
+ return self
24
+
25
+ def getValue(self):
26
+ return self.value
27
+
28
+ def setValue(self, value):
29
+ if value is not None:
30
+ self.value = value
31
+ return self
32
+
33
+
34
+ class PortPrototypeBlueprint(ARElement):
35
+ def __init__(self, parent, short_name):
36
+ super().__init__(parent, short_name)
37
+
38
+ self.initValues = [] # type: List[PortPrototypeBlueprintInitValue]
39
+ self.interfaceRef = None # type: RefType
40
+ self.providedComSpecs = [] # type: List[PPortComSpec]
41
+ self.requiredComSpecs = [] # type: List[RPortComSpec]
42
+
43
+ def getInitValues(self):
44
+ return self.initValues
45
+
46
+ def setInitValues(self, value):
47
+ if value is not None:
48
+ self.initValues = value
49
+ return self
50
+
51
+ def getInterfaceRef(self):
52
+ return self.interfaceRef
53
+
54
+ def setInterfaceRef(self, value):
55
+ if value is not None:
56
+ self.interfaceRef = value
57
+ return self
58
+
59
+ def getProvidedComSpecs(self):
60
+ return self.providedComSpecs
61
+
62
+ def setProvidedComSpecs(self, value):
63
+ if value is not None:
64
+ self.providedComSpecs = value
65
+ return self
66
+
67
+ def getRequiredComSpecs(self):
68
+ return self.requiredComSpecs
69
+
70
+ def setRequiredComSpecs(self, value):
71
+ if value is not None:
72
+ self.requiredComSpecs = value
73
+ return self
@@ -0,0 +1,45 @@
1
+ from typing import List
2
+
3
+ from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import NameToken
4
+ from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import ARElement, Identifiable
5
+
6
+
7
+ class Keyword(Identifiable):
8
+ def __init__(self, parent, short_name):
9
+ super().__init__(parent, short_name)
10
+
11
+ self.abbrName = None # type: NameToken
12
+ self.classifications = [] # type: List[NameToken]
13
+
14
+ def getAbbrName(self):
15
+ return self.abbrName
16
+
17
+ def setAbbrName(self, value):
18
+ if value is not None:
19
+ self.abbrName = value
20
+ return self
21
+
22
+ def getClassifications(self):
23
+ return self.classifications
24
+
25
+ def addClassification(self, value):
26
+ if value is not None:
27
+ self.classifications.append(value)
28
+ return self
29
+
30
+
31
+ class KeywordSet(ARElement):
32
+ def __init__(self, parent, short_name):
33
+ super().__init__(parent, short_name)
34
+
35
+ self.keywords = [] # type: List[Keyword]
36
+
37
+ def getKeywords(self):
38
+ return self.keywords
39
+
40
+ def createKeyword(self, short_name: str) -> Keyword:
41
+ if (not self.IsElementExists(short_name)):
42
+ keyword = Keyword(self, short_name)
43
+ self.addElement(keyword)
44
+ self.keywords.append(keyword)
45
+ return self.getElement(short_name)