armodel 1.7.1__py3-none-any.whl → 1.7.3__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 +3 -3
- armodel/models/M2/AUTOSARTemplates/AutosarTopLevelStructure.py +3 -3
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswBehavior.py +81 -36
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswInterfaces.py +104 -30
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswOverview.py +12 -16
- armodel/models/M2/AUTOSARTemplates/CommonStructure/FlatMap.py +70 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/Implementation.py +12 -9
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ImplementationDataTypes.py +22 -11
- armodel/models/M2/AUTOSARTemplates/CommonStructure/InternalBehavior.py +29 -22
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ModeDeclaration.py +26 -9
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ResourceConsumption/HardwareConfiguration.py +33 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ResourceConsumption/HeapUsage.py +10 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ResourceConsumption/MemorySectionUsage.py +8 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ResourceConsumption/SoftwareContext.py +23 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ResourceConsumption/StackUsage.py +93 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ResourceConsumption/__init__.py +39 -5
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ServiceNeeds.py +735 -27
- armodel/models/M2/AUTOSARTemplates/CommonStructure/SwcBswMapping.py +48 -6
- armodel/models/M2/AUTOSARTemplates/GenericStructure/AbstractStructure.py +5 -5
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ARPackage.py +20 -3
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/Identifiable.py +3 -0
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/PrimitiveTypes.py +55 -1
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Communication.py +41 -3
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Components/__init__.py +53 -15
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Composition/__init__.py +8 -0
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Datatype/Datatypes.py +23 -8
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/PortInterface/__init__.py +239 -5
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ServiceMapping.py +56 -6
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/__init__.py +91 -55
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/DataMapping.py +10 -1
- armodel/models/M2/MSR/AsamHdo/ComputationMethod.py +186 -24
- armodel/models/M2/MSR/CalibrationData/CalibrationValue.py +34 -3
- armodel/models/M2/MSR/DataDictionary/AuxillaryObjects.py +4 -4
- armodel/models/M2/MSR/DataDictionary/DataDefProperties.py +7 -0
- armodel/models/M2/MSR/DataDictionary/RecordLayout.py +130 -37
- armodel/models/M2/MSR/DataDictionary/ServiceProcessTask.py +33 -0
- armodel/models/__init__.py +4 -0
- armodel/parser/abstract_arxml_parser.py +30 -27
- armodel/parser/arxml_parser.py +683 -371
- armodel/tests/test_armodel/models/test_ar_object.py +6 -2
- armodel/tests/test_armodel/models/test_datatype.py +4 -4
- armodel/tests/test_armodel/models/test_m2_msr.py +5 -5
- armodel/tests/test_armodel/models/test_port_interface.py +4 -4
- armodel/tests/test_armodel/parser/test_parse_bswmd.py +48 -48
- armodel/tests/test_armodel/parser/test_sw_components.py +1 -1
- armodel/tests/test_armodel/parser/test_system.py +0 -1
- armodel/writer/abstract_arxml_writer.py +10 -0
- armodel/writer/arxml_writer.py +668 -358
- {armodel-1.7.1.dist-info → armodel-1.7.3.dist-info}/METADATA +34 -1
- {armodel-1.7.1.dist-info → armodel-1.7.3.dist-info}/RECORD +54 -48
- {armodel-1.7.1.dist-info → armodel-1.7.3.dist-info}/LICENSE +0 -0
- {armodel-1.7.1.dist-info → armodel-1.7.3.dist-info}/WHEEL +0 -0
- {armodel-1.7.1.dist-info → armodel-1.7.3.dist-info}/entry_points.txt +0 -0
- {armodel-1.7.1.dist-info → armodel-1.7.3.dist-info}/top_level.txt +0 -0
|
@@ -14,22 +14,64 @@ class SwcBswRunnableMapping(ARObject):
|
|
|
14
14
|
'''
|
|
15
15
|
super().__init__()
|
|
16
16
|
|
|
17
|
-
self.bswEntityRef
|
|
17
|
+
self.bswEntityRef = None # type: RefType
|
|
18
18
|
self.swcRunnableRef = None # type: RefType
|
|
19
19
|
|
|
20
|
+
def getBswEntityRef(self):
|
|
21
|
+
return self.bswEntityRef
|
|
22
|
+
|
|
23
|
+
def setBswEntityRef(self, value):
|
|
24
|
+
self.bswEntityRef = value
|
|
25
|
+
return self
|
|
26
|
+
|
|
27
|
+
def getSwcRunnableRef(self):
|
|
28
|
+
return self.swcRunnableRef
|
|
29
|
+
|
|
30
|
+
def setSwcRunnableRef(self, value):
|
|
31
|
+
self.swcRunnableRef = value
|
|
32
|
+
return self
|
|
20
33
|
|
|
21
34
|
class SwcBswMapping(Identifiable):
|
|
22
35
|
def __init__(self, parent: ARObject, short_name: str):
|
|
23
36
|
super().__init__(parent, short_name)
|
|
24
37
|
|
|
25
38
|
self.bswBehaviorRef = None # type: RefType
|
|
26
|
-
self.
|
|
39
|
+
self.runnableMappings = [] # type: List[SwcBswRunnableMapping]
|
|
27
40
|
self.swcBehaviorRef = None # type: RefType
|
|
28
41
|
self.synchronizedModeGroups = []
|
|
29
42
|
self.synchronizedTriggers = []
|
|
30
43
|
|
|
31
|
-
def
|
|
32
|
-
self.
|
|
44
|
+
def getBswBehaviorRef(self):
|
|
45
|
+
return self.bswBehaviorRef
|
|
46
|
+
|
|
47
|
+
def setBswBehaviorRef(self, value):
|
|
48
|
+
self.bswBehaviorRef = value
|
|
49
|
+
return self
|
|
50
|
+
|
|
51
|
+
def getRunnableMappings(self):
|
|
52
|
+
return self.runnableMappings
|
|
53
|
+
|
|
54
|
+
def addRunnableMapping(self, value):
|
|
55
|
+
self.runnableMappings.append(value)
|
|
56
|
+
return self
|
|
57
|
+
|
|
58
|
+
def getSwcBehaviorRef(self):
|
|
59
|
+
return self.swcBehaviorRef
|
|
60
|
+
|
|
61
|
+
def setSwcBehaviorRef(self, value):
|
|
62
|
+
self.swcBehaviorRef = value
|
|
63
|
+
return self
|
|
64
|
+
|
|
65
|
+
def getSynchronizedModeGroups(self):
|
|
66
|
+
return self.synchronizedModeGroups
|
|
67
|
+
|
|
68
|
+
def setSynchronizedModeGroups(self, value):
|
|
69
|
+
self.synchronizedModeGroups = value
|
|
70
|
+
return self
|
|
71
|
+
|
|
72
|
+
def getSynchronizedTriggers(self):
|
|
73
|
+
return self.synchronizedTriggers
|
|
33
74
|
|
|
34
|
-
def
|
|
35
|
-
|
|
75
|
+
def setSynchronizedTriggers(self, value):
|
|
76
|
+
self.synchronizedTriggers = value
|
|
77
|
+
return self
|
|
@@ -42,7 +42,7 @@ class AnyInstanceRef(ARObject):
|
|
|
42
42
|
super().__init__()
|
|
43
43
|
|
|
44
44
|
self.baseRef = None # type: RefType
|
|
45
|
-
self.
|
|
45
|
+
self.contextElementRefs = [] # type: List[RefType]
|
|
46
46
|
self.targetRef = None # type: RefType
|
|
47
47
|
|
|
48
48
|
def getBaseRef(self) -> RefType:
|
|
@@ -52,11 +52,11 @@ class AnyInstanceRef(ARObject):
|
|
|
52
52
|
self.baseRef = value
|
|
53
53
|
return self
|
|
54
54
|
|
|
55
|
-
def
|
|
56
|
-
return self.
|
|
55
|
+
def getContextElementRefs(self) -> List[RefType]:
|
|
56
|
+
return self.contextElementRefs
|
|
57
57
|
|
|
58
|
-
def
|
|
59
|
-
self.
|
|
58
|
+
def addContextElementRef(self, value: RefType):
|
|
59
|
+
self.contextElementRefs.append(value)
|
|
60
60
|
return self
|
|
61
61
|
|
|
62
62
|
def getTargetRef(self) -> RefType:
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
from typing import Dict, List
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
3
|
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import Boolean, Identifier, RefType, ReferrableSubtypesEnum
|
|
6
4
|
from .....M2.AUTOSARTemplates.SystemTemplate.Fibex.FibexCore.EcuInstance import EcuInstance
|
|
7
5
|
from .....M2.AUTOSARTemplates.CommonStructure.Timing.TimingConstraint.TimingExtensions import SwcTiming
|
|
@@ -16,6 +14,7 @@ from .....M2.MSR.DataDictionary.RecordLayout import SwRecordLayout
|
|
|
16
14
|
from .....M2.AUTOSARTemplates.BswModuleTemplate.BswOverview import BswModuleDescription
|
|
17
15
|
from .....M2.AUTOSARTemplates.BswModuleTemplate.BswInterfaces import BswModuleEntry
|
|
18
16
|
from .....M2.AUTOSARTemplates.CommonStructure.Implementation import Implementation
|
|
17
|
+
from .....M2.AUTOSARTemplates.CommonStructure.FlatMap import FlatMap
|
|
19
18
|
from .....M2.AUTOSARTemplates.BswModuleTemplate.BswImplementation import BswImplementation
|
|
20
19
|
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
21
20
|
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import CollectableElement, Identifiable, Referrable
|
|
@@ -34,7 +33,7 @@ from .....M2.AUTOSARTemplates.SWComponentTemplate.SwcImplementation import SwcIm
|
|
|
34
33
|
from .....M2.AUTOSARTemplates.CommonStructure import ConstantSpecification
|
|
35
34
|
from .....M2.AUTOSARTemplates.CommonStructure.ImplementationDataTypes import ImplementationDataType
|
|
36
35
|
from .....M2.AUTOSARTemplates.ECUCDescriptionTemplate import EcucModuleConfigurationValues, EcucValueCollection
|
|
37
|
-
from .....M2.AUTOSARTemplates.SWComponentTemplate.PortInterface import ClientServerInterface, ModeSwitchInterface, ParameterInterface, SenderReceiverInterface, TriggerInterface
|
|
36
|
+
from .....M2.AUTOSARTemplates.SWComponentTemplate.PortInterface import ClientServerInterface, ModeSwitchInterface, ParameterInterface, PortInterfaceMappingSet, SenderReceiverInterface, TriggerInterface
|
|
38
37
|
from .....M2.AUTOSARTemplates.SystemTemplate import System
|
|
39
38
|
from .....M2.AUTOSARTemplates.SystemTemplate.NetworkManagement import NmConfig
|
|
40
39
|
from .....M2.AUTOSARTemplates.SystemTemplate.TransportProtocols import CanTpConfig
|
|
@@ -189,6 +188,12 @@ class ARPackage(Identifiable, CollectableElement):
|
|
|
189
188
|
set = LifeCycleInfoSet(self, short_name)
|
|
190
189
|
self.addElement(set)
|
|
191
190
|
return self.getElement(short_name)
|
|
191
|
+
|
|
192
|
+
def createFlatMap(self, short_name: str) -> FlatMap:
|
|
193
|
+
if (short_name not in self.elements):
|
|
194
|
+
set = FlatMap(self, short_name)
|
|
195
|
+
self.addElement(set)
|
|
196
|
+
return self.getElement(short_name)
|
|
192
197
|
|
|
193
198
|
def createClientServerInterface(self, short_name: str) -> ClientServerInterface:
|
|
194
199
|
if (short_name not in self.elements):
|
|
@@ -459,6 +464,18 @@ class ARPackage(Identifiable, CollectableElement):
|
|
|
459
464
|
element = System(self, short_name)
|
|
460
465
|
self.addElement(element)
|
|
461
466
|
return self.getElement(short_name)
|
|
467
|
+
|
|
468
|
+
def createFlatMap(self, short_name: str) -> FlatMap:
|
|
469
|
+
if (short_name not in self.elements):
|
|
470
|
+
map = FlatMap(self, short_name)
|
|
471
|
+
self.addElement(map)
|
|
472
|
+
return self.getElement(short_name)
|
|
473
|
+
|
|
474
|
+
def createPortInterfaceMappingSet(self, short_name: str) -> PortInterfaceMappingSet:
|
|
475
|
+
if (short_name not in self.elements):
|
|
476
|
+
map = PortInterfaceMappingSet(self, short_name)
|
|
477
|
+
self.addElement(map)
|
|
478
|
+
return self.getElement(short_name)
|
|
462
479
|
|
|
463
480
|
def getApplicationPrimitiveDataTypes(self) -> List[ApplicationPrimitiveDataType]:
|
|
464
481
|
return list(sorted(filter(lambda a: isinstance(a, ApplicationPrimitiveDataType), self.elements.values()), key= lambda o:o.short_name))
|
|
@@ -13,6 +13,7 @@ class Referrable(ARObject, metaclass = ABCMeta):
|
|
|
13
13
|
|
|
14
14
|
if type(self) == Referrable:
|
|
15
15
|
raise NotImplementedError("Referrable is an abstract class.")
|
|
16
|
+
|
|
16
17
|
ARObject.__init__(self)
|
|
17
18
|
|
|
18
19
|
self.parent = parent
|
|
@@ -61,6 +62,7 @@ class CollectableElement(ARObject, metaclass = ABCMeta):
|
|
|
61
62
|
def __init__(self):
|
|
62
63
|
if type(self) == CollectableElement:
|
|
63
64
|
raise NotImplementedError("CollectableElement is an abstract class.")
|
|
65
|
+
|
|
64
66
|
self.elements = {} # type: dict[str, Referrable]
|
|
65
67
|
|
|
66
68
|
def getTotalElement(self) -> int:
|
|
@@ -87,6 +89,7 @@ class Identifiable(MultilanguageReferrable, CollectableElement, metaclass = ABCM
|
|
|
87
89
|
def __init__(self, parent: ARObject, short_name: str):
|
|
88
90
|
if type(self) == Identifiable:
|
|
89
91
|
raise NotImplementedError("Identifiable is an abstract class.")
|
|
92
|
+
|
|
90
93
|
MultilanguageReferrable.__init__(self, parent, short_name)
|
|
91
94
|
CollectableElement.__init__(self)
|
|
92
95
|
|
armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/PrimitiveTypes.py
CHANGED
|
@@ -340,6 +340,35 @@ class Identifier(ARLiteral):
|
|
|
340
340
|
def __init__(self):
|
|
341
341
|
super().__init__()
|
|
342
342
|
|
|
343
|
+
class CIdentifier(ARLiteral):
|
|
344
|
+
'''
|
|
345
|
+
This datatype represents a string, that follows the rules of C-identifiers.
|
|
346
|
+
|
|
347
|
+
Tags:
|
|
348
|
+
* xml.xsd.customType=C-IDENTIFIER
|
|
349
|
+
* xml.xsd.pattern=[a-zA-Z_][a-zA-Z0-9_]*
|
|
350
|
+
* xml.xsd.type=string
|
|
351
|
+
'''
|
|
352
|
+
def __init__(self):
|
|
353
|
+
super().__init__()
|
|
354
|
+
|
|
355
|
+
self.blueprintValue = None
|
|
356
|
+
self.namePattern = None
|
|
357
|
+
|
|
358
|
+
def getBlueprintValue(self):
|
|
359
|
+
return self.blueprintValue
|
|
360
|
+
|
|
361
|
+
def setBlueprintValue(self, value):
|
|
362
|
+
self.blueprintValue = value
|
|
363
|
+
return self
|
|
364
|
+
|
|
365
|
+
def getNamePattern(self):
|
|
366
|
+
return self.namePattern
|
|
367
|
+
|
|
368
|
+
def setNamePattern(self, value):
|
|
369
|
+
self.namePattern = value
|
|
370
|
+
return self
|
|
371
|
+
|
|
343
372
|
class RevisionLabelString(ARLiteral):
|
|
344
373
|
'''
|
|
345
374
|
This primitive represents an internal AUTOSAR revision label which identifies an engineering object. It
|
|
@@ -404,4 +433,29 @@ class RefType(ARObject):
|
|
|
404
433
|
|
|
405
434
|
class TRefType(RefType):
|
|
406
435
|
def __init__(self):
|
|
407
|
-
super().__init__()
|
|
436
|
+
super().__init__()
|
|
437
|
+
|
|
438
|
+
class DiagRequirementIdString(ARLiteral):
|
|
439
|
+
'''
|
|
440
|
+
This string denotes an Identifier for a requirement.
|
|
441
|
+
|
|
442
|
+
Tags:
|
|
443
|
+
* xml.xsd.customType=DIAG-REQUIREMENT-ID-STRING
|
|
444
|
+
* xml.xsd.pattern=[0-9a-zA-Z_\-]+
|
|
445
|
+
* xml.xsd.type=string
|
|
446
|
+
'''
|
|
447
|
+
def __init__(self):
|
|
448
|
+
super().__init__()
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
class ArgumentDirectionEnum(AREnum):
|
|
452
|
+
IN = "in"
|
|
453
|
+
INOUT = "inout"
|
|
454
|
+
OUT = "out"
|
|
455
|
+
|
|
456
|
+
def __init__(self):
|
|
457
|
+
super().__init__((
|
|
458
|
+
ArgumentDirectionEnum.IN,
|
|
459
|
+
ArgumentDirectionEnum.INOUT,
|
|
460
|
+
ArgumentDirectionEnum.OUT
|
|
461
|
+
))
|
|
@@ -62,9 +62,22 @@ class CompositeNetworkRepresentation(ARObject):
|
|
|
62
62
|
def __init__(self):
|
|
63
63
|
super().__init__()
|
|
64
64
|
|
|
65
|
-
self.
|
|
66
|
-
self.
|
|
65
|
+
self.leafElementIRef = None # type: ApplicationCompositeElementInPortInterfaceInstanceRef
|
|
66
|
+
self.networkRepresentation = None # type: SwDataDefProps
|
|
67
67
|
|
|
68
|
+
def getLeafElementIRef(self):
|
|
69
|
+
return self.leafElementIRef
|
|
70
|
+
|
|
71
|
+
def setLeafElementIRef(self, value):
|
|
72
|
+
self.leafElementIRef = value
|
|
73
|
+
return self
|
|
74
|
+
|
|
75
|
+
def getNetworkRepresentation(self):
|
|
76
|
+
return self.networkRepresentation
|
|
77
|
+
|
|
78
|
+
def setNetworkRepresentation(self, value):
|
|
79
|
+
self.networkRepresentation = value
|
|
80
|
+
return self
|
|
68
81
|
|
|
69
82
|
class TransmissionAcknowledgementRequest(ARObject):
|
|
70
83
|
def __init__(self):
|
|
@@ -205,7 +218,10 @@ class ReceiverComSpec(RPortComSpec):
|
|
|
205
218
|
self.compositeNetworkRepresentations = [] # type: List[CompositeNetworkRepresentation]
|
|
206
219
|
self.dataElementRef = None # type: RefType
|
|
207
220
|
self.networkRepresentation = None # type: SwDataDefProps
|
|
208
|
-
self.handleOutOfRange = None # type:
|
|
221
|
+
self.handleOutOfRange = None # type: HandleOutOfRangeEnum
|
|
222
|
+
self.handleOutOfRangeStatus = None # type: HandleOutOfRangeStatusEnum
|
|
223
|
+
self.maxDeltaCounterInit = None # type: PositiveInteger
|
|
224
|
+
self.maxNoNewOrRepeatedData = None # type: PositiveInteger
|
|
209
225
|
self.usesEndToEndProtection = None # type: ARBoolean
|
|
210
226
|
|
|
211
227
|
def getDataElementRef(self):
|
|
@@ -228,6 +244,28 @@ class ReceiverComSpec(RPortComSpec):
|
|
|
228
244
|
def setHandleOutOfRange(self, value):
|
|
229
245
|
self.handleOutOfRange = value
|
|
230
246
|
return self
|
|
247
|
+
|
|
248
|
+
def getHandleOutOfRangeStatus(self):
|
|
249
|
+
return self.handleOutOfRangeStatus
|
|
250
|
+
|
|
251
|
+
def setHandleOutOfRangeStatus(self, value):
|
|
252
|
+
self.handleOutOfRangeStatus = value
|
|
253
|
+
return self
|
|
254
|
+
|
|
255
|
+
def getMaxDeltaCounterInit(self):
|
|
256
|
+
return self.maxDeltaCounterInit
|
|
257
|
+
|
|
258
|
+
def setMaxDeltaCounterInit(self, value):
|
|
259
|
+
self.maxDeltaCounterInit = value
|
|
260
|
+
return self
|
|
261
|
+
|
|
262
|
+
def getMaxNoNewOrRepeatedData(self):
|
|
263
|
+
return self.maxNoNewOrRepeatedData
|
|
264
|
+
|
|
265
|
+
def setMaxNoNewOrRepeatedData(self, value):
|
|
266
|
+
self.maxNoNewOrRepeatedData = value
|
|
267
|
+
return self
|
|
268
|
+
|
|
231
269
|
|
|
232
270
|
def getUsesEndToEndProtection(self):
|
|
233
271
|
return self.usesEndToEndProtection
|
|
@@ -87,7 +87,7 @@ class AbstractProvidedPortPrototype(PortPrototype):
|
|
|
87
87
|
def __init__(self, parent: ARObject, short_name: str):
|
|
88
88
|
super().__init__(parent, short_name)
|
|
89
89
|
|
|
90
|
-
self.
|
|
90
|
+
self.providedComSpecs = [] # type: List[PPortComSpec]
|
|
91
91
|
|
|
92
92
|
def _validateRPortComSpec(self, com_spec: PPortComSpec):
|
|
93
93
|
if isinstance(com_spec, NonqueuedSenderComSpec):
|
|
@@ -108,20 +108,20 @@ class AbstractProvidedPortPrototype(PortPrototype):
|
|
|
108
108
|
|
|
109
109
|
def addProvidedComSpec(self, com_spec):
|
|
110
110
|
self._validateRPortComSpec(com_spec)
|
|
111
|
-
self.
|
|
111
|
+
self.providedComSpecs.append(com_spec)
|
|
112
112
|
|
|
113
113
|
def getProvidedComSpecs(self) -> List[PPortComSpec]:
|
|
114
|
-
return self.
|
|
114
|
+
return self.providedComSpecs
|
|
115
115
|
|
|
116
116
|
def getNonqueuedSenderComSpecs(self) -> List[NonqueuedSenderComSpec]:
|
|
117
|
-
return filter(lambda c: isinstance(c, NonqueuedSenderComSpec), self.
|
|
117
|
+
return filter(lambda c: isinstance(c, NonqueuedSenderComSpec), self.providedComSpecs)
|
|
118
118
|
|
|
119
119
|
|
|
120
120
|
class AbstractRequiredPortPrototype(PortPrototype):
|
|
121
121
|
def __init__(self, parent: ARObject, short_name: str):
|
|
122
122
|
super().__init__(parent, short_name)
|
|
123
123
|
|
|
124
|
-
self.
|
|
124
|
+
self.requiredComSpecs = [] # type: List[RPortComSpec]
|
|
125
125
|
|
|
126
126
|
def _validateRPortComSpec(self, com_spec: RPortComSpec):
|
|
127
127
|
if (isinstance(com_spec, ClientComSpec)):
|
|
@@ -145,16 +145,16 @@ class AbstractRequiredPortPrototype(PortPrototype):
|
|
|
145
145
|
|
|
146
146
|
def addRequiredComSpec(self, com_spec: RPortComSpec):
|
|
147
147
|
self._validateRPortComSpec(com_spec)
|
|
148
|
-
self.
|
|
148
|
+
self.requiredComSpecs.append(com_spec)
|
|
149
149
|
|
|
150
150
|
def getRequiredComSpecs(self) -> List[RPortComSpec]:
|
|
151
|
-
return self.
|
|
151
|
+
return self.requiredComSpecs
|
|
152
152
|
|
|
153
153
|
def getClientComSpecs(self) -> List[ClientComSpec]:
|
|
154
|
-
return filter(lambda c: isinstance(c, ClientComSpec), self.
|
|
154
|
+
return filter(lambda c: isinstance(c, ClientComSpec), self.requiredComSpecs)
|
|
155
155
|
|
|
156
156
|
def getNonqueuedReceiverComSpecs(self) -> List[NonqueuedReceiverComSpec]:
|
|
157
|
-
return filter(lambda c: isinstance(c, NonqueuedReceiverComSpec), self.
|
|
157
|
+
return filter(lambda c: isinstance(c, NonqueuedReceiverComSpec), self.requiredComSpecs)
|
|
158
158
|
|
|
159
159
|
|
|
160
160
|
class PPortPrototype(AbstractProvidedPortPrototype):
|
|
@@ -190,6 +190,35 @@ class RPortPrototype(AbstractRequiredPortPrototype):
|
|
|
190
190
|
def setRequiredInterfaceTRef(self, value):
|
|
191
191
|
self.requiredInterfaceTRef = value
|
|
192
192
|
return self
|
|
193
|
+
|
|
194
|
+
class PRPortPrototype(PortPrototype):
|
|
195
|
+
def __init__(self, parent, short_name):
|
|
196
|
+
super().__init__(parent, short_name)
|
|
197
|
+
|
|
198
|
+
self.providedComSpecs = [] # type: List[PPortComSpec]
|
|
199
|
+
self.requiredComSpecs = [] # type: List[RPortComSpec]
|
|
200
|
+
self.providedRequiredInterface = None # type: TRefType
|
|
201
|
+
|
|
202
|
+
def getProvidedComSpecs(self):
|
|
203
|
+
return self.providedComSpecs
|
|
204
|
+
|
|
205
|
+
def addProvidedComSpec(self, value):
|
|
206
|
+
self.providedComSpecs.append(value)
|
|
207
|
+
return self
|
|
208
|
+
|
|
209
|
+
def getRequiredComSpecs(self):
|
|
210
|
+
return self.requiredComSpecs
|
|
211
|
+
|
|
212
|
+
def addRequiredComSpec(self, value):
|
|
213
|
+
self.requiredComSpecs.append(value)
|
|
214
|
+
return self
|
|
215
|
+
|
|
216
|
+
def getProvidedRequiredInterface(self):
|
|
217
|
+
return self.providedRequiredInterface
|
|
218
|
+
|
|
219
|
+
def setProvidedRequiredInterface(self, value):
|
|
220
|
+
self.providedRequiredInterface = value
|
|
221
|
+
return self
|
|
193
222
|
|
|
194
223
|
class PortGroup(Identifiable):
|
|
195
224
|
def __init__(self, parent: ARObject, short_name: str):
|
|
@@ -215,16 +244,22 @@ class SwComponentType(ARElement, metaclass = ABCMeta):
|
|
|
215
244
|
super().__init__(parent, short_name)
|
|
216
245
|
|
|
217
246
|
def createPPortPrototype(self, short_name: str) -> PPortPrototype:
|
|
218
|
-
prototype = PPortPrototype(self, short_name)
|
|
219
247
|
if (short_name not in self.elements):
|
|
220
|
-
|
|
221
|
-
|
|
248
|
+
prototype = PPortPrototype(self, short_name)
|
|
249
|
+
self.addElement(prototype)
|
|
250
|
+
return self.getElement(short_name)
|
|
222
251
|
|
|
223
252
|
def createRPortPrototype(self, short_name) -> RPortPrototype:
|
|
224
|
-
prototype = RPortPrototype(self, short_name)
|
|
225
253
|
if (short_name not in self.elements):
|
|
226
|
-
|
|
227
|
-
|
|
254
|
+
prototype = RPortPrototype(self, short_name)
|
|
255
|
+
self.addElement(prototype)
|
|
256
|
+
return self.getElement(short_name)
|
|
257
|
+
|
|
258
|
+
def createPRPortPrototype(self, short_name) -> PRPortPrototype:
|
|
259
|
+
if (short_name not in self.elements):
|
|
260
|
+
prototype = PRPortPrototype(self, short_name)
|
|
261
|
+
self.addElement(prototype)
|
|
262
|
+
return self.getElement(short_name)
|
|
228
263
|
|
|
229
264
|
def createPortGroup(self, short_name) -> PortGroup:
|
|
230
265
|
port_group = PortGroup(self, short_name)
|
|
@@ -238,6 +273,9 @@ class SwComponentType(ARElement, metaclass = ABCMeta):
|
|
|
238
273
|
def getRPortPrototypes(self) -> List[RPortPrototype]:
|
|
239
274
|
return list(sorted(filter(lambda c: isinstance(c, RPortPrototype), self.elements.values()), key= lambda o: o.short_name))
|
|
240
275
|
|
|
276
|
+
def getPRPortPrototypes(self) -> List[PRPortPrototype]:
|
|
277
|
+
return list(sorted(filter(lambda c: isinstance(c, PRPortPrototype), self.elements.values()), key= lambda o: o.short_name))
|
|
278
|
+
|
|
241
279
|
def getPortPrototypes(self) -> List[PortPrototype]:
|
|
242
280
|
return list(sorted(filter(lambda c: isinstance(c, PortPrototype), self.elements.values()), key= lambda o: o.short_name))
|
|
243
281
|
|
|
@@ -34,9 +34,17 @@ class AssemblySwConnector(SwConnector):
|
|
|
34
34
|
def __init__(self, parent: ARObject, short_name: str):
|
|
35
35
|
super().__init__(parent, short_name)
|
|
36
36
|
|
|
37
|
+
self.mappingRef = None # type: RefType
|
|
37
38
|
self.providerIRef = None # type: PPortInCompositionInstanceRef
|
|
38
39
|
self.requesterIRef = None # type: RPortInCompositionInstanceRef
|
|
39
40
|
|
|
41
|
+
def getMappingRef(self):
|
|
42
|
+
return self.mappingRef
|
|
43
|
+
|
|
44
|
+
def setMappingRef(self, value):
|
|
45
|
+
self.mappingRef = value
|
|
46
|
+
return self
|
|
47
|
+
|
|
40
48
|
def getProviderIRef(self) -> PPortInCompositionInstanceRef:
|
|
41
49
|
return self.providerIRef
|
|
42
50
|
|
|
@@ -81,25 +81,40 @@ class ApplicationRecordDataType(ApplicationCompositeDataType):
|
|
|
81
81
|
class DataTypeMap(ARObject):
|
|
82
82
|
def __init__(self):
|
|
83
83
|
|
|
84
|
-
self.
|
|
85
|
-
self.
|
|
84
|
+
self.applicationDataTypeRef = None # type: RefType
|
|
85
|
+
self.implementationDataTypeRef = None # type: RefType
|
|
86
86
|
|
|
87
|
+
def getApplicationDataTypeRef(self):
|
|
88
|
+
return self.applicationDataTypeRef
|
|
89
|
+
|
|
90
|
+
def setApplicationDataTypeRef(self, value):
|
|
91
|
+
self.applicationDataTypeRef = value
|
|
92
|
+
return self
|
|
93
|
+
|
|
94
|
+
def getImplementationDataTypeRef(self):
|
|
95
|
+
return self.implementationDataTypeRef
|
|
96
|
+
|
|
97
|
+
def setImplementationDataTypeRef(self, value):
|
|
98
|
+
self.implementationDataTypeRef = value
|
|
99
|
+
return self
|
|
87
100
|
|
|
88
101
|
class DataTypeMappingSet(ARElement):
|
|
89
102
|
def __init__(self, parent: ARObject, short_name: str):
|
|
90
103
|
super().__init__(parent, short_name)
|
|
91
104
|
|
|
92
|
-
self.
|
|
93
|
-
self.
|
|
105
|
+
self.dataTypeMaps = [] # type: List[DataTypeMap]
|
|
106
|
+
self.modeRequestTypeMaps = [] # type: List[ModeRequestTypeMap]
|
|
94
107
|
|
|
95
108
|
def addDataTypeMap(self, type_map: DataTypeMap):
|
|
96
|
-
self.
|
|
109
|
+
self.dataTypeMaps.append(type_map)
|
|
110
|
+
return self
|
|
97
111
|
|
|
98
112
|
def getDataTypeMaps(self) -> List[DataTypeMap]:
|
|
99
|
-
return self.
|
|
113
|
+
return self.dataTypeMaps
|
|
100
114
|
|
|
101
115
|
def addModeRequestTypeMap(self, map: ModeRequestTypeMap):
|
|
102
|
-
self.
|
|
116
|
+
self.modeRequestTypeMaps.append(map)
|
|
117
|
+
return self
|
|
103
118
|
|
|
104
119
|
def getModeRequestTypeMaps(self) -> List[ModeRequestTypeMap]:
|
|
105
|
-
return self.
|
|
120
|
+
return self.modeRequestTypeMaps
|