armodel 1.6.3__py3-none-any.whl → 1.7.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_dump_cli.py +7 -7
- armodel/cli/arxml_format_cli.py +14 -12
- armodel/cli/connector2xlsx_cli.py +2 -3
- armodel/cli/connector_update_cli.py +1 -4
- armodel/cli/memory_section_cli.py +2 -2
- armodel/cli/swc_list_cli.py +2 -3
- armodel/cli/system_signal_cli.py +2 -2
- armodel/lib/sw_component.py +2 -2
- armodel/lib/system_signal.py +1 -3
- armodel/models/M2/AUTOSARTemplates/AutosarTopLevelStructure.py +5 -10
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswBehavior.py +9 -11
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswImplementation.py +51 -12
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswInterfaces.py +3 -3
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswOverview.py +5 -6
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/__init__.py +4 -1
- armodel/models/M2/AUTOSARTemplates/CommonStructure/Filter.py +86 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/Implementation.py +186 -29
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ImplementationDataTypes.py +7 -10
- armodel/models/M2/AUTOSARTemplates/CommonStructure/InternalBehavior.py +21 -11
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ModeDeclaration.py +3 -3
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ResourceConsumption/MemorySectionUsage.py +3 -6
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ResourceConsumption/__init__.py +3 -5
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ServiceNeeds.py +10 -6
- armodel/models/M2/AUTOSARTemplates/CommonStructure/SwcBswMapping.py +3 -4
- armodel/models/M2/AUTOSARTemplates/CommonStructure/SwcInternalBehavior/ModeDeclarationGroup.py +2 -5
- armodel/models/M2/AUTOSARTemplates/CommonStructure/SwcInternalBehavior/__init__.py +0 -1
- armodel/models/M2/AUTOSARTemplates/CommonStructure/Timing/TimingConstraint/ExecutionOrderConstraint.py +45 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/Timing/TimingConstraint/TimingConstraint.py +24 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/Timing/TimingConstraint/TimingExtensions.py +33 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/TriggerDeclaration.py +2 -2
- armodel/models/M2/AUTOSARTemplates/CommonStructure/__init__.py +4 -6
- armodel/models/M2/AUTOSARTemplates/{ecuc_description_template.py → ECUCDescriptionTemplate.py} +6 -11
- armodel/models/M2/AUTOSARTemplates/GenericStructure/AbstractStructure.py +3 -6
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ARPackage.py +42 -36
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/EngineeringObject.py +2 -5
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/Identifiable.py +11 -16
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/PrimitiveTypes.py +87 -4
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/__init__.py +0 -1
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Communication.py +21 -8
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Components/InstanceRefs.py +2 -4
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Components/__init__.py +114 -12
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Composition/InstanceRefs.py +2 -5
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Composition/__init__.py +4 -62
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Datatype/DataPrototypes.py +6 -8
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Datatype/Datatypes.py +7 -7
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Datatype/__init__.py +0 -1
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/{port_interface/instance_refs.py → PortInterface/InstanceRefs.py} +2 -2
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/{port_interface → PortInterface}/__init__.py +10 -10
- armodel/models/{rpt_scenario.py → M2/AUTOSARTemplates/SWComponentTemplate/RPTScenario.py} +4 -6
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcImplementation.py +29 -6
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/DataElements.py +6 -6
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/IncludedDataTypes.py +2 -2
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/InstanceRefsUsage.py +3 -3
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ModeDeclarationGroup.py +28 -4
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/PerInstanceMemory.py +3 -3
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/PortAPIOptions.py +86 -0
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/RTEEvents.py +174 -0
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ServerCall.py +3 -4
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ServiceMapping.py +37 -3
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/Trigger.py +2 -4
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/__init__.py +166 -10
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/{data_mapping.py → DataMapping.py} +2 -3
- armodel/models/{fibex/can_communication.py → M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Can/CanCommunication.py} +3 -4
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Can/CanTopology.py +173 -0
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Ethernet/EthernetFrame.py +14 -0
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Ethernet/ServiceInstances.py +116 -0
- armodel/models/{fibex/lin_communication.py → M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Lin/LinCommunication.py} +4 -5
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Lin/__init__.py +0 -0
- armodel/models/{fibex/fibex_4_multiplatform.py → M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Multiplatform.py} +5 -6
- armodel/models/{fibex/fibex_core/core_communication.py → M2/AUTOSARTemplates/SystemTemplate/Fibex/FibexCore/CoreCommunication.py} +6 -14
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/FibexCore/CoreTopology.py +388 -0
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/FibexCore/EcuInstance.py +223 -0
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/FibexCore/Timing.py +177 -0
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/FibexCore/__init__.py +0 -0
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/__init__.py +0 -0
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/InstanceRefs.py +39 -2
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/{network_management.py → NetworkManagement.py} +5 -10
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/TransportProtocols.py +6 -0
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/__init__.py +86 -17
- armodel/models/M2/MSR/AsamHdo/AdminData.py +2 -5
- armodel/models/M2/MSR/AsamHdo/BaseTypes.py +3 -3
- armodel/models/M2/MSR/AsamHdo/ComputationMethod.py +5 -6
- armodel/models/M2/MSR/AsamHdo/Constraints/GlobalConstraints.py +3 -4
- armodel/models/M2/MSR/AsamHdo/Constraints/__init__.py +0 -1
- armodel/models/M2/MSR/AsamHdo/SpecialData.py +1 -4
- armodel/models/M2/MSR/AsamHdo/Units.py +3 -6
- armodel/models/M2/MSR/AsamHdo/__init__.py +0 -1
- armodel/models/M2/MSR/CalibrationData/CalibrationValue.py +3 -7
- armodel/models/M2/MSR/CalibrationData/__init__.py +0 -1
- armodel/models/M2/MSR/DataDictionary/AuxillaryObjects.py +3 -6
- armodel/models/M2/MSR/DataDictionary/Axis.py +3 -3
- armodel/models/M2/MSR/DataDictionary/CalibrationParameter.py +3 -3
- armodel/models/M2/MSR/DataDictionary/DataDefProperties.py +5 -6
- armodel/models/M2/MSR/DataDictionary/RecordLayout.py +4 -4
- armodel/models/M2/MSR/DataDictionary/__init__.py +0 -1
- armodel/models/M2/MSR/Documentation/Annotation.py +4 -6
- armodel/models/M2/MSR/Documentation/BlockElements.py +2 -2
- armodel/models/M2/MSR/Documentation/TextModel/LanguageDataModel.py +1 -2
- armodel/models/M2/MSR/Documentation/TextModel/MultilanguageData.py +3 -6
- armodel/models/M2/MSR/Documentation/TextModel/__init__.py +0 -2
- armodel/models/M2/MSR/Documentation/__init__.py +1 -1
- armodel/models/M2/MSR/__init__.py +1 -1
- armodel/models/M2/__init__.py +0 -1
- armodel/models/__init__.py +57 -3
- armodel/parser/abstract_arxml_parser.py +50 -16
- armodel/parser/arxml_parser.py +285 -112
- armodel/parser/file_parser.py +2 -1
- armodel/report/connector_xls_report.py +2 -1
- armodel/tests/test_armodel/models/test_ar_object.py +0 -2
- armodel/tests/test_armodel/models/test_ar_package.py +4 -4
- armodel/tests/test_armodel/models/test_data_prototype.py +1 -1
- armodel/tests/test_armodel/models/test_datatype.py +7 -7
- armodel/tests/test_armodel/models/test_port_interface.py +6 -6
- armodel/tests/test_armodel/parser/test_parse_bswmd.py +12 -12
- armodel/tests/test_armodel/parser/test_sw_components.py +1 -23
- armodel/tests/test_armodel/parser/test_system.py +3 -3
- armodel/writer/abstract_arxml_writer.py +10 -1
- armodel/writer/arxml_writer.py +249 -80
- {armodel-1.6.3.dist-info → armodel-1.7.0.dist-info}/METADATA +385 -366
- armodel-1.7.0.dist-info/RECORD +160 -0
- {armodel-1.6.3.dist-info → armodel-1.7.0.dist-info}/WHEEL +1 -1
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/transport_protocols.py +0 -7
- armodel/models/fibex/fibex_core/core_topology.py +0 -184
- armodel/models/sw_component.py +0 -390
- armodel/models/timing.py +0 -91
- armodel-1.6.3.dist-info/RECORD +0 -148
- /armodel/models/{fibex → M2/AUTOSARTemplates/CommonStructure/Timing/TimingConstraint}/__init__.py +0 -0
- /armodel/models/{fibex/fibex_4_can → M2/AUTOSARTemplates/CommonStructure/Timing}/__init__.py +0 -0
- /armodel/models/{fibex/fibex_4_lin → M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Can}/__init__.py +0 -0
- /armodel/models/{fibex/fibex_core → M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Ethernet}/__init__.py +0 -0
- {armodel-1.6.3.dist-info → armodel-1.7.0.dist-info}/LICENSE +0 -0
- {armodel-1.6.3.dist-info → armodel-1.7.0.dist-info}/entry_points.txt +0 -0
- {armodel-1.6.3.dist-info → armodel-1.7.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
from typing import List
|
|
2
|
+
from ......M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import Boolean, PositiveInteger, RefType, TimeValue
|
|
3
|
+
from ......M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses import Identifiable
|
|
4
|
+
from ......M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
5
|
+
|
|
6
|
+
'''
|
|
7
|
+
class SocketAddress(Identifiable):
|
|
8
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
9
|
+
super().__init__(parent, short_name)
|
|
10
|
+
|
|
11
|
+
self.allowedIPv6ExtHeadersRef = None # type: RefType
|
|
12
|
+
self.allowedTcpOptionsRef = None # type: RefType
|
|
13
|
+
self.applicationEndpoint = None # type: ApplicationEndpoint
|
|
14
|
+
self.connectorRef = None # type: RefType
|
|
15
|
+
self.differentiatedServiceField = None # type: PositiveInteger
|
|
16
|
+
self.flowLabel = None # type: PositiveInteger
|
|
17
|
+
self.multicastConnectorRefs = [] # type: List[RefType]
|
|
18
|
+
self.pathMtuDiscoveryEnabled = None # type: Boolean
|
|
19
|
+
self.pduCollectionMaxBufferSize = None # type: PositiveInteger
|
|
20
|
+
self.pduCollectionTimeout = None # type: TimeValue
|
|
21
|
+
self.staticSocketConnections = [] # type: List[StaticSocketConnection]
|
|
22
|
+
self.udpChecksumHandling = None # type: UdpChecksumCalculationEnum
|
|
23
|
+
|
|
24
|
+
def getAllowedIPv6ExtHeadersRef(self):
|
|
25
|
+
return self.allowedIPv6ExtHeadersRef
|
|
26
|
+
|
|
27
|
+
def setAllowedIPv6ExtHeadersRef(self, value):
|
|
28
|
+
self.allowedIPv6ExtHeadersRef = value
|
|
29
|
+
return self
|
|
30
|
+
|
|
31
|
+
def getAllowedTcpOptionsRef(self):
|
|
32
|
+
return self.allowedTcpOptionsRef
|
|
33
|
+
|
|
34
|
+
def setAllowedTcpOptionsRef(self, value):
|
|
35
|
+
self.allowedTcpOptionsRef = value
|
|
36
|
+
return self
|
|
37
|
+
|
|
38
|
+
def getApplicationEndpoint(self):
|
|
39
|
+
return self.applicationEndpoint
|
|
40
|
+
|
|
41
|
+
def setApplicationEndpoint(self, value):
|
|
42
|
+
self.applicationEndpoint = value
|
|
43
|
+
return self
|
|
44
|
+
|
|
45
|
+
def getConnectorRef(self):
|
|
46
|
+
return self.connectorRef
|
|
47
|
+
|
|
48
|
+
def setConnectorRef(self, value):
|
|
49
|
+
self.connectorRef = value
|
|
50
|
+
return self
|
|
51
|
+
|
|
52
|
+
def getDifferentiatedServiceField(self):
|
|
53
|
+
return self.differentiatedServiceField
|
|
54
|
+
|
|
55
|
+
def setDifferentiatedServiceField(self, value):
|
|
56
|
+
self.differentiatedServiceField = value
|
|
57
|
+
return self
|
|
58
|
+
|
|
59
|
+
def getFlowLabel(self):
|
|
60
|
+
return self.flowLabel
|
|
61
|
+
|
|
62
|
+
def setFlowLabel(self, value):
|
|
63
|
+
self.flowLabel = value
|
|
64
|
+
return self
|
|
65
|
+
|
|
66
|
+
def getMulticastConnectorRefs(self):
|
|
67
|
+
return self.multicastConnectorRefs
|
|
68
|
+
|
|
69
|
+
def addMulticastConnectorRef(self, value):
|
|
70
|
+
self.multicastConnectorRefs.append(value)
|
|
71
|
+
return self
|
|
72
|
+
|
|
73
|
+
def getPathMtuDiscoveryEnabled(self):
|
|
74
|
+
return self.pathMtuDiscoveryEnabled
|
|
75
|
+
|
|
76
|
+
def setPathMtuDiscoveryEnabled(self, value):
|
|
77
|
+
self.pathMtuDiscoveryEnabled = value
|
|
78
|
+
return self
|
|
79
|
+
|
|
80
|
+
def getPduCollectionMaxBufferSize(self):
|
|
81
|
+
return self.pduCollectionMaxBufferSize
|
|
82
|
+
|
|
83
|
+
def setPduCollectionMaxBufferSize(self, value):
|
|
84
|
+
self.pduCollectionMaxBufferSize = value
|
|
85
|
+
return self
|
|
86
|
+
|
|
87
|
+
def getPduCollectionTimeout(self):
|
|
88
|
+
return self.pduCollectionTimeout
|
|
89
|
+
|
|
90
|
+
def setPduCollectionTimeout(self, value):
|
|
91
|
+
self.pduCollectionTimeout = value
|
|
92
|
+
return self
|
|
93
|
+
|
|
94
|
+
def getStaticSocketConnections(self):
|
|
95
|
+
return self.staticSocketConnections
|
|
96
|
+
|
|
97
|
+
def addStaticSocketConnection(self, value):
|
|
98
|
+
self.staticSocketConnections.append(value)
|
|
99
|
+
return self
|
|
100
|
+
|
|
101
|
+
def getUdpChecksumHandling(self):
|
|
102
|
+
return self.udpChecksumHandling
|
|
103
|
+
|
|
104
|
+
def setUdpChecksumHandling(self, value):
|
|
105
|
+
self.udpChecksumHandling = value
|
|
106
|
+
return self
|
|
107
|
+
'''
|
|
108
|
+
|
|
109
|
+
class SoAdConfig(ARObject):
|
|
110
|
+
def __init__(self):
|
|
111
|
+
super().__init__()
|
|
112
|
+
|
|
113
|
+
self.connection = None # type: SocketConnection
|
|
114
|
+
self.connectionBundle = None # type: SocketConnectionBundle
|
|
115
|
+
self.socketAddress = None # type: SocketAddress
|
|
116
|
+
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
from abc import ABCMeta
|
|
3
3
|
|
|
4
|
-
from
|
|
5
|
-
|
|
6
|
-
from
|
|
7
|
-
from
|
|
8
|
-
from .fibex_core.core_communication import Frame, FrameTriggering
|
|
4
|
+
from ......M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
5
|
+
from ......M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARNumerical
|
|
6
|
+
from ......M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARLiteral
|
|
7
|
+
from ......M2.AUTOSARTemplates.SystemTemplate.Fibex.FibexCore.CoreCommunication import Frame, FrameTriggering
|
|
9
8
|
|
|
10
9
|
class LinFrame(Frame):
|
|
11
10
|
__metaclass__ = ABCMeta
|
|
File without changes
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
from typing import List
|
|
2
2
|
|
|
3
|
-
from
|
|
4
|
-
|
|
5
|
-
from
|
|
6
|
-
from
|
|
7
|
-
from
|
|
8
|
-
from .fibex_core.core_communication import FibexElement
|
|
3
|
+
from .....M2.MSR.Documentation.BlockElements import DocumentationBlock
|
|
4
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
5
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import RefType
|
|
6
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARPositiveInteger
|
|
7
|
+
from .....M2.AUTOSARTemplates.SystemTemplate.Fibex.FibexCore.CoreCommunication import FibexElement
|
|
9
8
|
|
|
10
9
|
class FrameMapping(ARObject):
|
|
11
10
|
def __init__(self):
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
from abc import ABCMeta
|
|
2
2
|
from typing import List
|
|
3
3
|
|
|
4
|
-
from
|
|
4
|
+
from armodel.models.M2.AUTOSARTemplates.SystemTemplate.Fibex.FibexCore.Timing import TransmissionModeDeclaration
|
|
5
5
|
|
|
6
|
-
from
|
|
7
|
-
|
|
8
|
-
from
|
|
9
|
-
|
|
10
|
-
from ...M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import RefType
|
|
11
|
-
from ...M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARBoolean
|
|
12
|
-
from ...M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Describable
|
|
6
|
+
from ......M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import ARElement, Identifiable, Describable
|
|
7
|
+
from ......M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
8
|
+
from ......M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARLiteral, ARNumerical, ARPositiveInteger, RefType, ARBoolean, TimeValue
|
|
13
9
|
|
|
14
10
|
class FibexElement(Identifiable, metaclass = ABCMeta):
|
|
15
11
|
def __init__(self, parent: ARObject, short_name: str):
|
|
@@ -56,9 +52,7 @@ class PduToFrameMapping(Identifiable):
|
|
|
56
52
|
self.updateIndicationBitPosition = value
|
|
57
53
|
return self
|
|
58
54
|
|
|
59
|
-
class Frame(Identifiable):
|
|
60
|
-
__metaclass__ = ABCMeta
|
|
61
|
-
|
|
55
|
+
class Frame(Identifiable, metaclass = ABCMeta):
|
|
62
56
|
def __init__(self, parent: ARObject, short_name: str):
|
|
63
57
|
if type(self) == Frame:
|
|
64
58
|
raise NotImplementedError("Frame is an abstract class.")
|
|
@@ -287,14 +281,12 @@ class DcmIPdu(IPdu):
|
|
|
287
281
|
self.diagPduType = value
|
|
288
282
|
return self
|
|
289
283
|
|
|
290
|
-
|
|
291
284
|
class IPduTiming(Describable):
|
|
292
285
|
def __init__(self):
|
|
293
286
|
super().__init__()
|
|
294
287
|
|
|
295
288
|
self.minimumDelay = None # type: TimeValue
|
|
296
|
-
# type: TransmissionModeDeclaration
|
|
297
|
-
self.transmissionModeDeclaration = None
|
|
289
|
+
self.transmissionModeDeclaration = None # type: TransmissionModeDeclaration
|
|
298
290
|
|
|
299
291
|
def getMinimumDelay(self):
|
|
300
292
|
return self.minimumDelay
|
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
from abc import ABCMeta
|
|
2
|
+
from enum import Enum
|
|
3
|
+
from typing import List
|
|
4
|
+
|
|
5
|
+
from ......M2.AUTOSARTemplates.SWComponentTemplate.Communication import HandleInvalidEnum
|
|
6
|
+
from ......M2.AUTOSARTemplates.SystemTemplate.Fibex.Fibex4Can.CanCommunication import CanFrameTriggering
|
|
7
|
+
from ......M2.AUTOSARTemplates.SystemTemplate.Fibex.Fibex4Lin.LinCommunication import LinFrameTriggering
|
|
8
|
+
from ......M2.AUTOSARTemplates.SystemTemplate.Fibex.FibexCore.CoreCommunication import FibexElement, FrameTriggering, ISignalTriggering, PduTriggering
|
|
9
|
+
from ......M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
10
|
+
from ......M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARFloat, Boolean, PositiveInteger, RefType, ARLiteral, TimeValue
|
|
11
|
+
from ......M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Identifiable
|
|
12
|
+
|
|
13
|
+
class PhysicalChannel (Identifiable, metaclass = ABCMeta):
|
|
14
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
15
|
+
if type(self) == PhysicalChannel:
|
|
16
|
+
raise NotImplementedError("PhysicalChannel is an abstract class.")
|
|
17
|
+
|
|
18
|
+
super().__init__(parent, short_name)
|
|
19
|
+
|
|
20
|
+
self.commConnectorRefs = [] # type: List[RefType]
|
|
21
|
+
self.managedPhysicalChannelRefs = [] # type: List[RefType]
|
|
22
|
+
|
|
23
|
+
def getCommConnectorRefs(self):
|
|
24
|
+
return self.commConnectorRefs
|
|
25
|
+
|
|
26
|
+
def addCommConnectorRef(self, value):
|
|
27
|
+
self.commConnectorRefs.append(value)
|
|
28
|
+
return self
|
|
29
|
+
|
|
30
|
+
def getFrameTriggerings(self) -> List[FrameTriggering]:
|
|
31
|
+
return list(sorted(filter(lambda a: isinstance(a, FrameTriggering), self.elements.values()), key= lambda o:o.getShortName()))
|
|
32
|
+
|
|
33
|
+
def createCanFrameTriggering(self, short_name: str):
|
|
34
|
+
if (short_name not in self.elements):
|
|
35
|
+
triggering = CanFrameTriggering(self, short_name)
|
|
36
|
+
self.addElement(triggering)
|
|
37
|
+
return self.getElement(short_name)
|
|
38
|
+
|
|
39
|
+
def createLinFrameTriggering(self, short_name: str):
|
|
40
|
+
if (short_name not in self.elements):
|
|
41
|
+
triggering = LinFrameTriggering(self, short_name)
|
|
42
|
+
self.addElement(triggering)
|
|
43
|
+
return self.getElement(short_name)
|
|
44
|
+
|
|
45
|
+
def getISignalTriggerings(self) -> List[ISignalTriggering]:
|
|
46
|
+
return list(sorted(filter(lambda a: isinstance(a, ISignalTriggering), self.elements.values()), key= lambda o:o.getShortName()))
|
|
47
|
+
|
|
48
|
+
def createISignalTriggering(self, short_name: str):
|
|
49
|
+
if (short_name not in self.elements):
|
|
50
|
+
triggering = ISignalTriggering(self, short_name)
|
|
51
|
+
self.addElement(triggering)
|
|
52
|
+
return self.getElement(short_name)
|
|
53
|
+
|
|
54
|
+
def getManagedPhysicalChannelRefs(self):
|
|
55
|
+
return self.managedPhysicalChannelRefs
|
|
56
|
+
|
|
57
|
+
def addManagedPhysicalChannelRef(self, value):
|
|
58
|
+
self.managedPhysicalChannelRefs.append(value)
|
|
59
|
+
return self
|
|
60
|
+
|
|
61
|
+
def getPduTriggerings(self) -> List[PduTriggering]:
|
|
62
|
+
return list(sorted(filter(lambda a: isinstance(a, PduTriggering), self.elements.values()), key= lambda o:o.getShortName()))
|
|
63
|
+
|
|
64
|
+
def createPduTriggering(self, short_name: str):
|
|
65
|
+
if (short_name not in self.elements):
|
|
66
|
+
triggering = PduTriggering(self, short_name)
|
|
67
|
+
self.addElement(triggering)
|
|
68
|
+
return self.getElement(short_name)
|
|
69
|
+
|
|
70
|
+
class AbstractCanPhysicalChannel(PhysicalChannel, metaclass = ABCMeta):
|
|
71
|
+
def __init__(self, parent, short_name):
|
|
72
|
+
if type(self) == ARObject:
|
|
73
|
+
raise NotImplementedError("AbstractCanPhysicalChannel is an abstract class.")
|
|
74
|
+
|
|
75
|
+
super().__init__(parent, short_name)
|
|
76
|
+
|
|
77
|
+
class CanPhysicalChannel(AbstractCanPhysicalChannel):
|
|
78
|
+
def __init__(self, parent, short_name):
|
|
79
|
+
super().__init__(parent, short_name)
|
|
80
|
+
|
|
81
|
+
class LinPhysicalChannel(PhysicalChannel):
|
|
82
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
83
|
+
super().__init__(parent, short_name)
|
|
84
|
+
|
|
85
|
+
class CommunicationCluster(FibexElement, metaclass = ABCMeta):
|
|
86
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
87
|
+
if type(self) == CommunicationCluster:
|
|
88
|
+
raise NotImplementedError("CommunicationCluster is an abstract class.")
|
|
89
|
+
|
|
90
|
+
super().__init__(parent, short_name)
|
|
91
|
+
|
|
92
|
+
self.baudrate = None # type: ARFloat
|
|
93
|
+
self.protocolName = None # type: ARLiteral
|
|
94
|
+
self.protocolVersion = None # type: ARLiteral
|
|
95
|
+
|
|
96
|
+
def getBaudrate(self):
|
|
97
|
+
return self.baudrate
|
|
98
|
+
|
|
99
|
+
def setBaudrate(self, value):
|
|
100
|
+
self.baudrate = value
|
|
101
|
+
return self
|
|
102
|
+
|
|
103
|
+
def getPhysicalChannels(self) -> List[PhysicalChannel]:
|
|
104
|
+
return list(sorted(filter(lambda a: isinstance(a, PhysicalChannel), self.elements.values()), key= lambda o:o.getShortName()))
|
|
105
|
+
|
|
106
|
+
def getCanPhysicalChannels(self) -> List[CanPhysicalChannel]:
|
|
107
|
+
return list(sorted(filter(lambda a: isinstance(a, CanPhysicalChannel), self.elements.values()), key= lambda o:o.getShortName()))
|
|
108
|
+
|
|
109
|
+
def getLinPhysicalChannels(self) -> List[LinPhysicalChannel]:
|
|
110
|
+
return list(sorted(filter(lambda a: isinstance(a, LinPhysicalChannel), self.elements.values()), key= lambda o:o.getShortName()))
|
|
111
|
+
|
|
112
|
+
def createCanPhysicalChannel(self, short_name: str):
|
|
113
|
+
if (short_name not in self.elements):
|
|
114
|
+
channel = CanPhysicalChannel(self, short_name)
|
|
115
|
+
self.addElement(channel)
|
|
116
|
+
return self.getElement(short_name)
|
|
117
|
+
|
|
118
|
+
def createLinPhysicalChannel(self, short_name: str):
|
|
119
|
+
if (short_name not in self.elements):
|
|
120
|
+
channel = LinPhysicalChannel(self, short_name)
|
|
121
|
+
self.addElement(channel)
|
|
122
|
+
return self.getElement(short_name)
|
|
123
|
+
|
|
124
|
+
def getProtocolName(self):
|
|
125
|
+
return self.protocolName
|
|
126
|
+
|
|
127
|
+
def setProtocolName(self, value):
|
|
128
|
+
self.protocolName = value
|
|
129
|
+
return self
|
|
130
|
+
|
|
131
|
+
def getProtocolVersion(self):
|
|
132
|
+
return self.protocolVersion
|
|
133
|
+
|
|
134
|
+
def setProtocolVersion(self, value):
|
|
135
|
+
self.protocolVersion = value
|
|
136
|
+
return self
|
|
137
|
+
|
|
138
|
+
class AbstractCanCluster(CommunicationCluster, metaclass = ABCMeta):
|
|
139
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
140
|
+
if type(self) == AbstractCanCluster:
|
|
141
|
+
raise NotImplementedError("AbstractCanCluster is an abstract class.")
|
|
142
|
+
|
|
143
|
+
super().__init__(parent, short_name)
|
|
144
|
+
|
|
145
|
+
self.busOffRecovery = None
|
|
146
|
+
self.canFdBaudrate = None
|
|
147
|
+
self.canXlBaudrate = None
|
|
148
|
+
self.speed = None
|
|
149
|
+
|
|
150
|
+
def getBusOffRecovery(self):
|
|
151
|
+
return self.busOffRecovery
|
|
152
|
+
|
|
153
|
+
def setBusOffRecovery(self, value):
|
|
154
|
+
self.busOffRecovery = value
|
|
155
|
+
return self
|
|
156
|
+
|
|
157
|
+
def getCanFdBaudrate(self):
|
|
158
|
+
return self.canFdBaudrate
|
|
159
|
+
|
|
160
|
+
def setCanFdBaudrate(self, value):
|
|
161
|
+
self.canFdBaudrate = value
|
|
162
|
+
return self
|
|
163
|
+
|
|
164
|
+
def getCanXlBaudrate(self):
|
|
165
|
+
return self.canXlBaudrate
|
|
166
|
+
|
|
167
|
+
def setCanXlBaudrate(self, value):
|
|
168
|
+
self.canXlBaudrate = value
|
|
169
|
+
return self
|
|
170
|
+
|
|
171
|
+
def getSpeed(self):
|
|
172
|
+
return self.speed
|
|
173
|
+
|
|
174
|
+
def setSpeed(self, value):
|
|
175
|
+
self.speed = value
|
|
176
|
+
return self
|
|
177
|
+
|
|
178
|
+
class CanCluster(AbstractCanCluster):
|
|
179
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
180
|
+
super().__init__(parent, short_name)
|
|
181
|
+
|
|
182
|
+
class LinCluster(CommunicationCluster):
|
|
183
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
184
|
+
super().__init__(parent, short_name)
|
|
185
|
+
|
|
186
|
+
class CommunicationController(Identifiable, metaclass = ABCMeta):
|
|
187
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
188
|
+
if type(self) == CommunicationController:
|
|
189
|
+
raise NotImplementedError("CommunicationController is an abstract class.")
|
|
190
|
+
|
|
191
|
+
super().__init__(parent, short_name)
|
|
192
|
+
|
|
193
|
+
self.wakeUpByControllerSupported = None # type: Boolean
|
|
194
|
+
|
|
195
|
+
def getWakeUpByControllerSupported(self):
|
|
196
|
+
return self.wakeUpByControllerSupported
|
|
197
|
+
|
|
198
|
+
def setWakeUpByControllerSupported(self, value):
|
|
199
|
+
self.wakeUpByControllerSupported = value
|
|
200
|
+
return self
|
|
201
|
+
|
|
202
|
+
class PncGatewayTypeEnum(Enum):
|
|
203
|
+
ENUM_ACTIVE = "active"
|
|
204
|
+
ENUM_NONE = "none"
|
|
205
|
+
ENUM_PASSIVE = "passive"
|
|
206
|
+
|
|
207
|
+
class CommunicationDirectionType(Enum):
|
|
208
|
+
ENUM_IN = "in"
|
|
209
|
+
ENUM_OUT = "out"
|
|
210
|
+
|
|
211
|
+
class CommConnectorPort(Identifiable, metaclass = ABCMeta):
|
|
212
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
213
|
+
if type(self) == CommConnectorPort:
|
|
214
|
+
raise NotImplementedError("CommConnectorPort is an abstract class.")
|
|
215
|
+
|
|
216
|
+
super().__init__(parent, short_name)
|
|
217
|
+
|
|
218
|
+
# type: CommunicationDirectionType
|
|
219
|
+
self.communicationDirection = None
|
|
220
|
+
|
|
221
|
+
def getCommunicationDirection(self) -> CommunicationDirectionType:
|
|
222
|
+
return self.communicationDirection
|
|
223
|
+
|
|
224
|
+
def setCommunicationDirection(self, value: CommunicationDirectionType):
|
|
225
|
+
self.communicationDirection = value
|
|
226
|
+
return self
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
class FramePort(CommConnectorPort):
|
|
230
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
231
|
+
super().__init__(parent, short_name)
|
|
232
|
+
|
|
233
|
+
class IPduSignalProcessingEnum(Enum):
|
|
234
|
+
ENUM_DEFERRED = "deferred"
|
|
235
|
+
ENUM_IMMEDIATE = "immediate"
|
|
236
|
+
|
|
237
|
+
class IPduPort(CommConnectorPort):
|
|
238
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
239
|
+
super().__init__(parent, short_name)
|
|
240
|
+
|
|
241
|
+
# type: IPduSignalProcessingEnum
|
|
242
|
+
self.iPduSignalProcessing = None
|
|
243
|
+
self.rxSecurityVerification = None # type: Boolean
|
|
244
|
+
self.timestampRxAcceptanceWindow = None # type: TimeValue
|
|
245
|
+
self.useAuthDataFreshness = None # type: Boolean
|
|
246
|
+
|
|
247
|
+
def getIPduSignalProcessing(self):
|
|
248
|
+
return self.iPduSignalProcessing
|
|
249
|
+
|
|
250
|
+
def setIPduSignalProcessing(self, value):
|
|
251
|
+
self.iPduSignalProcessing = value
|
|
252
|
+
return self
|
|
253
|
+
|
|
254
|
+
def getRxSecurityVerification(self):
|
|
255
|
+
return self.rxSecurityVerification
|
|
256
|
+
|
|
257
|
+
def setRxSecurityVerification(self, value):
|
|
258
|
+
self.rxSecurityVerification = value
|
|
259
|
+
return self
|
|
260
|
+
|
|
261
|
+
def getTimestampRxAcceptanceWindow(self):
|
|
262
|
+
return self.timestampRxAcceptanceWindow
|
|
263
|
+
|
|
264
|
+
def setTimestampRxAcceptanceWindow(self, value):
|
|
265
|
+
self.timestampRxAcceptanceWindow = value
|
|
266
|
+
return self
|
|
267
|
+
|
|
268
|
+
def getUseAuthDataFreshness(self):
|
|
269
|
+
return self.useAuthDataFreshness
|
|
270
|
+
|
|
271
|
+
def setUseAuthDataFreshness(self, value):
|
|
272
|
+
self.useAuthDataFreshness = value
|
|
273
|
+
return self
|
|
274
|
+
|
|
275
|
+
class ISignalPort(CommConnectorPort):
|
|
276
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
277
|
+
super().__init__(parent, short_name)
|
|
278
|
+
|
|
279
|
+
# type: DataFilter
|
|
280
|
+
self.dataFilter = None
|
|
281
|
+
self.ddsQosProfileRef = None # type: RefType
|
|
282
|
+
# type: TimeValue
|
|
283
|
+
self.firstTimeout = None
|
|
284
|
+
# type: HandleInvalidEnum
|
|
285
|
+
self.handleInvalid = None
|
|
286
|
+
|
|
287
|
+
def getDataFilter(self):
|
|
288
|
+
return self.dataFilter
|
|
289
|
+
|
|
290
|
+
def setDataFilter(self, value):
|
|
291
|
+
self.dataFilter = value
|
|
292
|
+
return self
|
|
293
|
+
|
|
294
|
+
def getDdsQosProfileRef(self):
|
|
295
|
+
return self.ddsQosProfileRef
|
|
296
|
+
|
|
297
|
+
def setDdsQosProfileRef(self, value):
|
|
298
|
+
self.ddsQosProfileRef = value
|
|
299
|
+
return self
|
|
300
|
+
|
|
301
|
+
def getFirstTimeout(self):
|
|
302
|
+
return self.firstTimeout
|
|
303
|
+
|
|
304
|
+
def setFirstTimeout(self, value):
|
|
305
|
+
self.firstTimeout = value
|
|
306
|
+
return self
|
|
307
|
+
|
|
308
|
+
def getHandleInvalid(self):
|
|
309
|
+
return self.handleInvalid
|
|
310
|
+
|
|
311
|
+
def setHandleInvalid(self, value):
|
|
312
|
+
self.handleInvalid = value
|
|
313
|
+
return self
|
|
314
|
+
|
|
315
|
+
class CommunicationConnector(Identifiable, metaclass = ABCMeta):
|
|
316
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
317
|
+
if type(self) == CommunicationConnector:
|
|
318
|
+
raise NotImplementedError("CommunicationConnector is an abstract class.")
|
|
319
|
+
|
|
320
|
+
super().__init__(parent, short_name)
|
|
321
|
+
|
|
322
|
+
self.commControllerRef = None # type: RefType
|
|
323
|
+
self.createEcuWakeupSource = None # type: Boolean
|
|
324
|
+
self.dynamicPncToChannelMappingEnabled = None # type: Boolean
|
|
325
|
+
self.ecuCommPortInstances = [] # type: List[CommConnectorPort]
|
|
326
|
+
self.pncFilterArrayMasks = [] # type: List[PositiveInteger]
|
|
327
|
+
self.pncGatewayType = None # type: PncGatewayTypeEnum
|
|
328
|
+
|
|
329
|
+
def getCommControllerRef(self):
|
|
330
|
+
return self.commControllerRef
|
|
331
|
+
|
|
332
|
+
def setCommControllerRef(self, value):
|
|
333
|
+
self.commControllerRef = value
|
|
334
|
+
return self
|
|
335
|
+
|
|
336
|
+
def getCreateEcuWakeupSource(self):
|
|
337
|
+
return self.createEcuWakeupSource
|
|
338
|
+
|
|
339
|
+
def setCreateEcuWakeupSource(self, value):
|
|
340
|
+
self.createEcuWakeupSource = value
|
|
341
|
+
return self
|
|
342
|
+
|
|
343
|
+
def getDynamicPncToChannelMappingEnabled(self):
|
|
344
|
+
return self.dynamicPncToChannelMappingEnabled
|
|
345
|
+
|
|
346
|
+
def setDynamicPncToChannelMappingEnabled(self, value):
|
|
347
|
+
self.dynamicPncToChannelMappingEnabled = value
|
|
348
|
+
return self
|
|
349
|
+
|
|
350
|
+
def getEcuCommPortInstances(self):
|
|
351
|
+
return list(sorted(filter(lambda a: isinstance(a, CommConnectorPort), self.elements.values()), key= lambda o:o.getShortName()))
|
|
352
|
+
|
|
353
|
+
def createFramePort(self, short_name) -> FramePort:
|
|
354
|
+
if short_name not in self.elements:
|
|
355
|
+
port = FramePort(self, short_name)
|
|
356
|
+
self.addElement(port)
|
|
357
|
+
self.ecuCommPortInstances.append(port)
|
|
358
|
+
return self.getElement(short_name)
|
|
359
|
+
|
|
360
|
+
def createIPduPort(self, short_name) -> IPduPort:
|
|
361
|
+
if short_name not in self.elements:
|
|
362
|
+
port = IPduPort(self, short_name)
|
|
363
|
+
self.addElement(port)
|
|
364
|
+
self.ecuCommPortInstances.append(port)
|
|
365
|
+
return self.getElement(short_name)
|
|
366
|
+
|
|
367
|
+
def createISignalPort(self, short_name) -> ISignalPort:
|
|
368
|
+
if short_name not in self.elements:
|
|
369
|
+
port = ISignalPort(self, short_name)
|
|
370
|
+
self.addElement(port)
|
|
371
|
+
self.ecuCommPortInstances.append(port)
|
|
372
|
+
return self.getElement(short_name)
|
|
373
|
+
|
|
374
|
+
def getPncFilterArrayMasks(self):
|
|
375
|
+
return self.pncFilterArrayMasks
|
|
376
|
+
|
|
377
|
+
def addPncFilterArrayMask(self, value):
|
|
378
|
+
self.pncFilterArrayMasks.append(value)
|
|
379
|
+
return self
|
|
380
|
+
|
|
381
|
+
def getPncGatewayType(self):
|
|
382
|
+
return self.pncGatewayType
|
|
383
|
+
|
|
384
|
+
def setPncGatewayType(self, value):
|
|
385
|
+
self.pncGatewayType = value
|
|
386
|
+
return self
|
|
387
|
+
|
|
388
|
+
|