armodel 1.7.8__py3-none-any.whl → 1.7.9__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.
- armodel/models/M2/AUTOSARTemplates/AutosarTopLevelStructure.py +21 -0
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswBehavior.py +102 -12
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswInterfaces.py +80 -9
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswOverview.py +17 -10
- armodel/models/M2/AUTOSARTemplates/CommonStructure/Implementation.py +10 -8
- armodel/models/M2/AUTOSARTemplates/CommonStructure/InternalBehavior.py +7 -5
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ModeDeclaration.py +38 -3
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ServiceNeeds.py +91 -18
- armodel/models/M2/AUTOSARTemplates/CommonStructure/StandardizationTemplate/BlueprintDedicated/PortPrototypeBlueprint.py +73 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/StandardizationTemplate/BlueprintDedicated/__init__.py +0 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/StandardizationTemplate/Keyword.py +45 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/StandardizationTemplate/__init__.py +0 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/TriggerDeclaration.py +27 -0
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ARPackage.py +33 -4
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ElementCollection.py +73 -0
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/PrimitiveTypes.py +35 -14
- armodel/models/M2/AUTOSARTemplates/GenericStructure/LifeCycles.py +151 -1
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Components/__init__.py +4 -1
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/PortInterface/__init__.py +55 -12
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SoftwareComponentDocumentation.py +80 -0
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/RTEEvents.py +11 -1
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ServiceMapping.py +16 -2
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Ethernet/EthernetTopology.py +18 -6
- armodel/models/M2/MSR/DataDictionary/DataDefProperties.py +10 -1
- armodel/models/M2/MSR/Documentation/BlockElements/Figure.py +163 -0
- armodel/models/M2/MSR/Documentation/BlockElements/__init__.py +0 -0
- armodel/models/M2/MSR/Documentation/TextModel/BlockElements/ListElements.py +5 -3
- armodel/models/M2/MSR/Documentation/TextModel/BlockElements/PaginationAndView.py +22 -1
- armodel/models/M2/MSR/Documentation/TextModel/BlockElements/__init__.py +94 -9
- armodel/models/__init__.py +2 -0
- armodel/parser/abstract_arxml_parser.py +5 -2
- armodel/parser/arxml_parser.py +255 -38
- armodel/tests/test_armodel/parser/test_sw_components.py +266 -4
- armodel/writer/arxml_writer.py +310 -57
- {armodel-1.7.8.dist-info → armodel-1.7.9.dist-info}/METADATA +21 -1
- {armodel-1.7.8.dist-info → armodel-1.7.9.dist-info}/RECORD +40 -33
- {armodel-1.7.8.dist-info → armodel-1.7.9.dist-info}/LICENSE +0 -0
- {armodel-1.7.8.dist-info → armodel-1.7.9.dist-info}/WHEEL +0 -0
- {armodel-1.7.8.dist-info → armodel-1.7.9.dist-info}/entry_points.txt +0 -0
- {armodel-1.7.8.dist-info → armodel-1.7.9.dist-info}/top_level.txt +0 -0
|
@@ -34,6 +34,21 @@ class AbstractAUTOSAR(CollectableElement):
|
|
|
34
34
|
def __init__(self):
|
|
35
35
|
super().__init__()
|
|
36
36
|
|
|
37
|
+
self.release_xsd_mappings = {
|
|
38
|
+
"4.0.3": "AUTOSAR_4-0-3.xsd",
|
|
39
|
+
"4.1.0": "AUTOSAR_4-1-0.xsd",
|
|
40
|
+
"4.2.1": "AUTOSAR_4-2-1.xsd",
|
|
41
|
+
"4.3.0": "AUTOSAR_00043.xsd",
|
|
42
|
+
"4.3.1": "AUTOSAR_00045.xsd",
|
|
43
|
+
"4.4.0": "AUTOSAR_00047.xsd",
|
|
44
|
+
"R19-11": "AUTOSAR_00048.xsd",
|
|
45
|
+
"R20-11": "AUTOSAR_00049.xsd",
|
|
46
|
+
"R21-11": "AUTOSAR_00050.xsd",
|
|
47
|
+
"R22-11": "AUTOSAR_00051.xsd",
|
|
48
|
+
"R23-11": "AUTOSAR_00052.xsd",
|
|
49
|
+
"R24-11": "AUTOSAR_00053.xsd",
|
|
50
|
+
}
|
|
51
|
+
|
|
37
52
|
self.clear()
|
|
38
53
|
|
|
39
54
|
def getAdminData(self):
|
|
@@ -200,6 +215,12 @@ class AbstractAUTOSAR(CollectableElement):
|
|
|
200
215
|
if value is not None:
|
|
201
216
|
self.uuid_objects[value.uuid] = value
|
|
202
217
|
return self
|
|
218
|
+
|
|
219
|
+
def setARRelease(self, release: str):
|
|
220
|
+
if release not in self.release_xsd_mappings:
|
|
221
|
+
raise "invalid AUTOSAR Release <%s>" % release
|
|
222
|
+
self.schema_location = self.release_xsd_mappings[release]
|
|
223
|
+
return self
|
|
203
224
|
|
|
204
225
|
|
|
205
226
|
class AUTOSAR (AbstractAUTOSAR):
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from abc import ABCMeta
|
|
2
2
|
from typing import List
|
|
3
3
|
|
|
4
|
+
from ....M2.MSR.DataDictionary.DataDefProperties import SwImplPolicyEnum
|
|
4
5
|
from ....M2.AUTOSARTemplates.CommonStructure.InternalBehavior import ExecutableEntity
|
|
5
6
|
from ....M2.AUTOSARTemplates.CommonStructure.InternalBehavior import InternalBehavior
|
|
6
7
|
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Identifiable
|
|
@@ -28,6 +29,76 @@ class BswModuleCallPoint(Referrable):
|
|
|
28
29
|
return self
|
|
29
30
|
|
|
30
31
|
|
|
32
|
+
class BswAsynchronousServerCallPoint(BswModuleCallPoint):
|
|
33
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
34
|
+
super().__init__(parent, short_name)
|
|
35
|
+
|
|
36
|
+
self.calledEntryRef = None # type: RefType
|
|
37
|
+
|
|
38
|
+
def getCalledEntryRef(self):
|
|
39
|
+
return self.calledEntryRef
|
|
40
|
+
|
|
41
|
+
def setCalledEntryRef(self, value):
|
|
42
|
+
if value is not None:
|
|
43
|
+
self.calledEntryRef = value
|
|
44
|
+
return self
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class BswDirectCallPoint(BswModuleCallPoint):
|
|
48
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
49
|
+
super().__init__(parent, short_name)
|
|
50
|
+
|
|
51
|
+
self.calledEntryRef = None # type: RefType
|
|
52
|
+
self.calledFromWithinExclusiveAreaRef = None # type: RefType
|
|
53
|
+
|
|
54
|
+
def getCalledEntryRef(self):
|
|
55
|
+
return self.calledEntryRef
|
|
56
|
+
|
|
57
|
+
def setCalledEntryRef(self, value):
|
|
58
|
+
if value is not None:
|
|
59
|
+
self.calledEntryRef = value
|
|
60
|
+
return self
|
|
61
|
+
|
|
62
|
+
def getCalledFromWithinExclusiveAreaRef(self):
|
|
63
|
+
return self.calledFromWithinExclusiveAreaRef
|
|
64
|
+
|
|
65
|
+
def setCalledFromWithinExclusiveAreaRef(self, value):
|
|
66
|
+
if value is not None:
|
|
67
|
+
self.calledFromWithinExclusiveAreaRef = value
|
|
68
|
+
return self
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
class BswSynchronousServerCallPoint(BswModuleCallPoint):
|
|
72
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
73
|
+
super().__init__(parent, short_name)
|
|
74
|
+
|
|
75
|
+
self.calledEntryRef = None # type: RefType
|
|
76
|
+
self.calledFromWithinExclusiveAreaRef = None # type: RefType
|
|
77
|
+
|
|
78
|
+
def getCalledEntryRef(self):
|
|
79
|
+
return self.calledEntryRef
|
|
80
|
+
|
|
81
|
+
def setCalledEntryRef(self, value):
|
|
82
|
+
if value is not None:
|
|
83
|
+
self.calledEntryRef = value
|
|
84
|
+
return self
|
|
85
|
+
|
|
86
|
+
def getCalledFromWithinExclusiveAreaRef(self):
|
|
87
|
+
return self.calledFromWithinExclusiveAreaRef
|
|
88
|
+
|
|
89
|
+
def setCalledFromWithinExclusiveAreaRef(self, value):
|
|
90
|
+
if value is not None:
|
|
91
|
+
self.calledFromWithinExclusiveAreaRef = value
|
|
92
|
+
return self
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
class BswAsynchronousServerCallResultPoint(BswModuleCallPoint):
|
|
96
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
97
|
+
super().__init__(parent, short_name)
|
|
98
|
+
|
|
99
|
+
self.asynchronousServerCallPointRef = None # type: RefType
|
|
100
|
+
|
|
101
|
+
|
|
31
102
|
class BswVariableAccess(Referrable):
|
|
32
103
|
def __init__(self, parent: ARObject, short_name: str):
|
|
33
104
|
super().__init__(parent, short_name)
|
|
@@ -69,26 +140,28 @@ class BswModuleEntity(ExecutableEntity, metaclass=ABCMeta):
|
|
|
69
140
|
def getAccessedModeGroupRefs(self):
|
|
70
141
|
return self.accessedModeGroupRefs
|
|
71
142
|
|
|
72
|
-
def
|
|
143
|
+
def addAccessedModeGroupRef(self, value):
|
|
73
144
|
if value is not None:
|
|
74
|
-
self.accessedModeGroupRefs
|
|
145
|
+
self.accessedModeGroupRefs.append(value)
|
|
75
146
|
return self
|
|
76
147
|
|
|
77
148
|
def getActivationPointRefs(self):
|
|
78
149
|
return self.activationPointRefs
|
|
79
150
|
|
|
80
|
-
def
|
|
151
|
+
def addActivationPointRef(self, value):
|
|
81
152
|
if value is not None:
|
|
82
|
-
self.activationPointRefs
|
|
153
|
+
self.activationPointRefs.append(value)
|
|
83
154
|
return self
|
|
84
155
|
|
|
85
156
|
def getCallPoints(self):
|
|
86
157
|
return self.callPoints
|
|
87
158
|
|
|
88
|
-
def
|
|
89
|
-
if
|
|
90
|
-
|
|
91
|
-
|
|
159
|
+
def createBswAsynchronousServerCallPoint(self, short_name):
|
|
160
|
+
if (not self.IsElementExists(short_name)):
|
|
161
|
+
access = BswAsynchronousServerCallPoint(self, short_name)
|
|
162
|
+
self.addElement(access)
|
|
163
|
+
self.callPoints.append(access)
|
|
164
|
+
return self.getElement(short_name)
|
|
92
165
|
|
|
93
166
|
def getDataReceivePoints(self):
|
|
94
167
|
return self.dataReceivePoints
|
|
@@ -406,6 +479,21 @@ class BswQueuedDataReceptionPolicy(BswDataReceptionPolicy):
|
|
|
406
479
|
return self
|
|
407
480
|
|
|
408
481
|
|
|
482
|
+
class BswInternalTriggeringPoint(Identifiable):
|
|
483
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
484
|
+
super().__init__(parent, short_name)
|
|
485
|
+
|
|
486
|
+
self.swImplPolicy = None # type: SwImplPolicyEnum
|
|
487
|
+
|
|
488
|
+
def getSwImplPolicy(self):
|
|
489
|
+
return self.swImplPolicy
|
|
490
|
+
|
|
491
|
+
def setSwImplPolicy(self, value):
|
|
492
|
+
if value is not None:
|
|
493
|
+
self.swImplPolicy = value
|
|
494
|
+
return self
|
|
495
|
+
|
|
496
|
+
|
|
409
497
|
class BswInternalBehavior(InternalBehavior):
|
|
410
498
|
def __init__(self, parent: ARObject, short_name: str):
|
|
411
499
|
super().__init__(parent, short_name)
|
|
@@ -476,10 +564,12 @@ class BswInternalBehavior(InternalBehavior):
|
|
|
476
564
|
def getInternalTriggeringPoints(self):
|
|
477
565
|
return self.internalTriggeringPoints
|
|
478
566
|
|
|
479
|
-
def
|
|
480
|
-
if
|
|
481
|
-
|
|
482
|
-
|
|
567
|
+
def createBswInternalTriggeringPoint(self, short_name: str) -> BswInternalTriggeringPoint:
|
|
568
|
+
if not self.IsElementExists(short_name):
|
|
569
|
+
entity = BswInternalTriggeringPoint(self, short_name)
|
|
570
|
+
self.addElement(entity)
|
|
571
|
+
self.internalTriggeringPoints.append(entity)
|
|
572
|
+
return self.getElement(short_name)
|
|
483
573
|
|
|
484
574
|
def getInternalTriggeringPointPolicies(self):
|
|
485
575
|
return self.internalTriggeringPointPolicies
|
|
@@ -1,9 +1,45 @@
|
|
|
1
1
|
from typing import List
|
|
2
2
|
|
|
3
3
|
from ....M2.MSR.DataDictionary.ServiceProcessTask import SwServiceArg
|
|
4
|
+
from ....M2.AUTOSARTemplates.CommonStructure.ServiceNeeds import ServiceNeeds
|
|
4
5
|
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
5
|
-
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import ARElement
|
|
6
|
-
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import
|
|
6
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import ARElement, Identifiable, Referrable
|
|
7
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARNumerical, Boolean, Identifier, NameToken, RefType
|
|
8
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import PositiveInteger
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class BswModuleDependency(Identifiable):
|
|
12
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
13
|
+
super().__init__(parent, short_name)
|
|
14
|
+
|
|
15
|
+
self.serviceItems = [] # type: List[ServiceNeeds]
|
|
16
|
+
self.targetModuleId = None # type: PositiveInteger
|
|
17
|
+
self.targetModuleRef = None # type: RefType
|
|
18
|
+
|
|
19
|
+
def getServiceItems(self):
|
|
20
|
+
return self.serviceItems
|
|
21
|
+
|
|
22
|
+
def setServiceItems(self, value):
|
|
23
|
+
if value is not None:
|
|
24
|
+
self.serviceItems = value
|
|
25
|
+
return self
|
|
26
|
+
|
|
27
|
+
def getTargetModuleId(self):
|
|
28
|
+
return self.targetModuleId
|
|
29
|
+
|
|
30
|
+
def setTargetModuleId(self, value):
|
|
31
|
+
if value is not None:
|
|
32
|
+
self.targetModuleId = value
|
|
33
|
+
return self
|
|
34
|
+
|
|
35
|
+
def getTargetModuleRef(self):
|
|
36
|
+
return self.targetModuleRef
|
|
37
|
+
|
|
38
|
+
def setTargetModuleRef(self, value):
|
|
39
|
+
if value is not None:
|
|
40
|
+
self.targetModuleRef = value
|
|
41
|
+
return self
|
|
42
|
+
|
|
7
43
|
|
|
8
44
|
class BswModuleEntry(ARElement):
|
|
9
45
|
def __init__(self, parent: ARObject, short_name: str):
|
|
@@ -109,18 +145,53 @@ class BswModuleEntry(ARElement):
|
|
|
109
145
|
result = []
|
|
110
146
|
|
|
111
147
|
result.append("short_name : %s" % self.short_name)
|
|
112
|
-
if self.serviceId
|
|
148
|
+
if self.serviceId is not None:
|
|
113
149
|
result.append("service_id : %d" % self.serviceId)
|
|
114
|
-
if self.isReentrant
|
|
150
|
+
if self.isReentrant is not None:
|
|
115
151
|
result.append("is_reentrant : %s" % self.isReentrant)
|
|
116
|
-
if self.isSynchronous
|
|
152
|
+
if self.isSynchronous is not None:
|
|
117
153
|
result.append("is_synchronous : %s" % self.isSynchronous)
|
|
118
|
-
if self.callType
|
|
154
|
+
if self.callType is not None:
|
|
119
155
|
result.append("call_type : %s" % self.callType)
|
|
120
|
-
if self.
|
|
156
|
+
if self.executionContext is not None:
|
|
121
157
|
result.append("execution_context : %s" % self.executionContext)
|
|
122
|
-
if self.
|
|
158
|
+
if self.swServiceImplPolicy is not None:
|
|
123
159
|
result.append("sw_service_impl_policy : %s" % self.swServiceImplPolicy)
|
|
124
160
|
|
|
125
161
|
return "\n".join(result)
|
|
126
|
-
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
class BswModuleClientServerEntry(Referrable):
|
|
165
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
166
|
+
super().__init__(parent, short_name)
|
|
167
|
+
|
|
168
|
+
self.encapsulatedEntryRef = None # type: RefType
|
|
169
|
+
self.isReentrant = None # type: Boolean
|
|
170
|
+
self.isSynchronous = None # type: Boolean
|
|
171
|
+
|
|
172
|
+
def getEncapsulatedEntryRef(self):
|
|
173
|
+
return self.encapsulatedEntryRef
|
|
174
|
+
|
|
175
|
+
def setEncapsulatedEntryRef(self, value):
|
|
176
|
+
if value is not None:
|
|
177
|
+
self.encapsulatedEntryRef = value
|
|
178
|
+
return self
|
|
179
|
+
|
|
180
|
+
def getIsReentrant(self):
|
|
181
|
+
return self.isReentrant
|
|
182
|
+
|
|
183
|
+
def setIsReentrant(self, value):
|
|
184
|
+
if value is not None:
|
|
185
|
+
self.isReentrant = value
|
|
186
|
+
return self
|
|
187
|
+
|
|
188
|
+
def getIsSynchronous(self):
|
|
189
|
+
return self.isSynchronous
|
|
190
|
+
|
|
191
|
+
def setIsSynchronous(self, value):
|
|
192
|
+
if value is not None:
|
|
193
|
+
self.isSynchronous = value
|
|
194
|
+
return self
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
from
|
|
1
|
+
from armodel.models.M2.AUTOSARTemplates.SWComponentTemplate.SoftwareComponentDocumentation import SwComponentDocumentation
|
|
2
|
+
from ....M2.AUTOSARTemplates.BswModuleTemplate.BswInterfaces import BswModuleClientServerEntry, BswModuleDependency
|
|
2
3
|
from ....M2.AUTOSARTemplates.BswModuleTemplate.BswBehavior import BswInternalBehavior
|
|
3
4
|
from ....M2.AUTOSARTemplates.CommonStructure.ModeDeclaration import ModeDeclarationGroupPrototype
|
|
4
5
|
from ....M2.AUTOSARTemplates.CommonStructure.TriggerDeclaration import Trigger
|
|
5
6
|
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
6
7
|
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import ARElement
|
|
7
8
|
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import PositiveInteger, RefType
|
|
9
|
+
from ....M2.AUTOSARTemplates.SWComponentTemplate.Datatype.DataPrototypes import VariableDataPrototype
|
|
8
10
|
from typing import List
|
|
9
11
|
|
|
12
|
+
|
|
10
13
|
class BswModuleDescription(ARElement):
|
|
11
14
|
'''
|
|
12
15
|
Root element for the description of a single BSW module or BSW cluster. In case it
|
|
@@ -28,7 +31,7 @@ class BswModuleDescription(ARElement):
|
|
|
28
31
|
self.moduleId = None # type: PositiveInteger
|
|
29
32
|
self.providedClientServerEntries = [] # type: List[BswModuleClientServerEntry]
|
|
30
33
|
self.providedDatas = [] # type: List[VariableDataPrototype]
|
|
31
|
-
self.providedModeGroups
|
|
34
|
+
self.providedModeGroups = [] # type: List[ModeDeclarationGroupPrototype]
|
|
32
35
|
self.releasedTriggers = [] # type: List[Trigger]
|
|
33
36
|
self.requiredClientServerEntries = [] # type: List[BswModuleClientServerEntry]
|
|
34
37
|
self.requiredDatas = [] # type: List[VariableDataPrototype]
|
|
@@ -96,10 +99,12 @@ class BswModuleDescription(ARElement):
|
|
|
96
99
|
def getProvidedClientServerEntries(self):
|
|
97
100
|
return self.providedClientServerEntries
|
|
98
101
|
|
|
99
|
-
def
|
|
100
|
-
if
|
|
101
|
-
|
|
102
|
-
|
|
102
|
+
def createProvidedClientServerEntry(self, short_name: str) -> BswModuleClientServerEntry:
|
|
103
|
+
if (not self.IsElementExists(short_name)):
|
|
104
|
+
entry = BswModuleClientServerEntry(self, short_name)
|
|
105
|
+
self.addElement(entry)
|
|
106
|
+
self.providedClientServerEntries.append(entry)
|
|
107
|
+
return self.getElement(short_name)
|
|
103
108
|
|
|
104
109
|
def getProvidedDatas(self):
|
|
105
110
|
return self.providedDatas
|
|
@@ -134,10 +139,12 @@ class BswModuleDescription(ARElement):
|
|
|
134
139
|
def getRequiredClientServerEntries(self):
|
|
135
140
|
return self.requiredClientServerEntries
|
|
136
141
|
|
|
137
|
-
def
|
|
138
|
-
if
|
|
139
|
-
|
|
140
|
-
|
|
142
|
+
def createRequiredClientServerEntry(self, short_name: str) -> BswModuleClientServerEntry:
|
|
143
|
+
if (not self.IsElementExists(short_name)):
|
|
144
|
+
entry = BswModuleClientServerEntry(self, short_name)
|
|
145
|
+
self.addElement(entry)
|
|
146
|
+
self.requiredClientServerEntries.append(entry)
|
|
147
|
+
return self.getElement(short_name)
|
|
141
148
|
|
|
142
149
|
def getRequiredDatas(self):
|
|
143
150
|
return self.requiredDatas
|
|
@@ -7,9 +7,9 @@ from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTy
|
|
|
7
7
|
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class ImplementationProps(Referrable, metaclass
|
|
10
|
+
class ImplementationProps(Referrable, metaclass=ABCMeta):
|
|
11
11
|
def __init__(self, parent: ARObject, short_name: str):
|
|
12
|
-
if type(self)
|
|
12
|
+
if type(self) is ImplementationProps:
|
|
13
13
|
raise NotImplementedError("ImplementationProps is an abstract class.")
|
|
14
14
|
|
|
15
15
|
super().__init__(parent, short_name)
|
|
@@ -35,12 +35,13 @@ class Code(Identifiable):
|
|
|
35
35
|
self.artifactDescriptors.append(desc)
|
|
36
36
|
return self
|
|
37
37
|
|
|
38
|
-
def getArtifactDescriptors(self, category:str = "") -> List[AutosarEngineeringObject]:
|
|
38
|
+
def getArtifactDescriptors(self, category: str = "") -> List[AutosarEngineeringObject]:
|
|
39
39
|
if (category == ""):
|
|
40
40
|
return self.artifactDescriptors
|
|
41
41
|
else:
|
|
42
42
|
return list(filter(lambda a: a.getCategory().getText() == category, self.artifactDescriptors))
|
|
43
43
|
|
|
44
|
+
|
|
44
45
|
class Compiler(Identifiable):
|
|
45
46
|
def __init__(self, parent: ARObject, short_name: str):
|
|
46
47
|
super().__init__(parent, short_name)
|
|
@@ -77,7 +78,8 @@ class Compiler(Identifiable):
|
|
|
77
78
|
def setVersion(self, value):
|
|
78
79
|
self.version = value
|
|
79
80
|
return self
|
|
80
|
-
|
|
81
|
+
|
|
82
|
+
|
|
81
83
|
class DependencyOnArtifact(Identifiable):
|
|
82
84
|
def __init__(self, parent: ARObject, short_name: str):
|
|
83
85
|
super().__init__(parent, short_name)
|
|
@@ -101,9 +103,9 @@ class DependencyOnArtifact(Identifiable):
|
|
|
101
103
|
return self
|
|
102
104
|
|
|
103
105
|
|
|
104
|
-
class Implementation(PackageableElement, metaclass
|
|
106
|
+
class Implementation(PackageableElement, metaclass=ABCMeta):
|
|
105
107
|
def __init__(self, parent: ARObject, short_name: str):
|
|
106
|
-
if type(self)
|
|
108
|
+
if type(self) is Implementation:
|
|
107
109
|
raise NotImplementedError("Implementation is an abstract class.")
|
|
108
110
|
|
|
109
111
|
super().__init__(parent, short_name)
|
|
@@ -131,8 +133,8 @@ class Implementation(PackageableElement, metaclass = ABCMeta):
|
|
|
131
133
|
self.buildActionManifestRef = value
|
|
132
134
|
return self
|
|
133
135
|
|
|
134
|
-
def getCodeDescriptors(self)-> List[Code]:
|
|
135
|
-
return list(filter(lambda a
|
|
136
|
+
def getCodeDescriptors(self) -> List[Code]:
|
|
137
|
+
return list(filter(lambda a: isinstance(a, Code), self.elements.values()))
|
|
136
138
|
|
|
137
139
|
def createCodeDescriptor(self, short_name: str) -> Code:
|
|
138
140
|
if (short_name not in self.elements):
|
|
@@ -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)
|
|
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)
|
|
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
|
|
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=
|
|
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
|