armodel 1.7.8__py3-none-any.whl → 1.8.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- armodel/cli/arxml_format_cli.py +1 -0
- armodel/models/M2/AUTOSARTemplates/AutosarTopLevelStructure.py +71 -11
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswBehavior.py +102 -12
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswInterfaces.py +80 -9
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswOverview.py +17 -10
- armodel/models/M2/AUTOSARTemplates/CommonStructure/Implementation.py +10 -8
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ImplementationDataTypes.py +30 -28
- armodel/models/M2/AUTOSARTemplates/CommonStructure/InternalBehavior.py +7 -5
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ModeDeclaration.py +38 -3
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ServiceNeeds.py +96 -18
- armodel/models/M2/AUTOSARTemplates/CommonStructure/StandardizationTemplate/BlueprintDedicated/PortPrototypeBlueprint.py +73 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/StandardizationTemplate/BlueprintDedicated/__init__.py +0 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/StandardizationTemplate/Keyword.py +45 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/StandardizationTemplate/__init__.py +0 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/TriggerDeclaration.py +27 -0
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ARPackage.py +33 -4
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ElementCollection.py +73 -0
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/PrimitiveTypes.py +40 -14
- armodel/models/M2/AUTOSARTemplates/GenericStructure/LifeCycles.py +151 -1
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Components/__init__.py +4 -1
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/PortInterface/__init__.py +55 -12
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SoftwareComponentDocumentation.py +80 -0
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/RTEEvents.py +11 -1
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ServiceMapping.py +34 -10
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/DataMapping.py +11 -10
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Ethernet/EthernetTopology.py +18 -6
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/FibexCore/CoreTopology.py +8 -2
- 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 +84 -32
- 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 +4 -0
- armodel/models/utils/__init__.py +0 -0
- armodel/models/utils/uuid_mgr.py +23 -0
- armodel/parser/abstract_arxml_parser.py +10 -2
- armodel/parser/arxml_parser.py +332 -104
- armodel/tests/test_armodel/models/test_datatype.py +136 -138
- armodel/tests/test_armodel/parser/test_sw_components.py +266 -4
- armodel/writer/arxml_writer.py +337 -74
- {armodel-1.7.8.dist-info → armodel-1.8.0.dist-info}/METADATA +35 -1
- {armodel-1.7.8.dist-info → armodel-1.8.0.dist-info}/RECORD +51 -40
- {armodel-1.7.8.dist-info → armodel-1.8.0.dist-info}/LICENSE +0 -0
- {armodel-1.7.8.dist-info → armodel-1.8.0.dist-info}/WHEEL +0 -0
- {armodel-1.7.8.dist-info → armodel-1.8.0.dist-info}/entry_points.txt +0 -0
- {armodel-1.7.8.dist-info → armodel-1.8.0.dist-info}/top_level.txt +0 -0
|
@@ -9,7 +9,7 @@ from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveT
|
|
|
9
9
|
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import PositiveInteger
|
|
10
10
|
from .....M2.AUTOSARTemplates.SWComponentTemplate.Datatype.DataPrototypes import ParameterDataPrototype, VariableDataPrototype, AutosarDataPrototype
|
|
11
11
|
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARBoolean
|
|
12
|
-
from .....M2.AUTOSARTemplates.CommonStructure.ModeDeclaration import ModeDeclarationGroupPrototype
|
|
12
|
+
from .....M2.AUTOSARTemplates.CommonStructure.ModeDeclaration import ModeDeclarationGroupPrototype, ModeDeclarationGroupPrototypeMapping
|
|
13
13
|
from .....M2.AUTOSARTemplates.GenericStructure.AbstractStructure import AtpType
|
|
14
14
|
from .....M2.AUTOSARTemplates.GenericStructure.AbstractStructure import AtpFeature
|
|
15
15
|
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import RefType
|
|
@@ -452,23 +452,23 @@ class ClientServerInterfaceMapping(PortInterfaceMapping):
|
|
|
452
452
|
def __init__(self, parent: ARObject, short_name: str):
|
|
453
453
|
super().__init__(parent, short_name)
|
|
454
454
|
|
|
455
|
-
# type: ClientServerApplicationErrorMapping
|
|
456
|
-
self.
|
|
457
|
-
# type: ClientServerOperationMapping
|
|
458
|
-
self.operationMappings = []
|
|
455
|
+
self.errorMappings = [] # type: List[ClientServerApplicationErrorMapping]
|
|
456
|
+
self.operationMappings = [] # type: List[ClientServerOperationMapping]
|
|
459
457
|
|
|
460
458
|
def getErrorMappings(self):
|
|
461
459
|
return self.errorMappings
|
|
462
460
|
|
|
463
|
-
def
|
|
464
|
-
|
|
461
|
+
def addErrorMapping(self, value):
|
|
462
|
+
if value is not None:
|
|
463
|
+
self.errorMappings.append(value)
|
|
465
464
|
return self
|
|
466
465
|
|
|
467
466
|
def getOperationMappings(self):
|
|
468
467
|
return self.operationMappings
|
|
469
468
|
|
|
470
|
-
def
|
|
471
|
-
|
|
469
|
+
def addOperationMapping(self, value):
|
|
470
|
+
if value is not None:
|
|
471
|
+
self.operationMappings.append(value)
|
|
472
472
|
return self
|
|
473
473
|
|
|
474
474
|
|
|
@@ -485,7 +485,29 @@ class VariableAndParameterInterfaceMapping(PortInterfaceMapping):
|
|
|
485
485
|
self.dataMappings.append(value)
|
|
486
486
|
return self
|
|
487
487
|
|
|
488
|
-
|
|
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
|
+
|
|
489
511
|
class PortInterfaceMappingSet(ARElement):
|
|
490
512
|
def __init__(self, parent: ARObject, short_name: str):
|
|
491
513
|
super().__init__(parent, short_name)
|
|
@@ -495,12 +517,33 @@ class PortInterfaceMappingSet(ARElement):
|
|
|
495
517
|
def getPortInterfaceMappings(self):
|
|
496
518
|
return self.portInterfaceMappings
|
|
497
519
|
|
|
498
|
-
def createVariableAndParameterInterfaceMapping(self, short_name):
|
|
499
|
-
if (
|
|
520
|
+
def createVariableAndParameterInterfaceMapping(self, short_name: str):
|
|
521
|
+
if (not self.IsElementExists(short_name)):
|
|
500
522
|
mapping = VariableAndParameterInterfaceMapping(self, short_name)
|
|
501
523
|
self.addElement(mapping)
|
|
502
524
|
self.portInterfaceMappings.append(mapping)
|
|
503
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)
|
|
504
547
|
|
|
505
548
|
|
|
506
549
|
class TextTableMapping(ARObject):
|
|
@@ -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
|
|
@@ -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,13 @@
|
|
|
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 DltUserNeeds
|
|
4
|
+
from .....M2.AUTOSARTemplates.CommonStructure.ServiceNeeds import DiagnosticEventNeeds, DiagnosticRoutineNeeds, DiagnosticValueNeeds
|
|
5
|
+
from .....M2.AUTOSARTemplates.CommonStructure.ServiceNeeds import DtcStatusChangeNotificationNeeds, EcuStateMgrUserNeeds, NvBlockNeeds
|
|
6
|
+
from .....M2.AUTOSARTemplates.CommonStructure.ServiceNeeds import RoleBasedDataAssignment, ServiceNeeds, ServiceDependency
|
|
3
7
|
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
4
8
|
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import Identifier, RefType
|
|
5
|
-
|
|
9
|
+
|
|
10
|
+
|
|
6
11
|
class RoleBasedPortAssignment(ARObject):
|
|
7
12
|
def __init__(self):
|
|
8
13
|
super().__init__()
|
|
@@ -24,6 +29,7 @@ class RoleBasedPortAssignment(ARObject):
|
|
|
24
29
|
self.role = value
|
|
25
30
|
return self
|
|
26
31
|
|
|
32
|
+
|
|
27
33
|
class SwcServiceDependency(ServiceDependency):
|
|
28
34
|
def __init__(self, parent: ARObject, short_name: str):
|
|
29
35
|
super().__init__(parent, short_name)
|
|
@@ -44,53 +50,65 @@ class SwcServiceDependency(ServiceDependency):
|
|
|
44
50
|
return self._assigned_ports
|
|
45
51
|
|
|
46
52
|
def createNvBlockNeeds(self, short_name: str) -> NvBlockNeeds:
|
|
47
|
-
if (
|
|
53
|
+
if (not self.IsElementExists(short_name)):
|
|
48
54
|
needs = NvBlockNeeds(self, short_name)
|
|
49
55
|
self.addElement(needs)
|
|
50
56
|
return self.getElement(short_name)
|
|
51
57
|
|
|
52
58
|
def createDiagnosticCommunicationManagerNeeds(self, short_name: str) -> DiagnosticCommunicationManagerNeeds:
|
|
53
|
-
if (
|
|
59
|
+
if (not self.IsElementExists(short_name)):
|
|
54
60
|
needs = DiagnosticCommunicationManagerNeeds(self, short_name)
|
|
55
61
|
self.addElement(needs)
|
|
56
62
|
return self.getElement(short_name)
|
|
57
63
|
|
|
58
64
|
def createDiagnosticRoutineNeeds(self, short_name: str) -> DiagnosticRoutineNeeds:
|
|
59
|
-
if (
|
|
65
|
+
if (not self.IsElementExists(short_name)):
|
|
60
66
|
needs = DiagnosticRoutineNeeds(self, short_name)
|
|
61
67
|
self.addElement(needs)
|
|
62
68
|
return self.getElement(short_name)
|
|
63
69
|
|
|
64
70
|
def createDiagnosticValueNeeds(self, short_name: str) -> DiagnosticValueNeeds:
|
|
65
|
-
if (
|
|
71
|
+
if (not self.IsElementExists(short_name)):
|
|
66
72
|
needs = DiagnosticValueNeeds(self, short_name)
|
|
67
73
|
self.addElement(needs)
|
|
68
74
|
return self.getElement(short_name)
|
|
69
75
|
|
|
70
76
|
def createDiagnosticEventNeeds(self, short_name: str) -> DiagnosticEventNeeds:
|
|
71
|
-
if (
|
|
77
|
+
if (not self.IsElementExists(short_name)):
|
|
72
78
|
needs = DiagnosticEventNeeds(self, short_name)
|
|
73
79
|
self.addElement(needs)
|
|
74
80
|
return self.getElement(short_name)
|
|
75
81
|
|
|
76
82
|
def createDiagnosticEventInfoNeeds(self, short_name: str) -> DiagnosticEventInfoNeeds:
|
|
77
|
-
if (
|
|
83
|
+
if (not self.IsElementExists(short_name)):
|
|
78
84
|
needs = DiagnosticEventInfoNeeds(self, short_name)
|
|
79
85
|
self.addElement(needs)
|
|
80
86
|
return self.getElement(short_name)
|
|
81
87
|
|
|
82
88
|
def createCryptoServiceNeeds(self, short_name: str) -> CryptoServiceNeeds:
|
|
83
|
-
if (
|
|
89
|
+
if (not self.IsElementExists(short_name)):
|
|
84
90
|
needs = CryptoServiceNeeds(self, short_name)
|
|
85
91
|
self.addElement(needs)
|
|
86
92
|
return self.getElement(short_name)
|
|
87
93
|
|
|
88
94
|
def createEcuStateMgrUserNeeds(self, short_name: str) -> EcuStateMgrUserNeeds:
|
|
89
|
-
if (
|
|
95
|
+
if (not self.IsElementExists(short_name)):
|
|
90
96
|
needs = EcuStateMgrUserNeeds(self, short_name)
|
|
91
97
|
self.addElement(needs)
|
|
92
98
|
return self.getElement(short_name)
|
|
93
99
|
|
|
100
|
+
def createDtcStatusChangeNotificationNeeds(self, short_name: str) -> DtcStatusChangeNotificationNeeds:
|
|
101
|
+
if (not self.IsElementExists(short_name)):
|
|
102
|
+
needs = DtcStatusChangeNotificationNeeds(self, short_name)
|
|
103
|
+
self.addElement(needs)
|
|
104
|
+
return self.getElement(short_name)
|
|
105
|
+
|
|
106
|
+
def createDltUserNeeds(self, short_name: str) -> DltUserNeeds:
|
|
107
|
+
if (not self.IsElementExists(short_name)):
|
|
108
|
+
needs = DltUserNeeds(self, short_name)
|
|
109
|
+
self.addElement(needs)
|
|
110
|
+
return self.getElement(short_name)
|
|
111
|
+
|
|
94
112
|
def getNvBlockNeeds(self) -> List[NvBlockNeeds]:
|
|
95
113
|
return sorted(filter(lambda c: isinstance(c, NvBlockNeeds), self.elements.values()), key=lambda e: e.short_name)
|
|
96
114
|
|
|
@@ -108,6 +126,12 @@ class SwcServiceDependency(ServiceDependency):
|
|
|
108
126
|
|
|
109
127
|
def getEcuStateMgrUserNeeds(self) -> List[EcuStateMgrUserNeeds]:
|
|
110
128
|
return sorted(filter(lambda c: isinstance(c, EcuStateMgrUserNeeds), self.elements.values()), key=lambda e: e.short_name)
|
|
129
|
+
|
|
130
|
+
def getDtcStatusChangeNotificationNeeds(self) -> List[DtcStatusChangeNotificationNeeds]:
|
|
131
|
+
return sorted(filter(lambda c: isinstance(c, DtcStatusChangeNotificationNeeds), self.elements.values()), key=lambda e: e.short_name)
|
|
132
|
+
|
|
133
|
+
def getDltUserNeeds(self) -> List[DltUserNeeds]:
|
|
134
|
+
return sorted(filter(lambda c: isinstance(c, DltUserNeeds), self.elements.values()), key=lambda e: e.short_name)
|
|
111
135
|
|
|
112
136
|
def getServiceNeeds(self) -> List[ServiceNeeds]:
|
|
113
137
|
return sorted(filter(lambda c: isinstance(c, ServiceNeeds), self.elements.values()), key=lambda e: e.short_name)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from abc import ABCMeta
|
|
2
2
|
from typing import List
|
|
3
3
|
|
|
4
|
+
from ....M2.AUTOSARTemplates.SystemTemplate.InstanceRefs import VariableDataPrototypeInSystemInstanceRef
|
|
4
5
|
from ....M2.AUTOSARTemplates.SWComponentTemplate.PortInterface import TextTableMapping
|
|
5
6
|
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import Integer, RefType
|
|
6
7
|
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
@@ -29,43 +30,43 @@ class SenderReceiverToSignalMapping(DataMapping):
|
|
|
29
30
|
super().__init__()
|
|
30
31
|
|
|
31
32
|
self.communicationDirection = None # type: CommunicationDirectionType
|
|
32
|
-
self.dataElementIRef = None
|
|
33
|
-
self.senderToSignalTextTableMapping = None
|
|
34
|
-
self.signalToReceiverTextTableMapping = None
|
|
35
|
-
self.systemSignalRef = None
|
|
33
|
+
self.dataElementIRef = None # type: VariableDataPrototypeInSystemInstanceRef
|
|
34
|
+
self.senderToSignalTextTableMapping = None # type: TextTableMapping
|
|
35
|
+
self.signalToReceiverTextTableMapping = None # type: TextTableMapping
|
|
36
|
+
self.systemSignalRef = None # type: RefType
|
|
36
37
|
|
|
37
38
|
def getCommunicationDirection(self):
|
|
38
39
|
return self.communicationDirection
|
|
39
40
|
|
|
40
|
-
def setCommunicationDirection(self, value):
|
|
41
|
+
def setCommunicationDirection(self, value: CommunicationDirectionType):
|
|
41
42
|
self.communicationDirection = value
|
|
42
43
|
return self
|
|
43
44
|
|
|
44
45
|
def getDataElementIRef(self):
|
|
45
46
|
return self.dataElementIRef
|
|
46
47
|
|
|
47
|
-
def setDataElementIRef(self, value):
|
|
48
|
+
def setDataElementIRef(self, value: VariableDataPrototypeInSystemInstanceRef):
|
|
48
49
|
self.dataElementIRef = value
|
|
49
50
|
return self
|
|
50
51
|
|
|
51
52
|
def getSenderToSignalTextTableMapping(self):
|
|
52
53
|
return self.senderToSignalTextTableMapping
|
|
53
54
|
|
|
54
|
-
def setSenderToSignalTextTableMapping(self, value):
|
|
55
|
+
def setSenderToSignalTextTableMapping(self, value: TextTableMapping):
|
|
55
56
|
self.senderToSignalTextTableMapping = value
|
|
56
57
|
return self
|
|
57
58
|
|
|
58
59
|
def getSignalToReceiverTextTableMapping(self):
|
|
59
60
|
return self.signalToReceiverTextTableMapping
|
|
60
61
|
|
|
61
|
-
def setSignalToReceiverTextTableMapping(self, value):
|
|
62
|
+
def setSignalToReceiverTextTableMapping(self, value: TextTableMapping):
|
|
62
63
|
self.signalToReceiverTextTableMapping = value
|
|
63
64
|
return self
|
|
64
65
|
|
|
65
66
|
def getSystemSignalRef(self):
|
|
66
67
|
return self.systemSignalRef
|
|
67
68
|
|
|
68
|
-
def setSystemSignalRef(self, value):
|
|
69
|
+
def setSystemSignalRef(self, value: RefType):
|
|
69
70
|
self.systemSignalRef = value
|
|
70
71
|
return self
|
|
71
72
|
|
|
@@ -232,7 +233,7 @@ class SenderReceiverToSignalGroupMapping(DataMapping):
|
|
|
232
233
|
def __init__(self):
|
|
233
234
|
super().__init__()
|
|
234
235
|
|
|
235
|
-
self.dataElementIRef = None # type:
|
|
236
|
+
self.dataElementIRef = None # type: VariableDataPrototypeInSystemInstanceRef
|
|
236
237
|
self.signalGroupRef = None # type: RefType
|
|
237
238
|
self.typeMapping = None # type: SenderRecCompositeTypeMapping
|
|
238
239
|
|
|
@@ -2,9 +2,12 @@ from abc import ABCMeta
|
|
|
2
2
|
from typing import List
|
|
3
3
|
|
|
4
4
|
from ......M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Identifiable, Referrable
|
|
5
|
-
from ......M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import Boolean, Integer, MacAddressString, PositiveInteger
|
|
5
|
+
from ......M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import Boolean, Integer, MacAddressString, PositiveInteger
|
|
6
|
+
from ......M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import RefType, TimeValue
|
|
6
7
|
from ......M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
7
|
-
from ......M2.AUTOSARTemplates.SystemTemplate.Fibex.FibexCore.CoreTopology import CommunicationCluster, CommunicationConnector
|
|
8
|
+
from ......M2.AUTOSARTemplates.SystemTemplate.Fibex.FibexCore.CoreTopology import CommunicationCluster, CommunicationConnector
|
|
9
|
+
from ......M2.AUTOSARTemplates.SystemTemplate.Fibex.FibexCore.CoreTopology import CommunicationController
|
|
10
|
+
|
|
8
11
|
|
|
9
12
|
class MacMulticastGroup(Identifiable):
|
|
10
13
|
def __init__(self, parent, short_name):
|
|
@@ -19,6 +22,8 @@ class MacMulticastGroup(Identifiable):
|
|
|
19
22
|
if value is not None:
|
|
20
23
|
self.macMulticastAddress = value
|
|
21
24
|
return self
|
|
25
|
+
|
|
26
|
+
|
|
22
27
|
class EthernetCluster(CommunicationCluster):
|
|
23
28
|
def __init__(self, parent: ARObject, short_name: str):
|
|
24
29
|
super().__init__(parent, short_name)
|
|
@@ -62,13 +67,15 @@ class EthernetCluster(CommunicationCluster):
|
|
|
62
67
|
self.macMulticastGroups.append(group)
|
|
63
68
|
return self.getElement(short_name)
|
|
64
69
|
|
|
65
|
-
|
|
70
|
+
|
|
71
|
+
class CouplingPortStructuralElement(Identifiable, metaclass=ABCMeta):
|
|
66
72
|
def __init__(self, parent: ARObject, short_name: str):
|
|
67
|
-
if type(self)
|
|
73
|
+
if type(self) is CouplingPortStructuralElement:
|
|
68
74
|
raise NotImplementedError("CouplingPortStructuralElement is an abstract class.")
|
|
69
75
|
|
|
70
76
|
super().__init__(parent, short_name)
|
|
71
77
|
|
|
78
|
+
|
|
72
79
|
class CouplingPortFifo(CouplingPortStructuralElement):
|
|
73
80
|
def __init__(self, parent: ARObject, short_name: str):
|
|
74
81
|
super().__init__(parent, short_name)
|
|
@@ -109,7 +116,8 @@ class CouplingPortFifo(CouplingPortStructuralElement):
|
|
|
109
116
|
if value is not None:
|
|
110
117
|
self.trafficClassPreemptionSupport = value
|
|
111
118
|
return self
|
|
112
|
-
|
|
119
|
+
|
|
120
|
+
|
|
113
121
|
class CouplingPortScheduler(CouplingPortStructuralElement):
|
|
114
122
|
def __init__(self, parent, short_name):
|
|
115
123
|
super().__init__(parent, short_name)
|
|
@@ -133,6 +141,7 @@ class CouplingPortScheduler(CouplingPortStructuralElement):
|
|
|
133
141
|
self.predecessorRefs.append(value)
|
|
134
142
|
return self
|
|
135
143
|
|
|
144
|
+
|
|
136
145
|
class EthernetPriorityRegeneration(Referrable):
|
|
137
146
|
def __init__(self, parent, short_name):
|
|
138
147
|
super().__init__(parent, short_name)
|
|
@@ -253,6 +262,7 @@ class CouplingPortDetails(ARObject):
|
|
|
253
262
|
self.vlanTranslationTables = value
|
|
254
263
|
return self
|
|
255
264
|
|
|
265
|
+
|
|
256
266
|
class VlanMembership(ARObject):
|
|
257
267
|
def __init__(self):
|
|
258
268
|
super().__init__()
|
|
@@ -427,7 +437,6 @@ class CouplingPort(Identifiable):
|
|
|
427
437
|
return self
|
|
428
438
|
|
|
429
439
|
|
|
430
|
-
|
|
431
440
|
class EthernetCommunicationController(CommunicationController):
|
|
432
441
|
def __init__(self, parent: ARObject, short_name: str):
|
|
433
442
|
super().__init__(parent, short_name)
|
|
@@ -500,6 +509,7 @@ class EthernetCommunicationController(CommunicationController):
|
|
|
500
509
|
self.slaveQualifiedUnexpectedLinkDownTime = value
|
|
501
510
|
return self
|
|
502
511
|
|
|
512
|
+
|
|
503
513
|
class EthernetCommunicationConnector(CommunicationConnector):
|
|
504
514
|
def __init__(self, parent: ARObject, short_name: str):
|
|
505
515
|
super().__init__(parent, short_name)
|
|
@@ -554,6 +564,7 @@ class EthernetCommunicationConnector(CommunicationConnector):
|
|
|
554
564
|
self.pathMtuTimeout = value
|
|
555
565
|
return self
|
|
556
566
|
|
|
567
|
+
|
|
557
568
|
class RequestResponseDelay(ARObject):
|
|
558
569
|
def __init__(self):
|
|
559
570
|
super().__init__()
|
|
@@ -577,6 +588,7 @@ class RequestResponseDelay(ARObject):
|
|
|
577
588
|
self.minValue = value
|
|
578
589
|
return self
|
|
579
590
|
|
|
591
|
+
|
|
580
592
|
class InitialSdDelayConfig(ARObject):
|
|
581
593
|
def __init__(self):
|
|
582
594
|
super().__init__()
|
|
@@ -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):
|
|
@@ -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
|