armodel 1.7.7__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/cli/arxml_dump_cli.py +33 -22
- armodel/cli/arxml_format_cli.py +25 -13
- armodel/models/M2/AUTOSARTemplates/AutosarTopLevelStructure.py +84 -28
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswBehavior.py +410 -61
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswInterfaces.py +80 -9
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswOverview.py +141 -35
- armodel/models/M2/AUTOSARTemplates/CommonStructure/Implementation.py +10 -8
- armodel/models/M2/AUTOSARTemplates/CommonStructure/InternalBehavior.py +17 -6
- 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 +45 -2
- armodel/models/M2/AUTOSARTemplates/ECUCDescriptionTemplate.py +20 -19
- armodel/models/M2/AUTOSARTemplates/EcuResourceTemplate/HwElementCategory.py +59 -0
- armodel/models/M2/AUTOSARTemplates/EcuResourceTemplate/__init__.py +145 -0
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ARPackage.py +243 -156
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ElementCollection.py +73 -0
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/Identifiable.py +60 -32
- 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 +66 -42
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Composition/__init__.py +1 -0
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/EndToEndProtection.py +13 -6
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/PortInterface/__init__.py +166 -50
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SoftwareComponentDocumentation.py +80 -0
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/AccessCount.py +9 -1
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ModeDeclarationGroup.py +5 -4
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/RTEEvents.py +11 -1
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ServiceMapping.py +16 -2
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/__init__.py +9 -1
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/DataMapping.py +167 -5
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/{ECUResourceMapping.py → EcuResourceMapping.py} +4 -3
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Can/CanTopology.py +31 -21
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Ethernet/EthernetFrame.py +5 -3
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Ethernet/EthernetTopology.py +18 -6
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Flexray/FlexrayCommunication.py +76 -0
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Flexray/FlexrayTopology.py +654 -0
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Flexray/__init__.py +0 -0
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/FibexCore/CoreCommunication.py +64 -31
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/FibexCore/CoreTopology.py +158 -40
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/FibexCore/EcuInstance.py +19 -6
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/InstanceRefs.py +2 -0
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Transformer/__init__.py +524 -0
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/__init__.py +15 -13
- 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 +7 -1
- armodel/parser/abstract_arxml_parser.py +39 -32
- armodel/parser/arxml_parser.py +1439 -551
- armodel/parser/file_parser.py +5 -3
- armodel/tests/test_armodel/models/test_ar_package.py +6 -11
- armodel/tests/test_armodel/models/test_port_interface.py +116 -117
- armodel/tests/test_armodel/parser/test_bsw_module_descriiption.py +109 -109
- armodel/tests/test_armodel/parser/test_sw_components.py +301 -28
- armodel/tests/test_armodel/parser/test_system.py +2 -8
- armodel/transformer/__init__.py +0 -0
- armodel/transformer/abstract.py +6 -0
- armodel/transformer/admin_data.py +31 -0
- armodel/writer/abstract_arxml_writer.py +22 -29
- armodel/writer/arxml_writer.py +1500 -526
- {armodel-1.7.7.dist-info → armodel-1.7.9.dist-info}/METADATA +61 -1
- {armodel-1.7.7.dist-info → armodel-1.7.9.dist-info}/RECORD +73 -57
- {armodel-1.7.7.dist-info → armodel-1.7.9.dist-info}/LICENSE +0 -0
- {armodel-1.7.7.dist-info → armodel-1.7.9.dist-info}/WHEEL +0 -0
- {armodel-1.7.7.dist-info → armodel-1.7.9.dist-info}/entry_points.txt +0 -0
- {armodel-1.7.7.dist-info → armodel-1.7.9.dist-info}/top_level.txt +0 -0
|
@@ -5,17 +5,19 @@ from .....M2.AUTOSARTemplates.CommonStructure import TextValueSpecification
|
|
|
5
5
|
from .....M2.AUTOSARTemplates.CommonStructure.TriggerDeclaration import Trigger
|
|
6
6
|
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import ARElement, Identifiable
|
|
7
7
|
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
8
|
-
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARLiteral, ARNumerical, ArgumentDirectionEnum,
|
|
8
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARLiteral, ARNumerical, ArgumentDirectionEnum, Boolean
|
|
9
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import PositiveInteger
|
|
9
10
|
from .....M2.AUTOSARTemplates.SWComponentTemplate.Datatype.DataPrototypes import ParameterDataPrototype, VariableDataPrototype, AutosarDataPrototype
|
|
10
11
|
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARBoolean
|
|
11
|
-
from .....M2.AUTOSARTemplates.CommonStructure.ModeDeclaration import ModeDeclarationGroupPrototype
|
|
12
|
+
from .....M2.AUTOSARTemplates.CommonStructure.ModeDeclaration import ModeDeclarationGroupPrototype, ModeDeclarationGroupPrototypeMapping
|
|
12
13
|
from .....M2.AUTOSARTemplates.GenericStructure.AbstractStructure import AtpType
|
|
13
14
|
from .....M2.AUTOSARTemplates.GenericStructure.AbstractStructure import AtpFeature
|
|
14
15
|
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import RefType
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
|
|
18
|
+
class PortInterface(AtpType, metaclass=ABCMeta):
|
|
17
19
|
def __init__(self, parent: ARObject, short_name: str):
|
|
18
|
-
if type(self)
|
|
20
|
+
if type(self) is PortInterface:
|
|
19
21
|
raise NotImplementedError("PortInterface is an abstract class.")
|
|
20
22
|
super().__init__(parent, short_name)
|
|
21
23
|
|
|
@@ -36,12 +38,14 @@ class PortInterface(AtpType, metaclass = ABCMeta):
|
|
|
36
38
|
self.serviceKind = value
|
|
37
39
|
return self
|
|
38
40
|
|
|
39
|
-
|
|
41
|
+
|
|
42
|
+
class DataInterface(PortInterface, metaclass=ABCMeta):
|
|
40
43
|
def __init__(self, parent: ARObject, short_name: str):
|
|
41
|
-
if type(self)
|
|
44
|
+
if type(self) is DataInterface:
|
|
42
45
|
raise NotImplementedError("DataInterface is an abstract class.")
|
|
43
46
|
super().__init__(parent, short_name)
|
|
44
47
|
|
|
48
|
+
|
|
45
49
|
class NvDataInterface(DataInterface):
|
|
46
50
|
def __init__(self, parent: ARObject, short_name: str):
|
|
47
51
|
super().__init__(parent, short_name)
|
|
@@ -55,6 +59,7 @@ class NvDataInterface(DataInterface):
|
|
|
55
59
|
self.nvDatas.append(value)
|
|
56
60
|
return self
|
|
57
61
|
|
|
62
|
+
|
|
58
63
|
class ParameterInterface(DataInterface):
|
|
59
64
|
def __init__(self, parent: ARObject, short_name: str):
|
|
60
65
|
super().__init__(parent, short_name)
|
|
@@ -62,15 +67,15 @@ class ParameterInterface(DataInterface):
|
|
|
62
67
|
self.parameters = [] # type: List[ParameterDataPrototype]
|
|
63
68
|
|
|
64
69
|
def getParameters(self):
|
|
65
|
-
return
|
|
70
|
+
return self.parameters
|
|
71
|
+
|
|
72
|
+
def createParameterDataPrototype(self, short_name: str) -> ParameterDataPrototype:
|
|
73
|
+
prototype = ParameterDataPrototype(self, short_name)
|
|
74
|
+
self.addElement(prototype)
|
|
75
|
+
self.parameters.append(prototype)
|
|
76
|
+
return prototype
|
|
77
|
+
|
|
66
78
|
|
|
67
|
-
def createParameter(self, short_name: str) -> ParameterDataPrototype:
|
|
68
|
-
if (short_name not in self.elements):
|
|
69
|
-
parameter = ParameterDataPrototype(self, short_name)
|
|
70
|
-
self.elements[short_name] = parameter
|
|
71
|
-
self.parameters.append(parameter)
|
|
72
|
-
return self.elements[short_name]
|
|
73
|
-
|
|
74
79
|
class InvalidationPolicy(ARObject):
|
|
75
80
|
def __init__(self):
|
|
76
81
|
super().__init__()
|
|
@@ -91,7 +96,8 @@ class InvalidationPolicy(ARObject):
|
|
|
91
96
|
def setHandleInvalid(self, value):
|
|
92
97
|
self.handleInvalid = value
|
|
93
98
|
return self
|
|
94
|
-
|
|
99
|
+
|
|
100
|
+
|
|
95
101
|
class MetaDataItem(ARObject):
|
|
96
102
|
def __init__(self):
|
|
97
103
|
super().__init__()
|
|
@@ -112,7 +118,8 @@ class MetaDataItem(ARObject):
|
|
|
112
118
|
def setMetaDataItemType(self, value):
|
|
113
119
|
self.metaDataItemType = value
|
|
114
120
|
return self
|
|
115
|
-
|
|
121
|
+
|
|
122
|
+
|
|
116
123
|
class MetaDataItemSet(ARObject):
|
|
117
124
|
def __init__(self):
|
|
118
125
|
super().__init__()
|
|
@@ -134,6 +141,7 @@ class MetaDataItemSet(ARObject):
|
|
|
134
141
|
self.metaDataItems.append(value)
|
|
135
142
|
return self
|
|
136
143
|
|
|
144
|
+
|
|
137
145
|
class SenderReceiverInterface(DataInterface):
|
|
138
146
|
def __init__(self, parent: ARObject, short_name: str):
|
|
139
147
|
super().__init__(parent, short_name)
|
|
@@ -167,7 +175,7 @@ class SenderReceiverInterface(DataInterface):
|
|
|
167
175
|
def getDataElement(self, short_name) -> VariableDataPrototype:
|
|
168
176
|
if (short_name in self.elements):
|
|
169
177
|
data_element = self.elements[short_name]
|
|
170
|
-
#if (not isinstance(data_element, VariableDataPrototype)):
|
|
178
|
+
# if (not isinstance(data_element, VariableDataPrototype)):
|
|
171
179
|
# raise IndexError("%s is not data element." % short_name)
|
|
172
180
|
return data_element
|
|
173
181
|
raise IndexError("data element <%s> can not be found." % short_name)
|
|
@@ -180,34 +188,38 @@ class SenderReceiverInterface(DataInterface):
|
|
|
180
188
|
def getInvalidationPolicys(self) -> List[InvalidationPolicy]:
|
|
181
189
|
return list(filter(lambda c: isinstance(c, InvalidationPolicy), self.invalidationPolicies))
|
|
182
190
|
|
|
191
|
+
|
|
183
192
|
class ArgumentDataPrototype(AutosarDataPrototype):
|
|
184
193
|
def __init__(self, parent: ARObject, short_name: str):
|
|
185
194
|
super().__init__(parent, short_name)
|
|
186
195
|
|
|
187
196
|
self.direction = None # type: ArgumentDirectionEnum
|
|
188
|
-
# type: ServerArgumentImplPolicyEnum
|
|
189
|
-
self.serverArgumentImplPolicy = None
|
|
197
|
+
self.serverArgumentImplPolicy = None # type: ServerArgumentImplPolicyEnum
|
|
190
198
|
|
|
191
199
|
def getDirection(self):
|
|
192
200
|
return self.direction
|
|
193
201
|
|
|
194
202
|
def setDirection(self, value):
|
|
195
|
-
|
|
203
|
+
if value is not None:
|
|
204
|
+
self.direction = value
|
|
196
205
|
return self
|
|
197
206
|
|
|
198
207
|
def getServerArgumentImplPolicy(self):
|
|
199
208
|
return self.serverArgumentImplPolicy
|
|
200
209
|
|
|
201
210
|
def setServerArgumentImplPolicy(self, value):
|
|
202
|
-
|
|
211
|
+
if value is not None:
|
|
212
|
+
self.serverArgumentImplPolicy = value
|
|
203
213
|
return self
|
|
204
214
|
|
|
215
|
+
|
|
205
216
|
class ApplicationError(Identifiable):
|
|
206
217
|
def __init__(self, parent: ARObject, short_name: str):
|
|
207
218
|
super().__init__(parent, short_name)
|
|
208
219
|
|
|
209
220
|
self.error_code = None # type: ARNumerical
|
|
210
221
|
|
|
222
|
+
|
|
211
223
|
class ClientServerOperation(AtpFeature):
|
|
212
224
|
"""
|
|
213
225
|
An operation declared within the scope of a client/server interface.
|
|
@@ -233,27 +245,34 @@ class ClientServerOperation(AtpFeature):
|
|
|
233
245
|
def __init__(self, parent: ARObject, short_name: str):
|
|
234
246
|
super().__init__(parent, short_name)
|
|
235
247
|
|
|
236
|
-
self.
|
|
237
|
-
self.
|
|
248
|
+
self.arguments = [] # type: List[ArgumentDataPrototype]
|
|
249
|
+
self.possibleErrorRefs = [] # type: List[RefType]
|
|
238
250
|
|
|
239
|
-
def
|
|
240
|
-
self.
|
|
251
|
+
def getArguments(self):
|
|
252
|
+
return self.arguments
|
|
241
253
|
|
|
242
|
-
def
|
|
243
|
-
|
|
254
|
+
def createArgumentDataPrototype(self, short_name):
|
|
255
|
+
if not self.IsElementExists(short_name):
|
|
256
|
+
prototype = ArgumentDataPrototype(self, short_name)
|
|
257
|
+
self.addElement(prototype)
|
|
258
|
+
self.arguments.append(prototype)
|
|
259
|
+
return self.getElement(short_name)
|
|
244
260
|
|
|
245
|
-
def
|
|
246
|
-
self.
|
|
261
|
+
def getPossibleErrorRefs(self):
|
|
262
|
+
return self.possibleErrorRefs
|
|
247
263
|
|
|
248
|
-
def
|
|
249
|
-
|
|
264
|
+
def addPossibleErrorRef(self, value):
|
|
265
|
+
if value is not None:
|
|
266
|
+
self.possibleErrorRefs.append(value)
|
|
267
|
+
return self
|
|
250
268
|
|
|
251
269
|
|
|
252
270
|
class ClientServerInterface(PortInterface):
|
|
253
271
|
"""
|
|
254
272
|
A client/server interface declares a number of operations that can be invoked on a server by a client.
|
|
255
273
|
Package: M2::AUTOSARTemplates::SWComponentTemplate::PortInterface
|
|
256
|
-
Base: ARElement, ARObject, AtpBlueprint, AtpBlueprintable, AtpClassifier , AtpType, CollectableElement, Identifiable, MultilanguageReferrable,
|
|
274
|
+
Base: ARElement, ARObject, AtpBlueprint, AtpBlueprintable, AtpClassifier , AtpType, CollectableElement, Identifiable, MultilanguageReferrable,
|
|
275
|
+
PackageableElement, PortInterface, Referrable
|
|
257
276
|
|
|
258
277
|
Methods:
|
|
259
278
|
--------
|
|
@@ -283,13 +302,15 @@ class ClientServerInterface(PortInterface):
|
|
|
283
302
|
|
|
284
303
|
def getPossibleErrors(self) -> List[ApplicationError]:
|
|
285
304
|
return list(filter(lambda c: isinstance(c, ApplicationError), self.elements.values()))
|
|
286
|
-
|
|
305
|
+
|
|
306
|
+
|
|
287
307
|
class TriggerInterface(PortInterface):
|
|
288
308
|
def __init__(self, parent: ARObject, short_name: str):
|
|
289
309
|
super().__init__(parent, short_name)
|
|
290
310
|
|
|
291
311
|
self._triggers = [] # type: Trigger
|
|
292
312
|
|
|
313
|
+
|
|
293
314
|
class ModeSwitchInterface(PortInterface):
|
|
294
315
|
def __init__(self, parent: ARObject, short_name: str):
|
|
295
316
|
super().__init__(parent, short_name)
|
|
@@ -303,14 +324,16 @@ class ModeSwitchInterface(PortInterface):
|
|
|
303
324
|
return self.elements[short_name]
|
|
304
325
|
|
|
305
326
|
def getModeGroups(self) -> List[ModeDeclarationGroupPrototype]:
|
|
306
|
-
return list(sorted(filter(lambda c: isinstance(c, ModeDeclarationGroupPrototype), self.elements.values()), key=
|
|
327
|
+
return list(sorted(filter(lambda c: isinstance(c, ModeDeclarationGroupPrototype), self.elements.values()), key=lambda o: o.short_name))
|
|
307
328
|
|
|
308
|
-
|
|
329
|
+
|
|
330
|
+
class PortInterfaceMapping(Identifiable, metaclass=ABCMeta):
|
|
309
331
|
def __init__(self, parent: ARObject, short_name: str):
|
|
310
|
-
if type(self)
|
|
332
|
+
if type(self) is PortInterfaceMapping:
|
|
311
333
|
raise NotImplementedError("PortInterfaceMapping is an abstract class.")
|
|
312
334
|
super().__init__(parent, short_name)
|
|
313
335
|
|
|
336
|
+
|
|
314
337
|
class ClientServerApplicationErrorMapping(ARObject):
|
|
315
338
|
def __init__(self):
|
|
316
339
|
super().__init__()
|
|
@@ -331,11 +354,11 @@ class ClientServerApplicationErrorMapping(ARObject):
|
|
|
331
354
|
def setSecondApplicationErrorRef(self, value):
|
|
332
355
|
self.secondApplicationErrorRef = value
|
|
333
356
|
return self
|
|
334
|
-
|
|
357
|
+
|
|
358
|
+
|
|
335
359
|
class ClientServerOperationMapping(ARObject):
|
|
336
360
|
def __init__(self):
|
|
337
361
|
super().__init__()
|
|
338
|
-
|
|
339
362
|
|
|
340
363
|
self.argumentMappings = [] # type: List[DataPrototypeMapping]
|
|
341
364
|
self.firstOperationRef = None # type: RefType
|
|
@@ -425,28 +448,27 @@ class DataPrototypeMapping(ARObject):
|
|
|
425
448
|
return self
|
|
426
449
|
|
|
427
450
|
|
|
428
|
-
|
|
429
451
|
class ClientServerInterfaceMapping(PortInterfaceMapping):
|
|
430
452
|
def __init__(self, parent: ARObject, short_name: str):
|
|
431
453
|
super().__init__(parent, short_name)
|
|
432
454
|
|
|
433
|
-
# type: ClientServerApplicationErrorMapping
|
|
434
|
-
self.
|
|
435
|
-
# type: ClientServerOperationMapping
|
|
436
|
-
self.operationMappings = []
|
|
455
|
+
self.errorMappings = [] # type: List[ClientServerApplicationErrorMapping]
|
|
456
|
+
self.operationMappings = [] # type: List[ClientServerOperationMapping]
|
|
437
457
|
|
|
438
458
|
def getErrorMappings(self):
|
|
439
459
|
return self.errorMappings
|
|
440
460
|
|
|
441
|
-
def
|
|
442
|
-
|
|
461
|
+
def addErrorMapping(self, value):
|
|
462
|
+
if value is not None:
|
|
463
|
+
self.errorMappings.append(value)
|
|
443
464
|
return self
|
|
444
465
|
|
|
445
466
|
def getOperationMappings(self):
|
|
446
467
|
return self.operationMappings
|
|
447
468
|
|
|
448
|
-
def
|
|
449
|
-
|
|
469
|
+
def addOperationMapping(self, value):
|
|
470
|
+
if value is not None:
|
|
471
|
+
self.operationMappings.append(value)
|
|
450
472
|
return self
|
|
451
473
|
|
|
452
474
|
|
|
@@ -463,7 +485,29 @@ class VariableAndParameterInterfaceMapping(PortInterfaceMapping):
|
|
|
463
485
|
self.dataMappings.append(value)
|
|
464
486
|
return self
|
|
465
487
|
|
|
466
|
-
|
|
488
|
+
|
|
489
|
+
class ModeInterfaceMapping(PortInterfaceMapping):
|
|
490
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
491
|
+
super().__init__(parent, short_name)
|
|
492
|
+
|
|
493
|
+
self.modeMapping = None # type: ModeDeclarationGroupPrototypeMapping
|
|
494
|
+
|
|
495
|
+
def getModeMapping(self):
|
|
496
|
+
return self.modeMapping
|
|
497
|
+
|
|
498
|
+
def setModeMapping(self, value):
|
|
499
|
+
if value is not None:
|
|
500
|
+
self.modeMapping = value
|
|
501
|
+
return self
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
class TriggerInterfaceMapping(PortInterfaceMapping):
|
|
505
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
506
|
+
super().__init__(parent, short_name)
|
|
507
|
+
|
|
508
|
+
self.triggerMapping = [] # type: List[TriggerMapping]
|
|
509
|
+
|
|
510
|
+
|
|
467
511
|
class PortInterfaceMappingSet(ARElement):
|
|
468
512
|
def __init__(self, parent: ARObject, short_name: str):
|
|
469
513
|
super().__init__(parent, short_name)
|
|
@@ -473,9 +517,81 @@ class PortInterfaceMappingSet(ARElement):
|
|
|
473
517
|
def getPortInterfaceMappings(self):
|
|
474
518
|
return self.portInterfaceMappings
|
|
475
519
|
|
|
476
|
-
def createVariableAndParameterInterfaceMapping(self, short_name):
|
|
477
|
-
if (
|
|
520
|
+
def createVariableAndParameterInterfaceMapping(self, short_name: str):
|
|
521
|
+
if (not self.IsElementExists(short_name)):
|
|
478
522
|
mapping = VariableAndParameterInterfaceMapping(self, short_name)
|
|
479
523
|
self.addElement(mapping)
|
|
480
524
|
self.portInterfaceMappings.append(mapping)
|
|
481
525
|
return self.getElement(short_name)
|
|
526
|
+
|
|
527
|
+
def createClientServerInterfaceMapping(self, short_name: str):
|
|
528
|
+
if (not self.IsElementExists(short_name)):
|
|
529
|
+
mapping = ClientServerInterfaceMapping(self, short_name)
|
|
530
|
+
self.addElement(mapping)
|
|
531
|
+
self.portInterfaceMappings.append(mapping)
|
|
532
|
+
return self.getElement(short_name)
|
|
533
|
+
|
|
534
|
+
def createModeInterfaceMapping(self, short_name: str):
|
|
535
|
+
if (not self.IsElementExists(short_name)):
|
|
536
|
+
mapping = ModeInterfaceMapping(self, short_name)
|
|
537
|
+
self.addElement(mapping)
|
|
538
|
+
self.portInterfaceMappings.append(mapping)
|
|
539
|
+
return self.getElement(short_name)
|
|
540
|
+
|
|
541
|
+
def createTriggerInterfaceMapping(self, short_name: str):
|
|
542
|
+
if (not self.IsElementExists(short_name)):
|
|
543
|
+
mapping = TriggerInterfaceMapping(self, short_name)
|
|
544
|
+
self.addElement(mapping)
|
|
545
|
+
self.portInterfaceMappings.append(mapping)
|
|
546
|
+
return self.getElement(short_name)
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
class TextTableMapping(ARObject):
|
|
550
|
+
def __init__(self):
|
|
551
|
+
super().__init__()
|
|
552
|
+
|
|
553
|
+
self.bitfieldTextTableMaskFirst = None # type: PositiveInteger
|
|
554
|
+
self.bitfieldTextTableMaskSecond = None # type: PositiveInteger
|
|
555
|
+
self.identicalMapping = None # type: Boolean
|
|
556
|
+
self.mappingDirection = None # type: MappingDirectionEnum
|
|
557
|
+
self.valuePairs = [] # type: List[TextTableValuePair]
|
|
558
|
+
|
|
559
|
+
def getBitfieldTextTableMaskFirst(self):
|
|
560
|
+
return self.bitfieldTextTableMaskFirst
|
|
561
|
+
|
|
562
|
+
def setBitfieldTextTableMaskFirst(self, value):
|
|
563
|
+
if value is not None:
|
|
564
|
+
self.bitfieldTextTableMaskFirst = value
|
|
565
|
+
return self
|
|
566
|
+
|
|
567
|
+
def getBitfieldTextTableMaskSecond(self):
|
|
568
|
+
return self.bitfieldTextTableMaskSecond
|
|
569
|
+
|
|
570
|
+
def setBitfieldTextTableMaskSecond(self, value):
|
|
571
|
+
if value is not None:
|
|
572
|
+
self.bitfieldTextTableMaskSecond = value
|
|
573
|
+
return self
|
|
574
|
+
|
|
575
|
+
def getIdenticalMapping(self):
|
|
576
|
+
return self.identicalMapping
|
|
577
|
+
|
|
578
|
+
def setIdenticalMapping(self, value):
|
|
579
|
+
if value is not None:
|
|
580
|
+
self.identicalMapping = value
|
|
581
|
+
return self
|
|
582
|
+
|
|
583
|
+
def getMappingDirection(self):
|
|
584
|
+
return self.mappingDirection
|
|
585
|
+
|
|
586
|
+
def setMappingDirection(self, value):
|
|
587
|
+
if value is not None:
|
|
588
|
+
self.mappingDirection = value
|
|
589
|
+
return self
|
|
590
|
+
|
|
591
|
+
def getValuePairs(self):
|
|
592
|
+
return self.valuePairs
|
|
593
|
+
|
|
594
|
+
def setValuePairs(self, value):
|
|
595
|
+
if value is not None:
|
|
596
|
+
self.valuePairs = value
|
|
597
|
+
return self
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
from typing import List
|
|
2
|
+
from .....models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class SwComponentDocumentation(ARObject):
|
|
6
|
+
def __init__(self):
|
|
7
|
+
super().__init__()
|
|
8
|
+
|
|
9
|
+
self.chapters = [] # type: List[Chapter]
|
|
10
|
+
self.swCalibrationNotes = None # type: Chapter
|
|
11
|
+
self.swCarbDoc = None # type: Chapter
|
|
12
|
+
self.swDiagnosticsNotes = None # type: Chapter
|
|
13
|
+
self.swFeatureDef = None # type: Chapter
|
|
14
|
+
self.swFeatureDesc = None # type: Chapter
|
|
15
|
+
self.swMaintenanceNotes = None # type: Chapter
|
|
16
|
+
self.swTestDesc = None # type: sChapter
|
|
17
|
+
|
|
18
|
+
def getChapters(self):
|
|
19
|
+
return self.chapters
|
|
20
|
+
|
|
21
|
+
def addChapter(self, value):
|
|
22
|
+
if value is not None:
|
|
23
|
+
self.chapters.append(value)
|
|
24
|
+
return self
|
|
25
|
+
|
|
26
|
+
def getSwCalibrationNotes(self):
|
|
27
|
+
return self.swCalibrationNotes
|
|
28
|
+
|
|
29
|
+
def setSwCalibrationNotes(self, value):
|
|
30
|
+
if value is not None:
|
|
31
|
+
self.swCalibrationNotes = value
|
|
32
|
+
return self
|
|
33
|
+
|
|
34
|
+
def getSwCarbDoc(self):
|
|
35
|
+
return self.swCarbDoc
|
|
36
|
+
|
|
37
|
+
def setSwCarbDoc(self, value):
|
|
38
|
+
if value is not None:
|
|
39
|
+
self.swCarbDoc = value
|
|
40
|
+
return self
|
|
41
|
+
|
|
42
|
+
def getSwDiagnosticsNotes(self):
|
|
43
|
+
return self.swDiagnosticsNotes
|
|
44
|
+
|
|
45
|
+
def setSwDiagnosticsNotes(self, value):
|
|
46
|
+
if value is not None:
|
|
47
|
+
self.swDiagnosticsNotes = value
|
|
48
|
+
return self
|
|
49
|
+
|
|
50
|
+
def getSwFeatureDef(self):
|
|
51
|
+
return self.swFeatureDef
|
|
52
|
+
|
|
53
|
+
def setSwFeatureDef(self, value):
|
|
54
|
+
if value is not None:
|
|
55
|
+
self.swFeatureDef = value
|
|
56
|
+
return self
|
|
57
|
+
|
|
58
|
+
def getSwFeatureDesc(self):
|
|
59
|
+
return self.swFeatureDesc
|
|
60
|
+
|
|
61
|
+
def setSwFeatureDesc(self, value):
|
|
62
|
+
if value is not None:
|
|
63
|
+
self.swFeatureDesc = value
|
|
64
|
+
return self
|
|
65
|
+
|
|
66
|
+
def getSwMaintenanceNotes(self):
|
|
67
|
+
return self.swMaintenanceNotes
|
|
68
|
+
|
|
69
|
+
def setSwMaintenanceNotes(self, value):
|
|
70
|
+
if value is not None:
|
|
71
|
+
self.swMaintenanceNotes = value
|
|
72
|
+
return self
|
|
73
|
+
|
|
74
|
+
def getSwTestDesc(self):
|
|
75
|
+
return self.swTestDesc
|
|
76
|
+
|
|
77
|
+
def setSwTestDesc(self, value):
|
|
78
|
+
if value is not None:
|
|
79
|
+
self.swTestDesc = value
|
|
80
|
+
return self
|
|
@@ -10,4 +10,12 @@ class AbstractAccessPoint(Identifiable, metaclass = ABCMeta):
|
|
|
10
10
|
|
|
11
11
|
super().__init__(parent, short_name)
|
|
12
12
|
|
|
13
|
-
self.
|
|
13
|
+
self.returnValueProvision = None # type: RteApiReturnValueProvisionEnum
|
|
14
|
+
|
|
15
|
+
def getReturnValueProvision(self):
|
|
16
|
+
return self.returnValueProvision
|
|
17
|
+
|
|
18
|
+
def setReturnValueProvision(self, value):
|
|
19
|
+
if value is not None:
|
|
20
|
+
self.returnValueProvision = value
|
|
21
|
+
return self
|
armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ModeDeclarationGroup.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
from armodel.models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARLiteral, RefType
|
|
2
1
|
from typing import List
|
|
2
|
+
|
|
3
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARLiteral, Identifier, RefType
|
|
3
4
|
from .....M2.AUTOSARTemplates.SWComponentTemplate.RPTScenario import ModeAccessPointIdent
|
|
4
5
|
from .....M2.AUTOSARTemplates.SWComponentTemplate.Components.InstanceRefs import PModeGroupInAtomicSwcInstanceRef, RModeGroupInAtomicSWCInstanceRef
|
|
5
6
|
from .....M2.AUTOSARTemplates.SWComponentTemplate.SwcInternalBehavior.AccessCount import AbstractAccessPoint
|
|
@@ -30,7 +31,7 @@ class ModeSwitchPoint(AbstractAccessPoint):
|
|
|
30
31
|
def __init__(self, parent: ARObject, short_name: str):
|
|
31
32
|
super().__init__(parent, short_name)
|
|
32
33
|
|
|
33
|
-
self.modeGroupIRef = None
|
|
34
|
+
self.modeGroupIRef = None # type: PModeGroupInAtomicSwcInstanceRef
|
|
34
35
|
|
|
35
36
|
def getModeGroupIRef(self):
|
|
36
37
|
return self.modeGroupIRef
|
|
@@ -44,8 +45,8 @@ class IncludedModeDeclarationGroupSet(ARObject):
|
|
|
44
45
|
def __init__(self):
|
|
45
46
|
super().__init__()
|
|
46
47
|
|
|
47
|
-
self.mode_declaration_group_refs = []
|
|
48
|
-
self.prefix = None
|
|
48
|
+
self.mode_declaration_group_refs = [] # type: List[RefType]
|
|
49
|
+
self.prefix = None # type: Identifier
|
|
49
50
|
|
|
50
51
|
def addModeDeclarationGroupRef(self, ref: RefType):
|
|
51
52
|
self.mode_declaration_group_refs.append(ref)
|
|
@@ -5,6 +5,7 @@ from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject i
|
|
|
5
5
|
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import RefType, TimeValue
|
|
6
6
|
from typing import List
|
|
7
7
|
|
|
8
|
+
|
|
8
9
|
class RTEEvent(AbstractEvent):
|
|
9
10
|
def __init__(self, parent: ARObject, short_name: str):
|
|
10
11
|
super().__init__(parent, short_name)
|
|
@@ -26,6 +27,7 @@ class RTEEvent(AbstractEvent):
|
|
|
26
27
|
self.startOnEventRef = value
|
|
27
28
|
return self
|
|
28
29
|
|
|
30
|
+
|
|
29
31
|
class AsynchronousServerCallReturnsEvent(RTEEvent):
|
|
30
32
|
def __init__(self, parent: ARObject, short_name: str):
|
|
31
33
|
super().__init__(parent, short_name)
|
|
@@ -53,6 +55,7 @@ class DataSendCompletedEvent(RTEEvent):
|
|
|
53
55
|
self.eventSourceRef = value
|
|
54
56
|
return self
|
|
55
57
|
|
|
58
|
+
|
|
56
59
|
class DataWriteCompletedEvent(RTEEvent):
|
|
57
60
|
def __init__(self, parent: ARObject, short_name: str):
|
|
58
61
|
super().__init__(parent, short_name)
|
|
@@ -66,6 +69,7 @@ class DataWriteCompletedEvent(RTEEvent):
|
|
|
66
69
|
self.eventSourceRef = value
|
|
67
70
|
return self
|
|
68
71
|
|
|
72
|
+
|
|
69
73
|
class DataReceivedEvent(RTEEvent):
|
|
70
74
|
def __init__(self, parent: ARObject, short_name: str):
|
|
71
75
|
super().__init__(parent, short_name)
|
|
@@ -101,11 +105,12 @@ class SwcModeSwitchEvent(RTEEvent):
|
|
|
101
105
|
self.modeIRefs.append(value)
|
|
102
106
|
return self
|
|
103
107
|
|
|
108
|
+
|
|
104
109
|
class DataReceiveErrorEvent(RTEEvent):
|
|
105
110
|
def __init__(self, parent: ARObject, short_name: str):
|
|
106
111
|
super().__init__(parent, short_name)
|
|
107
112
|
|
|
108
|
-
self.dataIRef = None
|
|
113
|
+
self.dataIRef = None
|
|
109
114
|
|
|
110
115
|
def getDataIRef(self):
|
|
111
116
|
return self.dataIRef
|
|
@@ -114,6 +119,7 @@ class DataReceiveErrorEvent(RTEEvent):
|
|
|
114
119
|
self.dataIRef = value
|
|
115
120
|
return self
|
|
116
121
|
|
|
122
|
+
|
|
117
123
|
class OperationInvokedEvent(RTEEvent):
|
|
118
124
|
def __init__(self, parent: ARObject, short_name: str):
|
|
119
125
|
super().__init__(parent, short_name)
|
|
@@ -128,6 +134,7 @@ class OperationInvokedEvent(RTEEvent):
|
|
|
128
134
|
self.operationIRef = value
|
|
129
135
|
return self
|
|
130
136
|
|
|
137
|
+
|
|
131
138
|
class InitEvent(RTEEvent):
|
|
132
139
|
def __init__(self, parent: ARObject, short_name: str):
|
|
133
140
|
super().__init__(parent, short_name)
|
|
@@ -163,6 +170,7 @@ class TimingEvent(RTEEvent):
|
|
|
163
170
|
self.period = value
|
|
164
171
|
return self
|
|
165
172
|
|
|
173
|
+
|
|
166
174
|
class InternalTriggerOccurredEvent(RTEEvent):
|
|
167
175
|
def __init__(self, parent: ARObject, short_name: str):
|
|
168
176
|
super().__init__(parent, short_name)
|
|
@@ -177,10 +185,12 @@ class InternalTriggerOccurredEvent(RTEEvent):
|
|
|
177
185
|
self.eventSourceRef = value
|
|
178
186
|
return self
|
|
179
187
|
|
|
188
|
+
|
|
180
189
|
class BackgroundEvent(RTEEvent):
|
|
181
190
|
def __init__(self, parent: ARObject, short_name: str):
|
|
182
191
|
super().__init__(parent, short_name)
|
|
183
192
|
|
|
193
|
+
|
|
184
194
|
class ModeSwitchedAckEvent(RTEEvent):
|
|
185
195
|
def __init__(self, parent: ARObject, short_name: str):
|
|
186
196
|
super().__init__(parent, short_name)
|
armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ServiceMapping.py
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
from typing import List
|
|
2
|
-
from .....M2.AUTOSARTemplates.CommonStructure.ServiceNeeds import CryptoServiceNeeds, DiagnosticCommunicationManagerNeeds, DiagnosticEventInfoNeeds
|
|
2
|
+
from .....M2.AUTOSARTemplates.CommonStructure.ServiceNeeds import CryptoServiceNeeds, DiagnosticCommunicationManagerNeeds, DiagnosticEventInfoNeeds
|
|
3
|
+
from .....M2.AUTOSARTemplates.CommonStructure.ServiceNeeds import DiagnosticEventNeeds, DiagnosticRoutineNeeds, DiagnosticValueNeeds
|
|
4
|
+
from .....M2.AUTOSARTemplates.CommonStructure.ServiceNeeds import DtcStatusChangeNotificationNeeds, EcuStateMgrUserNeeds, NvBlockNeeds
|
|
5
|
+
from .....M2.AUTOSARTemplates.CommonStructure.ServiceNeeds import RoleBasedDataAssignment, ServiceNeeds, ServiceDependency
|
|
3
6
|
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
4
7
|
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import Identifier, RefType
|
|
5
|
-
|
|
8
|
+
|
|
9
|
+
|
|
6
10
|
class RoleBasedPortAssignment(ARObject):
|
|
7
11
|
def __init__(self):
|
|
8
12
|
super().__init__()
|
|
@@ -24,6 +28,7 @@ class RoleBasedPortAssignment(ARObject):
|
|
|
24
28
|
self.role = value
|
|
25
29
|
return self
|
|
26
30
|
|
|
31
|
+
|
|
27
32
|
class SwcServiceDependency(ServiceDependency):
|
|
28
33
|
def __init__(self, parent: ARObject, short_name: str):
|
|
29
34
|
super().__init__(parent, short_name)
|
|
@@ -91,6 +96,12 @@ class SwcServiceDependency(ServiceDependency):
|
|
|
91
96
|
self.addElement(needs)
|
|
92
97
|
return self.getElement(short_name)
|
|
93
98
|
|
|
99
|
+
def createDtcStatusChangeNotificationNeeds(self, short_name: str) -> DtcStatusChangeNotificationNeeds:
|
|
100
|
+
if (short_name not in self.elements):
|
|
101
|
+
needs = DtcStatusChangeNotificationNeeds(self, short_name)
|
|
102
|
+
self.addElement(needs)
|
|
103
|
+
return self.getElement(short_name)
|
|
104
|
+
|
|
94
105
|
def getNvBlockNeeds(self) -> List[NvBlockNeeds]:
|
|
95
106
|
return sorted(filter(lambda c: isinstance(c, NvBlockNeeds), self.elements.values()), key=lambda e: e.short_name)
|
|
96
107
|
|
|
@@ -108,6 +119,9 @@ class SwcServiceDependency(ServiceDependency):
|
|
|
108
119
|
|
|
109
120
|
def getEcuStateMgrUserNeeds(self) -> List[EcuStateMgrUserNeeds]:
|
|
110
121
|
return sorted(filter(lambda c: isinstance(c, EcuStateMgrUserNeeds), self.elements.values()), key=lambda e: e.short_name)
|
|
122
|
+
|
|
123
|
+
def getDtcStatusChangeNotificationNeeds(self) -> List[DtcStatusChangeNotificationNeeds]:
|
|
124
|
+
return sorted(filter(lambda c: isinstance(c, DtcStatusChangeNotificationNeeds), self.elements.values()), key=lambda e: e.short_name)
|
|
111
125
|
|
|
112
126
|
def getServiceNeeds(self) -> List[ServiceNeeds]:
|
|
113
127
|
return sorted(filter(lambda c: isinstance(c, ServiceNeeds), self.elements.values()), key=lambda e: e.short_name)
|
|
@@ -11,7 +11,7 @@ from .....M2.AUTOSARTemplates.SWComponentTemplate.SwcInternalBehavior.ServiceMap
|
|
|
11
11
|
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARLiteral, Boolean, RefType, ARBoolean
|
|
12
12
|
from .....M2.AUTOSARTemplates.SWComponentTemplate.SwcInternalBehavior.DataElements import ParameterAccess, VariableAccess
|
|
13
13
|
from .....M2.AUTOSARTemplates.SWComponentTemplate.SwcInternalBehavior.ServerCall import ServerCallPoint
|
|
14
|
-
from .....M2.AUTOSARTemplates.SWComponentTemplate.SwcInternalBehavior.ModeDeclarationGroup import ModeAccessPoint, ModeSwitchPoint
|
|
14
|
+
from .....M2.AUTOSARTemplates.SWComponentTemplate.SwcInternalBehavior.ModeDeclarationGroup import IncludedModeDeclarationGroupSet, ModeAccessPoint, ModeSwitchPoint
|
|
15
15
|
from .....M2.AUTOSARTemplates.SWComponentTemplate.SwcInternalBehavior.Trigger import InternalTriggeringPoint
|
|
16
16
|
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
17
17
|
from .....M2.AUTOSARTemplates.CommonStructure.InternalBehavior import ExecutableEntity
|
|
@@ -290,6 +290,14 @@ class SwcInternalBehavior(InternalBehavior):
|
|
|
290
290
|
|
|
291
291
|
def getIncludedDataTypeSets(self) -> List[IncludedDataTypeSet]:
|
|
292
292
|
return self.includedDataTypeSets
|
|
293
|
+
|
|
294
|
+
def getIncludedModeDeclarationGroupSets(self):
|
|
295
|
+
return self.includedModeDeclarationGroupSets
|
|
296
|
+
|
|
297
|
+
def addIncludedModeDeclarationGroupSet(self, value):
|
|
298
|
+
if value is not None:
|
|
299
|
+
self.includedModeDeclarationGroupSets.append(value)
|
|
300
|
+
return self
|
|
293
301
|
|
|
294
302
|
def createOperationInvokedEvent(self, short_name: str) -> OperationInvokedEvent:
|
|
295
303
|
if (short_name not in self.elements):
|