armodel 1.7.9__py3-none-any.whl → 1.8.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- armodel/cli/arxml_format_cli.py +1 -0
- armodel/models/M2/AUTOSARTemplates/AutosarTopLevelStructure.py +50 -12
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswBehavior.py +14 -14
- armodel/models/M2/AUTOSARTemplates/CommonStructure/FlatMap.py +2 -3
- armodel/models/M2/AUTOSARTemplates/CommonStructure/Implementation.py +1 -1
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ImplementationDataTypes.py +36 -34
- armodel/models/M2/AUTOSARTemplates/CommonStructure/InternalBehavior.py +1 -1
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ModeDeclaration.py +4 -4
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ResourceConsumption/__init__.py +3 -3
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ServiceNeeds.py +5 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/Timing/TimingConstraint/ExecutionOrderConstraint.py +3 -3
- armodel/models/M2/AUTOSARTemplates/CommonStructure/Timing/TimingConstraint/TimingExtensions.py +3 -3
- armodel/models/M2/AUTOSARTemplates/ECUCDescriptionTemplate.py +86 -9
- armodel/models/M2/AUTOSARTemplates/ECUCParameterDefTemplate.py +1249 -0
- armodel/models/M2/AUTOSARTemplates/GenericStructure/AbstractStructure.py +13 -10
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ARPackage.py +238 -225
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ArObject.py +5 -4
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/Identifiable.py +46 -25
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/PrimitiveTypes.py +38 -3
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Components/__init__.py +18 -20
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Datatype/Datatypes.py +23 -19
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/EndToEndProtection.py +4 -4
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/PortInterface/__init__.py +71 -27
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ServiceMapping.py +27 -17
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/__init__.py +172 -128
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/DataMapping.py +11 -10
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/FibexCore/CoreCommunication.py +11 -11
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/FibexCore/CoreTopology.py +16 -10
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/FibexCore/EcuInstance.py +2 -2
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/NetworkManagement.py +6 -6
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/RteEventToOsTaskMapping.py +35 -0
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/SWmapping.py +25 -0
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/SecureCommunication.py +83 -0
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/__init__.py +90 -38
- armodel/models/M2/MSR/AsamHdo/AdminData.py +101 -8
- armodel/models/__init__.py +2 -0
- armodel/models/utils/__init__.py +0 -0
- armodel/models/utils/uuid_mgr.py +23 -0
- armodel/parser/abstract_arxml_parser.py +13 -5
- armodel/parser/arxml_parser.py +412 -85
- armodel/tests/test_armodel/models/test_ECUCParameterDefTemplate.py +116 -0
- armodel/tests/test_armodel/models/test_Identifiable.py +85 -0
- armodel/tests/test_armodel/models/test_ar_object.py +85 -86
- armodel/tests/test_armodel/models/test_ar_package.py +70 -70
- armodel/tests/test_armodel/models/test_ar_ref.py +36 -36
- armodel/tests/test_armodel/models/test_common_structure.py +37 -35
- armodel/tests/test_armodel/models/test_datatype.py +140 -142
- armodel/tests/test_armodel/models/test_general_structure.py +19 -18
- armodel/tests/test_armodel/models/test_port_interface.py +2 -6
- armodel/tests/test_armodel/parser/test_arxml_parser.py +8 -8
- armodel/writer/abstract_arxml_writer.py +6 -2
- armodel/writer/arxml_writer.py +414 -57
- {armodel-1.7.9.dist-info → armodel-1.8.1.dist-info}/METADATA +31 -1
- {armodel-1.7.9.dist-info → armodel-1.8.1.dist-info}/RECORD +58 -51
- {armodel-1.7.9.dist-info → armodel-1.8.1.dist-info}/LICENSE +0 -0
- {armodel-1.7.9.dist-info → armodel-1.8.1.dist-info}/WHEEL +0 -0
- {armodel-1.7.9.dist-info → armodel-1.8.1.dist-info}/entry_points.txt +0 -0
- {armodel-1.7.9.dist-info → armodel-1.8.1.dist-info}/top_level.txt +0 -0
|
@@ -72,14 +72,14 @@ class Frame(Identifiable, metaclass=ABCMeta):
|
|
|
72
72
|
return self
|
|
73
73
|
|
|
74
74
|
def createPduToFrameMapping(self, short_name: str) -> PduToFrameMapping:
|
|
75
|
-
if
|
|
75
|
+
if not self.IsElementExists(short_name):
|
|
76
76
|
mapping = PduToFrameMapping(self, short_name)
|
|
77
|
-
self.
|
|
77
|
+
self.addElement(mapping)
|
|
78
78
|
self.pduToFrameMappings.append(mapping)
|
|
79
|
-
return self.
|
|
79
|
+
return self.getElement(short_name, PduToFrameMapping)
|
|
80
80
|
|
|
81
81
|
def getPduToFrameMappings(self) -> List[PduToFrameMapping]:
|
|
82
|
-
return list(sorted(filter(lambda a: isinstance(a, PduToFrameMapping), self.elements
|
|
82
|
+
return list(sorted(filter(lambda a: isinstance(a, PduToFrameMapping), self.elements), key=lambda o: o.short_name))
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
class ContainedIPduProps(ARObject):
|
|
@@ -542,11 +542,11 @@ class NmPdu(Pdu):
|
|
|
542
542
|
return self.iSignalToIPduMappings
|
|
543
543
|
|
|
544
544
|
def createISignalToIPduMapping(self, short_name: str) -> ISignalToIPduMapping:
|
|
545
|
-
if
|
|
545
|
+
if not self.IsElementExists(short_name):
|
|
546
546
|
mapping = ISignalToIPduMapping(self, short_name)
|
|
547
547
|
self.addElement(mapping)
|
|
548
548
|
self.iSignalToIPduMappings.append(mapping)
|
|
549
|
-
return self.getElement(short_name)
|
|
549
|
+
return self.getElement(short_name, ISignalToIPduMapping)
|
|
550
550
|
|
|
551
551
|
def getNmDataInformation(self):
|
|
552
552
|
return self.nmDataInformation
|
|
@@ -633,11 +633,11 @@ class ISignalIPdu(IPdu):
|
|
|
633
633
|
return self.iSignalToPduMappings
|
|
634
634
|
|
|
635
635
|
def createISignalToPduMappings(self, short_name: str) -> ISignalToIPduMapping:
|
|
636
|
-
if
|
|
636
|
+
if not self.IsElementExists(short_name):
|
|
637
637
|
mapping = ISignalToIPduMapping(self, short_name)
|
|
638
|
-
self.
|
|
638
|
+
self.addElement(mapping)
|
|
639
639
|
self.iSignalToPduMappings.append(mapping)
|
|
640
|
-
return self.
|
|
640
|
+
return self.getElement(short_name, ISignalToIPduMapping)
|
|
641
641
|
|
|
642
642
|
def getUnusedBitPattern(self):
|
|
643
643
|
return self.unusedBitPattern
|
|
@@ -1219,7 +1219,7 @@ class SecureCommunicationPropsSet(Identifiable):
|
|
|
1219
1219
|
props = SecureCommunicationAuthenticationProps(self, short_name)
|
|
1220
1220
|
self.addElement(props)
|
|
1221
1221
|
self.authenticationProps.append(props)
|
|
1222
|
-
return self.getElement(short_name)
|
|
1222
|
+
return self.getElement(short_name, SecureCommunicationAuthenticationProps)
|
|
1223
1223
|
|
|
1224
1224
|
def getFreshnessProps(self):
|
|
1225
1225
|
return self.freshnessProps
|
|
@@ -1229,4 +1229,4 @@ class SecureCommunicationPropsSet(Identifiable):
|
|
|
1229
1229
|
props = SecureCommunicationFreshnessProps(self, short_name)
|
|
1230
1230
|
self.addElement(props)
|
|
1231
1231
|
self.freshnessProps.append(props)
|
|
1232
|
-
return self.getElement(short_name)
|
|
1232
|
+
return self.getElement(short_name, SecureCommunicationFreshnessProps)
|
|
@@ -82,7 +82,7 @@ class PhysicalChannel (Identifiable, metaclass=ABCMeta):
|
|
|
82
82
|
return self
|
|
83
83
|
|
|
84
84
|
def getFrameTriggerings(self) -> List[FrameTriggering]:
|
|
85
|
-
return list(sorted(filter(lambda a: isinstance(a, FrameTriggering), self.elements
|
|
85
|
+
return list(sorted(filter(lambda a: isinstance(a, FrameTriggering), self.elements), key=lambda o: o.getShortName()))
|
|
86
86
|
|
|
87
87
|
def createCanFrameTriggering(self, short_name: str) -> CanFrameTriggering:
|
|
88
88
|
if (short_name not in self.elements):
|
|
@@ -106,7 +106,7 @@ class PhysicalChannel (Identifiable, metaclass=ABCMeta):
|
|
|
106
106
|
return self.getElement(short_name)
|
|
107
107
|
|
|
108
108
|
def getISignalTriggerings(self) -> List[ISignalTriggering]:
|
|
109
|
-
return list(sorted(filter(lambda a: isinstance(a, ISignalTriggering), self.elements
|
|
109
|
+
return list(sorted(filter(lambda a: isinstance(a, ISignalTriggering), self.elements), key=lambda o: o.getShortName()))
|
|
110
110
|
|
|
111
111
|
def createISignalTriggering(self, short_name: str):
|
|
112
112
|
if (short_name not in self.elements):
|
|
@@ -122,7 +122,7 @@ class PhysicalChannel (Identifiable, metaclass=ABCMeta):
|
|
|
122
122
|
return self
|
|
123
123
|
|
|
124
124
|
def getPduTriggerings(self) -> List[PduTriggering]:
|
|
125
|
-
return list(sorted(filter(lambda a: isinstance(a, PduTriggering), self.elements
|
|
125
|
+
return list(sorted(filter(lambda a: isinstance(a, PduTriggering), self.elements), key=lambda o: o.getShortName()))
|
|
126
126
|
|
|
127
127
|
def createPduTriggering(self, short_name: str):
|
|
128
128
|
if (short_name not in self.elements):
|
|
@@ -268,16 +268,16 @@ class CommunicationCluster(FibexElement, metaclass=ABCMeta):
|
|
|
268
268
|
return self
|
|
269
269
|
|
|
270
270
|
def getPhysicalChannels(self) -> List[PhysicalChannel]:
|
|
271
|
-
return list(sorted(filter(lambda a: isinstance(a, PhysicalChannel), self.elements
|
|
271
|
+
return list(sorted(filter(lambda a: isinstance(a, PhysicalChannel), self.elements), key=lambda o: o.getShortName()))
|
|
272
272
|
|
|
273
273
|
def getCanPhysicalChannels(self) -> List[CanPhysicalChannel]:
|
|
274
|
-
return list(sorted(filter(lambda a: isinstance(a, CanPhysicalChannel), self.elements
|
|
274
|
+
return list(sorted(filter(lambda a: isinstance(a, CanPhysicalChannel), self.elements), key=lambda o: o.getShortName()))
|
|
275
275
|
|
|
276
276
|
def getLinPhysicalChannels(self) -> List[LinPhysicalChannel]:
|
|
277
|
-
return list(sorted(filter(lambda a: isinstance(a, LinPhysicalChannel), self.elements
|
|
277
|
+
return list(sorted(filter(lambda a: isinstance(a, LinPhysicalChannel), self.elements), key=lambda o: o.getShortName()))
|
|
278
278
|
|
|
279
279
|
def getEthernetPhysicalChannels(self) -> List[EthernetPhysicalChannel]:
|
|
280
|
-
return list(sorted(filter(lambda a: isinstance(a, EthernetPhysicalChannel), self.elements
|
|
280
|
+
return list(sorted(filter(lambda a: isinstance(a, EthernetPhysicalChannel), self.elements), key=lambda o: o.getShortName()))
|
|
281
281
|
|
|
282
282
|
def createCanPhysicalChannel(self, short_name: str):
|
|
283
283
|
if (short_name not in self.elements):
|
|
@@ -441,16 +441,22 @@ class CommunicationController(Identifiable, metaclass=ABCMeta):
|
|
|
441
441
|
return self
|
|
442
442
|
|
|
443
443
|
|
|
444
|
-
class PncGatewayTypeEnum(
|
|
444
|
+
class PncGatewayTypeEnum(AREnum):
|
|
445
445
|
ENUM_ACTIVE = "active"
|
|
446
446
|
ENUM_NONE = "none"
|
|
447
447
|
ENUM_PASSIVE = "passive"
|
|
448
448
|
|
|
449
|
+
def __init__(self):
|
|
450
|
+
super().__init__([])
|
|
451
|
+
|
|
449
452
|
|
|
450
|
-
class CommunicationDirectionType(
|
|
453
|
+
class CommunicationDirectionType(AREnum):
|
|
451
454
|
ENUM_IN = "in"
|
|
452
455
|
ENUM_OUT = "out"
|
|
453
456
|
|
|
457
|
+
def __init__(self):
|
|
458
|
+
super().__init__([])
|
|
459
|
+
|
|
454
460
|
|
|
455
461
|
class CommConnectorPort(Identifiable, metaclass=ABCMeta):
|
|
456
462
|
def __init__(self, parent: ARObject, short_name: str):
|
|
@@ -618,7 +624,7 @@ class CommunicationConnector(Identifiable, metaclass=ABCMeta):
|
|
|
618
624
|
return self
|
|
619
625
|
|
|
620
626
|
def getEcuCommPortInstances(self):
|
|
621
|
-
return list(sorted(filter(lambda a: isinstance(a, CommConnectorPort), self.elements
|
|
627
|
+
return list(sorted(filter(lambda a: isinstance(a, CommConnectorPort), self.elements), key=lambda o: o.getShortName()))
|
|
622
628
|
|
|
623
629
|
def createFramePort(self, short_name) -> FramePort:
|
|
624
630
|
if short_name not in self.elements:
|
|
@@ -104,7 +104,7 @@ class EcuInstance(FibexElement):
|
|
|
104
104
|
return self
|
|
105
105
|
|
|
106
106
|
def getCommControllers(self):
|
|
107
|
-
return list(sorted(filter(lambda a: isinstance(a, CommunicationController), self.elements
|
|
107
|
+
return list(sorted(filter(lambda a: isinstance(a, CommunicationController), self.elements), key= lambda o:o.short_name))
|
|
108
108
|
|
|
109
109
|
def createCanCommunicationController(self, short_name: str) -> CanCommunicationController:
|
|
110
110
|
if (not self.IsElementExists(short_name)):
|
|
@@ -131,7 +131,7 @@ class EcuInstance(FibexElement):
|
|
|
131
131
|
return self.getElement(short_name)
|
|
132
132
|
|
|
133
133
|
def getConnectors(self):
|
|
134
|
-
return list(sorted(filter(lambda a: isinstance(a, CommunicationConnector), self.elements
|
|
134
|
+
return list(sorted(filter(lambda a: isinstance(a, CommunicationConnector), self.elements), key= lambda o:o.short_name))
|
|
135
135
|
|
|
136
136
|
def createCanCommunicationConnector(self, short_name: str) -> CanCommunicationConnector:
|
|
137
137
|
if (not self.IsElementExists(short_name)):
|
|
@@ -392,13 +392,13 @@ class NmConfig(FibexElement):
|
|
|
392
392
|
return self.getElement(short_name)
|
|
393
393
|
|
|
394
394
|
def getCanNmClusters(self): # type: () -> List[CanNmCluster]
|
|
395
|
-
return list(sorted(filter(lambda a: isinstance(a, CanNmCluster), self.elements
|
|
395
|
+
return list(sorted(filter(lambda a: isinstance(a, CanNmCluster), self.elements), key= lambda o:o.short_name))
|
|
396
396
|
|
|
397
397
|
def getUdpNmClusters(self): # type: () -> List[UdpNmCluster]
|
|
398
|
-
return list(sorted(filter(lambda a: isinstance(a, UdpNmCluster), self.elements
|
|
398
|
+
return list(sorted(filter(lambda a: isinstance(a, UdpNmCluster), self.elements), key= lambda o:o.short_name))
|
|
399
399
|
|
|
400
400
|
def getNmClusters(self): # type: () -> List[NmCluster]
|
|
401
|
-
return list(sorted(filter(lambda a: isinstance(a, NmCluster), self.elements
|
|
401
|
+
return list(sorted(filter(lambda a: isinstance(a, NmCluster), self.elements), key= lambda o:o.short_name))
|
|
402
402
|
|
|
403
403
|
def getNmClusterCouplings(self):
|
|
404
404
|
return self.nmClusterCouplings
|
|
@@ -467,13 +467,13 @@ class NmCluster(Identifiable, metaclass=ABCMeta):
|
|
|
467
467
|
return self.getElement(short_name)
|
|
468
468
|
|
|
469
469
|
def getCanNmNodes(self) -> List[CanNmNode]:
|
|
470
|
-
return list(sorted(filter(lambda a: isinstance(a, CanNmNode), self.elements
|
|
470
|
+
return list(sorted(filter(lambda a: isinstance(a, CanNmNode), self.elements), key= lambda o:o.short_name))
|
|
471
471
|
|
|
472
472
|
def getUdpNmNodes(self) -> List[UdpNmNode]:
|
|
473
|
-
return list(sorted(filter(lambda a: isinstance(a, UdpNmNode), self.elements
|
|
473
|
+
return list(sorted(filter(lambda a: isinstance(a, UdpNmNode), self.elements), key= lambda o:o.short_name))
|
|
474
474
|
|
|
475
475
|
def getNmNodes(self) -> List[NmNode]:
|
|
476
|
-
return list(sorted(filter(lambda a: isinstance(a, NmNode), self.elements
|
|
476
|
+
return list(sorted(filter(lambda a: isinstance(a, NmNode), self.elements), key= lambda o:o.short_name))
|
|
477
477
|
|
|
478
478
|
def getNmNodeDetectionEnabled(self):
|
|
479
479
|
return self.nmNodeDetectionEnabled
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import RefType
|
|
2
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Identifiable
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class AppOsTaskProxyToEcuTaskProxyMapping(Identifiable):
|
|
6
|
+
def __init__(self, parent, short_name):
|
|
7
|
+
super().__init__(parent, short_name)
|
|
8
|
+
|
|
9
|
+
self.appTaskProxyRef = None # type: RefType
|
|
10
|
+
self.ecuTaskProxyRef = None # type: RefType
|
|
11
|
+
self.offset = None # type: RefType
|
|
12
|
+
|
|
13
|
+
def getAppTaskProxyRef(self):
|
|
14
|
+
return self.appTaskProxyRef
|
|
15
|
+
|
|
16
|
+
def setAppTaskProxyRef(self, value):
|
|
17
|
+
if value is not None:
|
|
18
|
+
self.appTaskProxyRef = value
|
|
19
|
+
return self
|
|
20
|
+
|
|
21
|
+
def getEcuTaskProxyRef(self):
|
|
22
|
+
return self.ecuTaskProxyRef
|
|
23
|
+
|
|
24
|
+
def setEcuTaskProxyRef(self, value):
|
|
25
|
+
if value is not None:
|
|
26
|
+
self.ecuTaskProxyRef = value
|
|
27
|
+
return self
|
|
28
|
+
|
|
29
|
+
def getOffset(self):
|
|
30
|
+
return self.offset
|
|
31
|
+
|
|
32
|
+
def setOffset(self, value):
|
|
33
|
+
if value is not None:
|
|
34
|
+
self.offset = value
|
|
35
|
+
return self
|
|
@@ -3,6 +3,7 @@ from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiabl
|
|
|
3
3
|
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import RefType
|
|
4
4
|
from ....M2.AUTOSARTemplates.SystemTemplate.InstanceRefs import ComponentInSystemInstanceRef
|
|
5
5
|
|
|
6
|
+
|
|
6
7
|
class SwcToImplMapping(Identifiable):
|
|
7
8
|
def __init__(self, parent, short_name):
|
|
8
9
|
super().__init__(parent, short_name)
|
|
@@ -25,3 +26,27 @@ class SwcToImplMapping(Identifiable):
|
|
|
25
26
|
if value is not None:
|
|
26
27
|
self.componentImplementationRef = value
|
|
27
28
|
return self
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class ApplicationPartitionToEcuPartitionMapping(Identifiable):
|
|
32
|
+
def __init__(self, parent, short_name):
|
|
33
|
+
super().__init__(parent, short_name)
|
|
34
|
+
|
|
35
|
+
self.applicationPartitionRefs = [] # type: List[RefType]
|
|
36
|
+
self.ecuPartitionRef = None # type: RefType
|
|
37
|
+
|
|
38
|
+
def getApplicationPartitionRefs(self):
|
|
39
|
+
return self.applicationPartitionRefs
|
|
40
|
+
|
|
41
|
+
def addApplicationPartitionRef(self, value):
|
|
42
|
+
if value is not None:
|
|
43
|
+
self.applicationPartitionRefs.append(value)
|
|
44
|
+
return self
|
|
45
|
+
|
|
46
|
+
def getEcuPartitionRef(self):
|
|
47
|
+
return self.ecuPartitionRef
|
|
48
|
+
|
|
49
|
+
def setEcuPartitionRef(self, value):
|
|
50
|
+
if value is not None:
|
|
51
|
+
self.ecuPartitionRef = value
|
|
52
|
+
return self
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
from typing import List
|
|
2
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import Boolean, RefType
|
|
3
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Identifiable
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class CryptoServiceMapping(Identifiable):
|
|
7
|
+
def __init__(self, parent, short_name):
|
|
8
|
+
super().__init__(parent, short_name)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class SecOcCryptoServiceMapping(CryptoServiceMapping):
|
|
12
|
+
def __init__(self, parent, short_name):
|
|
13
|
+
super().__init__(parent, short_name)
|
|
14
|
+
|
|
15
|
+
self.authenticationRef = None # type: RefType
|
|
16
|
+
self.cryptoServiceKeyRef = None # type: RefType
|
|
17
|
+
self.cryptoServiceQueueRef = None # type: RefType
|
|
18
|
+
|
|
19
|
+
def getAuthenticationRef(self):
|
|
20
|
+
return self.authenticationRef
|
|
21
|
+
|
|
22
|
+
def setAuthenticationRef(self, value):
|
|
23
|
+
if value is not None:
|
|
24
|
+
self.authenticationRef = value
|
|
25
|
+
return self
|
|
26
|
+
|
|
27
|
+
def getCryptoServiceKeyRef(self):
|
|
28
|
+
return self.cryptoServiceKeyRef
|
|
29
|
+
|
|
30
|
+
def setCryptoServiceKeyRef(self, value):
|
|
31
|
+
if value is not None:
|
|
32
|
+
self.cryptoServiceKeyRef = value
|
|
33
|
+
return self
|
|
34
|
+
|
|
35
|
+
def getCryptoServiceQueueRef(self):
|
|
36
|
+
return self.cryptoServiceQueueRef
|
|
37
|
+
|
|
38
|
+
def setCryptoServiceQueueRef(self, value):
|
|
39
|
+
if value is not None:
|
|
40
|
+
self.cryptoServiceQueueRef = value
|
|
41
|
+
return self
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class TlsCryptoServiceMapping(CryptoServiceMapping):
|
|
45
|
+
def __init__(self, parent, short_name):
|
|
46
|
+
super().__init__(parent, short_name)
|
|
47
|
+
|
|
48
|
+
self.keyExchangeRef = None # type: RefType
|
|
49
|
+
self.tlsCipherSuites = [] # type: List[TlsCryptoCipherSuite]
|
|
50
|
+
self.useClientAuthenticationRequest = None # type: Boolean
|
|
51
|
+
self.useSecurityExtensionRecordSizeLimit = None # type: Boolean
|
|
52
|
+
|
|
53
|
+
def getKeyExchangeRef(self):
|
|
54
|
+
return self.keyExchangeRef
|
|
55
|
+
|
|
56
|
+
def setKeyExchangeRef(self, value):
|
|
57
|
+
if value is not None:
|
|
58
|
+
self.keyExchangeRef = value
|
|
59
|
+
return self
|
|
60
|
+
|
|
61
|
+
def getTlsCipherSuites(self):
|
|
62
|
+
return self.tlsCipherSuites
|
|
63
|
+
|
|
64
|
+
def addTlsCipherSuite(self, value):
|
|
65
|
+
if value is not None:
|
|
66
|
+
self.tlsCipherSuites.append(value)
|
|
67
|
+
return self
|
|
68
|
+
|
|
69
|
+
def getUseClientAuthenticationRequest(self):
|
|
70
|
+
return self.useClientAuthenticationRequest
|
|
71
|
+
|
|
72
|
+
def setUseClientAuthenticationRequest(self, value):
|
|
73
|
+
if value is not None:
|
|
74
|
+
self.useClientAuthenticationRequest = value
|
|
75
|
+
return self
|
|
76
|
+
|
|
77
|
+
def getUseSecurityExtensionRecordSizeLimit(self):
|
|
78
|
+
return self.useSecurityExtensionRecordSizeLimit
|
|
79
|
+
|
|
80
|
+
def setUseSecurityExtensionRecordSizeLimit(self, value):
|
|
81
|
+
if value is not None:
|
|
82
|
+
self.useSecurityExtensionRecordSizeLimit = value
|
|
83
|
+
return self
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
from typing import List
|
|
2
2
|
|
|
3
|
+
from ....M2.AUTOSARTemplates.SystemTemplate.DataMapping import DataMapping
|
|
4
|
+
from ....M2.AUTOSARTemplates.SystemTemplate.SecureCommunication import CryptoServiceMapping
|
|
5
|
+
from ....M2.AUTOSARTemplates.SystemTemplate.RteEventToOsTaskMapping import AppOsTaskProxyToEcuTaskProxyMapping
|
|
3
6
|
from ....M2.AUTOSARTemplates.SystemTemplate.EcuResourceMapping import ECUMapping
|
|
4
7
|
from ....M2.AUTOSARTemplates.SystemTemplate.InstanceRefs import ComponentInSystemInstanceRef
|
|
5
|
-
from ....M2.AUTOSARTemplates.SystemTemplate.SWmapping import SwcToImplMapping
|
|
8
|
+
from ....M2.AUTOSARTemplates.SystemTemplate.SWmapping import ApplicationPartitionToEcuPartitionMapping, SwcToImplMapping
|
|
6
9
|
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
7
10
|
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import ARElement, Identifiable
|
|
8
|
-
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import PositiveInteger, RefType
|
|
11
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ByteOrderEnum, PositiveInteger, RefType
|
|
12
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import RevisionLabelString, TRefType
|
|
9
13
|
|
|
10
14
|
|
|
11
15
|
class SwcToEcuMapping(Identifiable):
|
|
@@ -46,34 +50,67 @@ class SwcToEcuMapping(Identifiable):
|
|
|
46
50
|
return self
|
|
47
51
|
|
|
48
52
|
|
|
53
|
+
class ComManagementMapping(Identifiable):
|
|
54
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
55
|
+
super().__init__(parent, short_name)
|
|
56
|
+
|
|
57
|
+
self.comManagementGroupRefs = [] # type: List[RefType]
|
|
58
|
+
self.comManagementPortGroupRefs = [] # type: List[RefType]
|
|
59
|
+
self.physicalChannelRef = None # type: RefType
|
|
60
|
+
|
|
61
|
+
def getComManagementGroupRefs(self):
|
|
62
|
+
return self.comManagementGroupRefs
|
|
63
|
+
|
|
64
|
+
def addComManagementGroupRef(self, value):
|
|
65
|
+
if value is not None:
|
|
66
|
+
self.comManagementGroupRefs.append(value)
|
|
67
|
+
return self
|
|
68
|
+
|
|
69
|
+
def getComManagementPortGroupRefs(self):
|
|
70
|
+
return self.comManagementPortGroupRefs
|
|
71
|
+
|
|
72
|
+
def addComManagementPortGroupRef(self, value):
|
|
73
|
+
if value is not None:
|
|
74
|
+
self.comManagementPortGroupRefs.append(value)
|
|
75
|
+
return self
|
|
76
|
+
|
|
77
|
+
def getPhysicalChannelRef(self):
|
|
78
|
+
return self.physicalChannelRef
|
|
79
|
+
|
|
80
|
+
def setPhysicalChannelRef(self, value):
|
|
81
|
+
if value is not None:
|
|
82
|
+
self.physicalChannelRef = value
|
|
83
|
+
return self
|
|
84
|
+
|
|
85
|
+
|
|
49
86
|
class SystemMapping(Identifiable):
|
|
50
87
|
def __init__(self, parent: ARObject, short_name: str):
|
|
51
88
|
super().__init__(parent, short_name)
|
|
52
89
|
|
|
53
|
-
self.applicationPartitionToEcuPartitionMappings = []
|
|
54
|
-
self.appOsTaskProxyToEcuTaskProxyMappings = []
|
|
55
|
-
self.comManagementMappings = []
|
|
56
|
-
self.cryptoServiceMappings = []
|
|
57
|
-
self.dataMappings = []
|
|
58
|
-
self.ddsISignalToTopicMappings = []
|
|
90
|
+
self.applicationPartitionToEcuPartitionMappings = [] # type: List[ApplicationPartitionToEcuPartitionMapping]
|
|
91
|
+
self.appOsTaskProxyToEcuTaskProxyMappings = [] # type: List[AppOsTaskProxyToEcuTaskProxyMapping]
|
|
92
|
+
self.comManagementMappings = [] # type: List[ComManagementMapping]
|
|
93
|
+
self.cryptoServiceMappings = [] # type: List[CryptoServiceMapping]
|
|
94
|
+
self.dataMappings = [] # type: List[DataMapping]
|
|
95
|
+
self.ddsISignalToTopicMappings = [] # type: List[DdsCpISignalToDdsTopicMapping]
|
|
59
96
|
self.ecuResourceMappings = [] # type: List[ECUMapping]
|
|
60
|
-
self.j1939ControllerApplicationToJ1939NmNodeMappings = []
|
|
61
|
-
self.mappingConstraints = []
|
|
62
|
-
self.pncMappings = []
|
|
63
|
-
self.portElementToComResourceMappings = []
|
|
64
|
-
self.resourceEstimations = []
|
|
65
|
-
self.resourceToApplicationPartitionMappings = []
|
|
66
|
-
self.rteEventSeparations = []
|
|
67
|
-
self.rteEventToOsTaskProxyMappings = []
|
|
68
|
-
self.signalPathConstraints = []
|
|
69
|
-
self.softwareClusterToApplicationPartitionMappings = []
|
|
70
|
-
self.softwareClusterToResourceMappings = []
|
|
71
|
-
self.swClusterMappings = []
|
|
72
|
-
self.swcToApplicationPartitionMappings = []
|
|
97
|
+
self.j1939ControllerApplicationToJ1939NmNodeMappings = [] # type: List[J1939ControllerApplicationToJ1939NmNodeMapping]
|
|
98
|
+
self.mappingConstraints = [] # type: List[MappingConstraint]
|
|
99
|
+
self.pncMappings = [] # type: List[PncMapping]
|
|
100
|
+
self.portElementToComResourceMappings = [] # type: List[PortElementToCommunicationResourceMapping]
|
|
101
|
+
self.resourceEstimations = [] # type: List[EcuResourceEstimation]
|
|
102
|
+
self.resourceToApplicationPartitionMappings = [] # type: List[CpSoftwareClusterResourceToApplicationPartitionMapping]
|
|
103
|
+
self.rteEventSeparations = [] # type: List[RteEventInSystemSeparation]
|
|
104
|
+
self.rteEventToOsTaskProxyMappings = [] # type: List[RteEventInSystemToOsTaskProxyMapping]
|
|
105
|
+
self.signalPathConstraints = [] # type: List[SignalPathConstraint]
|
|
106
|
+
self.softwareClusterToApplicationPartitionMappings = [] # type: List[CpSoftwareClusterToApplicationPartitionMapping]
|
|
107
|
+
self.softwareClusterToResourceMappings = [] # type: List[CpSoftwareClusterToResourceMapping]
|
|
108
|
+
self.swClusterMappings = [] # type: List[CpSoftwareClusterToEcuInstanceMapping]
|
|
109
|
+
self.swcToApplicationPartitionMappings = [] # type: List[SwcToApplicationPartitionMapping]
|
|
73
110
|
self.swImplMappings = [] # type: List[SwcToImplMapping]
|
|
74
111
|
self.swMappings = [] # type: List[SwcToEcuMapping]
|
|
75
|
-
self.systemSignalGroupToComResourceMappings = []
|
|
76
|
-
self.systemSignalToComResourceMappings = []
|
|
112
|
+
self.systemSignalGroupToComResourceMappings = [] # type: List[SystemSignalGroupToCommunicationResourceMapping]
|
|
113
|
+
self.systemSignalToComResourceMappings = [] # type: List[SystemSignalToCommunicationResourceMapping]
|
|
77
114
|
|
|
78
115
|
def getApplicationPartitionToEcuPartitionMappings(self):
|
|
79
116
|
return self.applicationPartitionToEcuPartitionMappings
|
|
@@ -232,7 +269,7 @@ class SystemMapping(Identifiable):
|
|
|
232
269
|
return self.swMappings
|
|
233
270
|
|
|
234
271
|
def getSwcToEcuMappings(self) -> List[SwcToEcuMapping]:
|
|
235
|
-
return list(sorted(filter(lambda a: isinstance(a, SwcToEcuMapping), self.elements
|
|
272
|
+
return list(sorted(filter(lambda a: isinstance(a, SwcToEcuMapping), self.elements), key=lambda o: o.short_name))
|
|
236
273
|
|
|
237
274
|
def createSwcToEcuMapping(self, short_name: str) -> SwcToEcuMapping:
|
|
238
275
|
if short_name not in self.elements:
|
|
@@ -286,22 +323,37 @@ class RootSwCompositionPrototype(Identifiable):
|
|
|
286
323
|
return self
|
|
287
324
|
|
|
288
325
|
|
|
326
|
+
class J1939SharedAddressCluster(Identifiable):
|
|
327
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
328
|
+
super().__init__(parent, short_name)
|
|
329
|
+
|
|
330
|
+
self.participatingJ1939ClusterRefs = [] # type: List[RefType]
|
|
331
|
+
|
|
332
|
+
def getParticipatingJ1939ClusterRefs(self):
|
|
333
|
+
return self.participatingJ1939ClusterRefs
|
|
334
|
+
|
|
335
|
+
def addParticipatingJ1939ClusterRef(self, value):
|
|
336
|
+
if value is not None:
|
|
337
|
+
self.participatingJ1939ClusterRefs.append(value)
|
|
338
|
+
return self
|
|
339
|
+
|
|
340
|
+
|
|
289
341
|
class System(ARElement):
|
|
290
342
|
def __init__(self, parent: ARObject, short_name: str):
|
|
291
343
|
super().__init__(parent, short_name)
|
|
292
344
|
|
|
293
345
|
self.clientIdDefinitionSetRefs = [] # type: List[RefType]
|
|
294
|
-
self.containerIPduHeaderByteOrder = None
|
|
295
|
-
self.ecuExtractVersion = None
|
|
346
|
+
self.containerIPduHeaderByteOrder = None # type: ByteOrderEnum
|
|
347
|
+
self.ecuExtractVersion = None # type: RevisionLabelString
|
|
296
348
|
self.fibexElements = [] # type: List[RefType]
|
|
297
349
|
self.interpolationRoutineMappingSetRefs = [] # type: List[RefType]
|
|
298
|
-
self.j1939SharedAddressClusters = []
|
|
350
|
+
self.j1939SharedAddressClusters = [] # type: List[J1939SharedAddressCluster]
|
|
299
351
|
self.mappings = [] # type: List[SystemMapping]
|
|
300
352
|
self.pncVectorLength = None # type: PositiveInteger
|
|
301
353
|
self.pncVectorOffset = None # type: PositiveInteger
|
|
302
354
|
self.rootSoftwareComposition = None # type: RootSwCompositionPrototype
|
|
303
|
-
self.
|
|
304
|
-
self.systemDocumentation = []
|
|
355
|
+
self.swClusterRefs = [] # type: List[RefType]
|
|
356
|
+
self.systemDocumentation = [] # type: Chapter
|
|
305
357
|
self.systemVersion = None # type: RevisionLabelString
|
|
306
358
|
|
|
307
359
|
def getClientIdDefinitionSetRefs(self):
|
|
@@ -349,16 +401,16 @@ class System(ARElement):
|
|
|
349
401
|
return self
|
|
350
402
|
|
|
351
403
|
def getMappings(self) -> List[SystemMapping]:
|
|
352
|
-
return list(sorted(filter(lambda a: isinstance(a, SystemMapping), self.elements
|
|
404
|
+
return list(sorted(filter(lambda a: isinstance(a, SystemMapping), self.elements), key=lambda o: o.short_name))
|
|
353
405
|
|
|
354
406
|
def getSystemMappings(self) -> List[SystemMapping]:
|
|
355
|
-
return list(sorted(filter(lambda a: isinstance(a, SystemMapping), self.elements
|
|
407
|
+
return list(sorted(filter(lambda a: isinstance(a, SystemMapping), self.elements), key=lambda o: o.short_name))
|
|
356
408
|
|
|
357
409
|
def createSystemMapping(self, short_name) -> SystemMapping:
|
|
358
|
-
if
|
|
410
|
+
if not self.IsElementExists(short_name):
|
|
359
411
|
mapping = SystemMapping(self, short_name)
|
|
360
|
-
self.
|
|
361
|
-
return self.
|
|
412
|
+
self.addElement(mapping)
|
|
413
|
+
return self.getElement(short_name, SystemMapping)
|
|
362
414
|
|
|
363
415
|
def getPncVectorLength(self):
|
|
364
416
|
return self.pncVectorLength
|
|
@@ -384,11 +436,11 @@ class System(ARElement):
|
|
|
384
436
|
self.rootSoftwareComposition = prototype
|
|
385
437
|
return self.getElement(short_name)
|
|
386
438
|
|
|
387
|
-
def
|
|
388
|
-
return self.
|
|
439
|
+
def getSwClusterRefs(self):
|
|
440
|
+
return self.swClusterRefs
|
|
389
441
|
|
|
390
|
-
def
|
|
391
|
-
self.
|
|
442
|
+
def addSwClusterRef(self, value):
|
|
443
|
+
self.swClusterRefs.append(value)
|
|
392
444
|
return self
|
|
393
445
|
|
|
394
446
|
def getSystemDocumentation(self):
|