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
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
from abc import ABCMeta
|
|
2
2
|
from typing import List
|
|
3
|
-
|
|
4
|
-
from
|
|
5
|
-
|
|
6
|
-
from
|
|
7
|
-
|
|
8
|
-
from
|
|
9
|
-
from
|
|
10
|
-
from ..GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARBoolean
|
|
11
|
-
from ..SWComponentTemplate.Datatype.Datatypes import AutosarDataType
|
|
12
|
-
from ..SWComponentTemplate.Components import SymbolProps
|
|
3
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
4
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARLiteral, ARNumerical
|
|
5
|
+
from ....M2.MSR.DataDictionary.DataDefProperties import SwDataDefProps
|
|
6
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Identifiable
|
|
7
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARBoolean
|
|
8
|
+
from ....M2.AUTOSARTemplates.SWComponentTemplate.Datatype.Datatypes import AutosarDataType
|
|
9
|
+
from ....M2.AUTOSARTemplates.SWComponentTemplate.Components import SymbolProps
|
|
13
10
|
|
|
14
11
|
class AbstractImplementationDataTypeElement(Identifiable):
|
|
15
12
|
def __init__(self, parent, short_name: str):
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
from abc import ABCMeta
|
|
2
2
|
from enum import Enum
|
|
3
3
|
from typing import List
|
|
4
|
-
|
|
5
|
-
from
|
|
6
|
-
from
|
|
7
|
-
from
|
|
8
|
-
from armodel.models.M2.AUTOSARTemplates.SWComponentTemplate.Datatype.DataPrototypes import ParameterDataPrototype
|
|
4
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
5
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Identifiable
|
|
6
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARFloat, RefType
|
|
7
|
+
from ....M2.AUTOSARTemplates.SWComponentTemplate.Datatype.DataPrototypes import ParameterDataPrototype
|
|
9
8
|
|
|
10
9
|
class ReentrancyLevelEnum(Enum):
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
singleCoreReentrant = "singleCoreReentrant"
|
|
15
|
-
|
|
10
|
+
ENUM_MULTICORE_REENTRANT = "multicoreReentrant"
|
|
11
|
+
ENUM_NON_REENTRANT = "nonReentrant"
|
|
12
|
+
ENUM_SINGLE_CORE_REENTRANT = "singleCoreReentrant"
|
|
16
13
|
|
|
17
14
|
class ExclusiveArea(Identifiable):
|
|
18
15
|
def __init__(self, parent: ARObject, short_name: str):
|
|
@@ -105,4 +102,17 @@ class InternalBehavior(Identifiable, metaclass=ABCMeta):
|
|
|
105
102
|
return self.elements[short_name]
|
|
106
103
|
|
|
107
104
|
def getConstantMemorys(self) -> List[ParameterDataPrototype]:
|
|
108
|
-
return self.constant_memories
|
|
105
|
+
return self.constant_memories
|
|
106
|
+
|
|
107
|
+
class AbstractEvent(Identifiable):
|
|
108
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
109
|
+
super().__init__(parent, short_name)
|
|
110
|
+
|
|
111
|
+
self.activationReasonRepresentationRef = None # type: RefType
|
|
112
|
+
|
|
113
|
+
def getActivationReasonRepresentationRef(self):
|
|
114
|
+
return self.activationReasonRepresentationRef
|
|
115
|
+
|
|
116
|
+
def setActivationReasonRepresentationRef(self, value):
|
|
117
|
+
self.activationReasonRepresentationRef = value
|
|
118
|
+
return self
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from typing import List
|
|
2
|
-
from
|
|
3
|
-
from
|
|
4
|
-
from
|
|
2
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
3
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Identifiable
|
|
4
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARNumerical, RefType, TRefType
|
|
5
5
|
|
|
6
6
|
class ModeDeclaration(Identifiable):
|
|
7
7
|
def __init__(self, parent: ARObject, short_name: str):
|
armodel/models/M2/AUTOSARTemplates/CommonStructure/ResourceConsumption/MemorySectionUsage.py
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
3
|
-
from
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
2
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Identifiable
|
|
3
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARLiteral, RefType
|
|
6
4
|
import re
|
|
7
5
|
from typing import List
|
|
8
6
|
|
|
9
|
-
|
|
10
7
|
class MemorySection(Identifiable):
|
|
11
8
|
def __init__(self, parent: ARObject, short_name: str):
|
|
12
9
|
super().__init__(parent, short_name)
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
from . import
|
|
2
|
-
|
|
3
|
-
from .
|
|
4
|
-
from ...GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
5
|
-
from ...GenericStructure.GeneralTemplateClasses.Identifiable import Identifiable
|
|
1
|
+
from .....M2.AUTOSARTemplates.CommonStructure.ResourceConsumption.MemorySectionUsage import MemorySection
|
|
2
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
3
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Identifiable
|
|
6
4
|
from typing import List
|
|
7
5
|
|
|
8
6
|
class ResourceConsumption(Identifiable):
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
from abc import ABCMeta
|
|
2
|
-
from
|
|
3
|
-
from
|
|
4
|
-
from
|
|
5
|
-
from
|
|
6
|
-
|
|
2
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
3
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Identifiable
|
|
4
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARBoolean, ARLiteral, RefType
|
|
5
|
+
from ....M2.AUTOSARTemplates.SWComponentTemplate.SwcInternalBehavior.InstanceRefsUsage import AutosarParameterRef, AutosarVariableRef
|
|
7
6
|
|
|
8
7
|
class RoleBasedDataAssignment(ARObject):
|
|
9
8
|
def __init__(self):
|
|
@@ -47,4 +46,9 @@ class NvBlockNeeds(ServiceNeeds):
|
|
|
47
46
|
self.write_only_once = None # type: ARBoolean
|
|
48
47
|
self.write_verification = None # type: ARBoolean
|
|
49
48
|
self.writing_frequency = None # type: ARBoolean
|
|
50
|
-
self.writing_priority = None # type: ARBoolean
|
|
49
|
+
self.writing_priority = None # type: ARBoolean
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class ServiceDependency(Identifiable):
|
|
53
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
54
|
+
super().__init__(parent, short_name)
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
from typing import List
|
|
2
|
-
from
|
|
3
|
-
from
|
|
4
|
-
from
|
|
5
|
-
|
|
2
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
3
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Identifiable
|
|
4
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import RefType
|
|
6
5
|
|
|
7
6
|
class SwcBswRunnableMapping(ARObject):
|
|
8
7
|
def __init__(self):
|
armodel/models/M2/AUTOSARTemplates/CommonStructure/SwcInternalBehavior/ModeDeclarationGroup.py
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
2
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARLiteral, RefType
|
|
5
3
|
from typing import List
|
|
6
4
|
|
|
7
|
-
|
|
8
5
|
class IncludedModeDeclarationGroupSet(ARObject):
|
|
9
6
|
def __init__(self):
|
|
10
7
|
super().__init__()
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
from . import *
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
from typing import List
|
|
2
|
+
from abc import ABCMeta
|
|
3
|
+
from ......M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
4
|
+
from ......M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Identifiable
|
|
5
|
+
from ......M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import RefType
|
|
6
|
+
from ......M2.AUTOSARTemplates.CommonStructure.Timing.TimingConstraint.TimingConstraint import TimingConstraint
|
|
7
|
+
|
|
8
|
+
class EOCExecutableEntityRefAbstract(Identifiable):
|
|
9
|
+
__metaclass__ = ABCMeta
|
|
10
|
+
|
|
11
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
12
|
+
if type(self) == TimingConstraint:
|
|
13
|
+
raise NotImplementedError("TimingExtension is an abstract class.")
|
|
14
|
+
|
|
15
|
+
super().__init__(parent, short_name)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class EOCExecutableEntityRef(EOCExecutableEntityRefAbstract):
|
|
19
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
20
|
+
super().__init__(parent, short_name)
|
|
21
|
+
|
|
22
|
+
self.successor_refs = [] # List[RefType]
|
|
23
|
+
|
|
24
|
+
def addSuccessorRef(self, ref: RefType):
|
|
25
|
+
self.successor_refs.append(ref)
|
|
26
|
+
|
|
27
|
+
def getSuccessorRefs(self) -> List[RefType]:
|
|
28
|
+
return self.successor_refs
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class ExecutionOrderConstraint(TimingConstraint):
|
|
32
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
33
|
+
super().__init__(parent, short_name)
|
|
34
|
+
|
|
35
|
+
self.ordered_elements = [] # type: List[EOCExecutableEntityRefAbstract]
|
|
36
|
+
|
|
37
|
+
def createEOCExecutableEntityRef(self, short_name: str)-> EOCExecutableEntityRef:
|
|
38
|
+
if short_name not in self.elements:
|
|
39
|
+
entity_ref = EOCExecutableEntityRef(self, short_name)
|
|
40
|
+
self.elements[short_name] = entity_ref
|
|
41
|
+
self.ordered_elements.append(entity_ref)
|
|
42
|
+
return self.elements[short_name]
|
|
43
|
+
|
|
44
|
+
def getOrderedElements(self) -> List[EOCExecutableEntityRefAbstract]:
|
|
45
|
+
return self.ordered_elements
|
armodel/models/M2/AUTOSARTemplates/CommonStructure/Timing/TimingConstraint/TimingConstraint.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from ......M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
2
|
+
from ......M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Identifiable
|
|
3
|
+
from ......M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import RefType
|
|
4
|
+
from abc import ABCMeta
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class TimingConstraint(Identifiable):
|
|
8
|
+
__metaclass__ = ABCMeta
|
|
9
|
+
|
|
10
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
11
|
+
if type(self) == TimingConstraint:
|
|
12
|
+
raise NotImplementedError("TimingExtension is an abstract class.")
|
|
13
|
+
|
|
14
|
+
super().__init__(parent, short_name)
|
|
15
|
+
|
|
16
|
+
self.timing_condition_ref = None # type: RefType
|
|
17
|
+
|
|
18
|
+
@property
|
|
19
|
+
def timingConditionRef(self) -> RefType:
|
|
20
|
+
return self.timing_condition_ref
|
|
21
|
+
|
|
22
|
+
@timingConditionRef.setter
|
|
23
|
+
def timingConditionRef(self, ref: RefType):
|
|
24
|
+
self.timing_condition_ref = ref
|
armodel/models/M2/AUTOSARTemplates/CommonStructure/Timing/TimingConstraint/TimingExtensions.py
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
from ......M2.AUTOSARTemplates.CommonStructure.Timing.TimingConstraint.ExecutionOrderConstraint import ExecutionOrderConstraint
|
|
2
|
+
from ......M2.AUTOSARTemplates.CommonStructure.Timing.TimingConstraint.TimingConstraint import TimingConstraint
|
|
3
|
+
from ......M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
4
|
+
from ......M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Identifiable
|
|
5
|
+
from abc import ABCMeta
|
|
6
|
+
from typing import List
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class TimingExtension(Identifiable):
|
|
10
|
+
__metaclass__ = ABCMeta
|
|
11
|
+
|
|
12
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
13
|
+
if type(self) == TimingExtension:
|
|
14
|
+
raise NotImplementedError("TimingExtension is an abstract class.")
|
|
15
|
+
|
|
16
|
+
super().__init__(parent, short_name)
|
|
17
|
+
|
|
18
|
+
self.timing_requirements = [] # Type: List[TimingConstraint]
|
|
19
|
+
|
|
20
|
+
def createExecutionOrderConstraint(self, short_name: str)-> ExecutionOrderConstraint:
|
|
21
|
+
if short_name not in self.elements:
|
|
22
|
+
constraint = ExecutionOrderConstraint(self, short_name)
|
|
23
|
+
self.elements[short_name] = constraint
|
|
24
|
+
self.timing_requirements.append(constraint)
|
|
25
|
+
return self.elements[short_name]
|
|
26
|
+
|
|
27
|
+
def getTimingRequirements(self) -> List[TimingConstraint]:
|
|
28
|
+
return self.timing_requirements
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class SwcTiming(TimingExtension):
|
|
32
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
33
|
+
super().__init__(parent, short_name)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
1
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
2
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Identifiable
|
|
3
3
|
|
|
4
4
|
class Trigger(Identifiable):
|
|
5
5
|
def __init__(self, parent: ARObject, short_name: str):
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
from abc import ABCMeta
|
|
2
2
|
from typing import List
|
|
3
|
-
|
|
4
|
-
from
|
|
5
|
-
|
|
6
|
-
from
|
|
7
|
-
from armodel.models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import ARElement
|
|
8
|
-
from ..GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARLiteral
|
|
3
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
4
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARNumerical
|
|
5
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import ARElement
|
|
6
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARLiteral
|
|
9
7
|
|
|
10
8
|
class ValueSpecification(ARObject, metaclass = ABCMeta):
|
|
11
9
|
'''
|
armodel/models/M2/AUTOSARTemplates/{ecuc_description_template.py → ECUCDescriptionTemplate.py}
RENAMED
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
from abc import ABCMeta
|
|
2
2
|
from typing import List
|
|
3
|
-
|
|
4
|
-
from .
|
|
5
|
-
|
|
6
|
-
from .GenericStructure.GeneralTemplateClasses.
|
|
7
|
-
|
|
8
|
-
from .GenericStructure.
|
|
9
|
-
from ..MSR.Documentation.BlockElements import DocumentationBlock
|
|
10
|
-
from ..MSR.Documentation.Annotation import Annotation
|
|
11
|
-
from .GenericStructure.GeneralTemplateClasses.PrimitiveTypes import RefType
|
|
12
|
-
from .GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARBoolean
|
|
13
|
-
from .GenericStructure.GeneralTemplateClasses.Identifiable import ARElement
|
|
3
|
+
from ...M2.MSR.Documentation.BlockElements import DocumentationBlock
|
|
4
|
+
from ...M2.MSR.Documentation.Annotation import Annotation
|
|
5
|
+
from ...M2.AUTOSARTemplates.GenericStructure.AbstractStructure import AnyInstanceRef
|
|
6
|
+
from ...M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
7
|
+
from ...M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARLiteral, ARNumerical, RefType, ARBoolean
|
|
8
|
+
from ...M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import ARElement
|
|
14
9
|
|
|
15
10
|
class EcucValueCollection(ARElement):
|
|
16
11
|
def __init__(self, parent: ARObject, short_name: str):
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
|
|
2
2
|
from abc import ABCMeta
|
|
3
3
|
from typing import List
|
|
4
|
-
|
|
5
|
-
from
|
|
6
|
-
|
|
7
|
-
from .GeneralTemplateClasses.PrimitiveTypes import RefType
|
|
8
|
-
from .GeneralTemplateClasses.ArObject import ARObject
|
|
9
|
-
|
|
4
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import ARElement, Identifiable
|
|
5
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import RefType
|
|
6
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
10
7
|
class AtpInstanceRef(ARObject, metaclass = ABCMeta):
|
|
11
8
|
def __init__(self):
|
|
12
9
|
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
from armodel.models.M2.AUTOSARTemplates.BswModuleTemplate.BswOverview import BswModuleDescription
|
|
2
|
-
from armodel.models.M2.AUTOSARTemplates.CommonStructure.Implementation import Implementation
|
|
3
|
-
from armodel.models.M2.AUTOSARTemplates.BswModuleTemplate.BswImplementation import BswImplementation
|
|
4
|
-
from armodel.models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
5
|
-
from armodel.models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import CollectableElement
|
|
6
|
-
from armodel.models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Identifiable, Referrable
|
|
7
|
-
from armodel.models.M2.AUTOSARTemplates.SWComponentTemplate.Datatype.Datatypes import ApplicationArrayDataType, ApplicationDataType, ApplicationPrimitiveDataType, ApplicationRecordDataType
|
|
8
|
-
from armodel.models.M2.MSR.AsamHdo.BaseTypes import SwBaseType
|
|
9
|
-
from armodel.models.M2.AUTOSARTemplates.BswModuleTemplate.BswInterfaces import BswModuleEntry
|
|
10
|
-
from armodel.models.M2.AUTOSARTemplates.CommonStructure.ModeDeclaration import ModeDeclarationGroup
|
|
11
|
-
from armodel.models.M2.AUTOSARTemplates.SWComponentTemplate.Datatype.Datatypes import DataTypeMappingSet
|
|
12
|
-
from armodel.models.M2.AUTOSARTemplates.SWComponentTemplate.EndToEndProtection import EndToEndProtectionSet
|
|
13
|
-
from armodel.models.fibex.can_communication import CanFrame
|
|
14
|
-
from armodel.models.fibex.fibex_4_multiplatform import Gateway
|
|
15
|
-
from armodel.models.fibex.fibex_core.core_communication import DcmIPdu, ISignal, ISignalGroup, ISignalIPdu, ISignalIPduGroup, NPdu, NmPdu, SecuredIPdu, SystemSignal, SystemSignalGroup
|
|
16
|
-
from armodel.models.fibex.fibex_core.core_topology import CanCluster, EcuInstance, LinCluster
|
|
17
|
-
from armodel.models.fibex.lin_communication import LinUnconditionalFrame
|
|
18
|
-
from armodel.models.M2.AUTOSARTemplates.CommonStructure.SwcBswMapping import SwcBswMapping
|
|
19
|
-
from armodel.models.M2.MSR.AsamHdo.Constraints.GlobalConstraints import DataConstr
|
|
20
|
-
from armodel.models.M2.AUTOSARTemplates.SWComponentTemplate.SwcImplementation import SwcImplementation
|
|
21
|
-
from armodel.models.M2.AUTOSARTemplates.CommonStructure import ConstantSpecification
|
|
22
|
-
from armodel.models.M2.AUTOSARTemplates.CommonStructure.ImplementationDataTypes import ImplementationDataType
|
|
23
|
-
from armodel.models.M2.AUTOSARTemplates.ecuc_description_template import EcucModuleConfigurationValues, EcucValueCollection
|
|
24
|
-
from armodel.models.M2.AUTOSARTemplates.SWComponentTemplate.Components import SwComponentType
|
|
25
|
-
from armodel.models.M2.AUTOSARTemplates.SWComponentTemplate.Composition import CompositionSwComponentType
|
|
26
|
-
from armodel.models.M2.AUTOSARTemplates.SWComponentTemplate.port_interface import ClientServerInterface, ModeSwitchInterface, ParameterInterface, SenderReceiverInterface, TriggerInterface
|
|
27
|
-
from armodel.models.M2.AUTOSARTemplates.SystemTemplate import System
|
|
28
|
-
from armodel.models.M2.AUTOSARTemplates.SystemTemplate.network_management import NmConfig
|
|
29
|
-
from armodel.models.M2.AUTOSARTemplates.SystemTemplate.transport_protocols import CanTpConfig
|
|
30
|
-
from armodel.models.M2.MSR.AsamHdo.Units import PhysicalDimension, Unit
|
|
31
|
-
from armodel.models.M2.MSR.DataDictionary.AuxillaryObjects import SwAddrMethod
|
|
32
|
-
from armodel.models.M2.MSR.AsamHdo.ComputationMethod import CompuMethod
|
|
33
|
-
from armodel.models.M2.MSR.DataDictionary.RecordLayout import SwRecordLayout
|
|
34
|
-
from armodel.models.sw_component import ApplicationSwComponentType, AtomicSwComponentType, ComplexDeviceDriverSwComponentType, EcuAbstractionSwComponentType, SensorActuatorSwComponentType, ServiceSwComponentType
|
|
35
|
-
from armodel.models.timing import SwcTiming
|
|
36
|
-
|
|
37
1
|
from typing import Dict, List
|
|
38
2
|
|
|
3
|
+
from ...SystemTemplate.Fibex.FibexCore.EcuInstance import EcuInstance
|
|
4
|
+
from .....M2.AUTOSARTemplates.CommonStructure.Timing.TimingConstraint.TimingExtensions import SwcTiming
|
|
5
|
+
from .....M2.AUTOSARTemplates.SWComponentTemplate.Components import CompositionSwComponentType, ServiceSwComponentType, SwComponentType, ApplicationSwComponentType, AtomicSwComponentType, ComplexDeviceDriverSwComponentType, EcuAbstractionSwComponentType, SensorActuatorSwComponentType
|
|
6
|
+
from .....M2.AUTOSARTemplates.SystemTemplate.Fibex.Fibex4Ethernet.EthernetFrame import GenericEthernetFrame
|
|
7
|
+
from .....M2.MSR.AsamHdo.BaseTypes import SwBaseType
|
|
8
|
+
from .....M2.MSR.AsamHdo.Units import PhysicalDimension, Unit
|
|
9
|
+
from .....M2.MSR.AsamHdo.Constraints.GlobalConstraints import DataConstr
|
|
10
|
+
from .....M2.MSR.AsamHdo.ComputationMethod import CompuMethod
|
|
11
|
+
from .....M2.MSR.DataDictionary.AuxillaryObjects import SwAddrMethod
|
|
12
|
+
from .....M2.MSR.DataDictionary.RecordLayout import SwRecordLayout
|
|
13
|
+
from .....M2.AUTOSARTemplates.BswModuleTemplate.BswOverview import BswModuleDescription
|
|
14
|
+
from .....M2.AUTOSARTemplates.CommonStructure.Implementation import Implementation
|
|
15
|
+
from .....M2.AUTOSARTemplates.BswModuleTemplate.BswImplementation import BswImplementation
|
|
16
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
17
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import CollectableElement
|
|
18
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Identifiable, Referrable
|
|
19
|
+
from .....M2.AUTOSARTemplates.SWComponentTemplate.Datatype.Datatypes import ApplicationArrayDataType, ApplicationDataType, ApplicationPrimitiveDataType, ApplicationRecordDataType
|
|
20
|
+
from .....M2.AUTOSARTemplates.BswModuleTemplate.BswInterfaces import BswModuleEntry
|
|
21
|
+
from .....M2.AUTOSARTemplates.CommonStructure.ModeDeclaration import ModeDeclarationGroup
|
|
22
|
+
from .....M2.AUTOSARTemplates.SWComponentTemplate.Datatype.Datatypes import DataTypeMappingSet
|
|
23
|
+
from .....M2.AUTOSARTemplates.SWComponentTemplate.EndToEndProtection import EndToEndProtectionSet
|
|
24
|
+
from .....M2.AUTOSARTemplates.SystemTemplate.Fibex.Fibex4Can.CanCommunication import CanFrame
|
|
25
|
+
from .....M2.AUTOSARTemplates.SystemTemplate.Fibex.Fibex4Multiplatform import Gateway
|
|
26
|
+
from .....M2.AUTOSARTemplates.SystemTemplate.Fibex.FibexCore.CoreCommunication import DcmIPdu, ISignal, ISignalGroup, ISignalIPdu, ISignalIPduGroup, NPdu, NmPdu, SecuredIPdu, SystemSignal, SystemSignalGroup
|
|
27
|
+
from .....M2.AUTOSARTemplates.SystemTemplate.Fibex.FibexCore.CoreTopology import CanCluster, LinCluster
|
|
28
|
+
from .....M2.AUTOSARTemplates.SystemTemplate.Fibex.Fibex4Lin.LinCommunication import LinUnconditionalFrame
|
|
29
|
+
from .....M2.AUTOSARTemplates.CommonStructure.SwcBswMapping import SwcBswMapping
|
|
30
|
+
from .....M2.AUTOSARTemplates.SWComponentTemplate.SwcImplementation import SwcImplementation
|
|
31
|
+
from .....M2.AUTOSARTemplates.CommonStructure import ConstantSpecification
|
|
32
|
+
from .....M2.AUTOSARTemplates.CommonStructure.ImplementationDataTypes import ImplementationDataType
|
|
33
|
+
from .....M2.AUTOSARTemplates.ECUCDescriptionTemplate import EcucModuleConfigurationValues, EcucValueCollection
|
|
34
|
+
from .....M2.AUTOSARTemplates.SWComponentTemplate.PortInterface import ClientServerInterface, ModeSwitchInterface, ParameterInterface, SenderReceiverInterface, TriggerInterface
|
|
35
|
+
from .....M2.AUTOSARTemplates.SystemTemplate import System
|
|
36
|
+
from .....M2.AUTOSARTemplates.SystemTemplate.NetworkManagement import NmConfig
|
|
37
|
+
from .....M2.AUTOSARTemplates.SystemTemplate.TransportProtocols import CanTpConfig
|
|
38
|
+
|
|
39
39
|
class ARPackage(Identifiable, CollectableElement):
|
|
40
40
|
def __init__(self, parent: ARObject, short_name: str):
|
|
41
41
|
Identifiable.__init__(self, parent, short_name)
|
|
@@ -111,6 +111,12 @@ class ARPackage(Identifiable, CollectableElement):
|
|
|
111
111
|
sr_interface = ParameterInterface(self, short_name)
|
|
112
112
|
self.addElement(sr_interface)
|
|
113
113
|
return self.getElement(short_name)
|
|
114
|
+
|
|
115
|
+
def createGenericEthernetFrame(self, short_name: str) -> GenericEthernetFrame:
|
|
116
|
+
if (short_name not in self.elements):
|
|
117
|
+
sr_interface = GenericEthernetFrame(self, short_name)
|
|
118
|
+
self.addElement(sr_interface)
|
|
119
|
+
return self.getElement(short_name)
|
|
114
120
|
|
|
115
121
|
def createClientServerInterface(self, short_name: str) -> ClientServerInterface:
|
|
116
122
|
if (short_name not in self.elements):
|
armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/EngineeringObject.py
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
2
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARLiteral
|
|
5
3
|
from abc import ABCMeta
|
|
6
4
|
|
|
7
|
-
|
|
8
5
|
class EngineeringObject(ARObject, metaclass=ABCMeta):
|
|
9
6
|
def __init__(self):
|
|
10
7
|
if type(self) == EngineeringObject:
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
3
|
-
from .
|
|
4
|
-
from .
|
|
5
|
-
from
|
|
6
|
-
from
|
|
1
|
+
from .....M2.MSR.AsamHdo.AdminData import AdminData
|
|
2
|
+
from .....M2.MSR.Documentation.TextModel.MultilanguageData import MultilanguageLongName
|
|
3
|
+
from .....M2.MSR.Documentation.Annotation import Annotation
|
|
4
|
+
from .....M2.MSR.Documentation.TextModel.MultilanguageData import MultiLanguageOverviewParagraph
|
|
5
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
6
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARLiteral
|
|
7
7
|
from abc import ABCMeta
|
|
8
8
|
from typing import List
|
|
9
9
|
|
|
@@ -14,17 +14,9 @@ class Referrable(ARObject, metaclass = ABCMeta):
|
|
|
14
14
|
raise NotImplementedError("Referrable is an abstract class.")
|
|
15
15
|
ARObject.__init__(self)
|
|
16
16
|
|
|
17
|
-
self.
|
|
17
|
+
self.parent = parent
|
|
18
18
|
self.short_name = short_name
|
|
19
19
|
|
|
20
|
-
@property
|
|
21
|
-
def parent(self):
|
|
22
|
-
return self._parent
|
|
23
|
-
|
|
24
|
-
@parent.setter
|
|
25
|
-
def parent(self, value):
|
|
26
|
-
self._parent = value
|
|
27
|
-
|
|
28
20
|
@property
|
|
29
21
|
def shortName(self):
|
|
30
22
|
return self.short_name
|
|
@@ -35,10 +27,13 @@ class Referrable(ARObject, metaclass = ABCMeta):
|
|
|
35
27
|
|
|
36
28
|
def getShortName(self) -> str:
|
|
37
29
|
return self.short_name
|
|
30
|
+
|
|
31
|
+
def getParent(self):
|
|
32
|
+
return self.parent
|
|
38
33
|
|
|
39
34
|
@property
|
|
40
35
|
def full_name(self) -> str:
|
|
41
|
-
return self.
|
|
36
|
+
return self.parent.full_name + "/" + self.short_name
|
|
42
37
|
|
|
43
38
|
def getFullName(self) -> str:
|
|
44
39
|
return self.full_name
|
armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/PrimitiveTypes.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from abc import ABCMeta
|
|
2
2
|
import re
|
|
3
|
-
|
|
4
|
-
from
|
|
3
|
+
from typing import List
|
|
4
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
5
5
|
|
|
6
6
|
class ARType(metaclass = ABCMeta):
|
|
7
7
|
def __init__(self) -> None:
|
|
@@ -42,6 +42,9 @@ class ARNumerical(ARType):
|
|
|
42
42
|
m = re.match(r"0x([0-9a-f]+)", value, re.I)
|
|
43
43
|
if m:
|
|
44
44
|
return int(m.group(1), 16)
|
|
45
|
+
m = re.match(r'0b([\d]+)', value, re.I)
|
|
46
|
+
if m:
|
|
47
|
+
return int(m.group(1), 2)
|
|
45
48
|
m = re.match(r"-?\d+\.\d+", value)
|
|
46
49
|
if m:
|
|
47
50
|
return float(value)
|
|
@@ -99,6 +102,16 @@ class ARFloat(ARNumerical):
|
|
|
99
102
|
else:
|
|
100
103
|
return str(self._value)
|
|
101
104
|
|
|
105
|
+
class Float(ARFloat):
|
|
106
|
+
'''
|
|
107
|
+
An instance of Float is an element from the set of real numbers.
|
|
108
|
+
Tags:
|
|
109
|
+
* xml.xsd.customType=FLOAT
|
|
110
|
+
* xml.xsd.type=double
|
|
111
|
+
'''
|
|
112
|
+
def __init__(self):
|
|
113
|
+
super().__init__()
|
|
114
|
+
|
|
102
115
|
class TimeValue(ARFloat):
|
|
103
116
|
'''
|
|
104
117
|
This primitive type is taken for expressing time values. The numerical value is supposed to be interpreted
|
|
@@ -135,6 +148,23 @@ class ARLiteral(ARType):
|
|
|
135
148
|
def upper(self) -> str:
|
|
136
149
|
return self.value.upper()
|
|
137
150
|
|
|
151
|
+
class AREnum(ARLiteral):
|
|
152
|
+
def __init__(self, enum_values: List[str]):
|
|
153
|
+
super().__init__()
|
|
154
|
+
|
|
155
|
+
self.enumValues = enum_values # List[str]
|
|
156
|
+
|
|
157
|
+
def getEnumValues(self):
|
|
158
|
+
return self.enumValues
|
|
159
|
+
|
|
160
|
+
def setEnumValues(self, values: List[str]):
|
|
161
|
+
self.enumValues = values
|
|
162
|
+
return self
|
|
163
|
+
|
|
164
|
+
def validateEnumValue(self, value: str):
|
|
165
|
+
if value in self.enumValues:
|
|
166
|
+
return True
|
|
167
|
+
return False
|
|
138
168
|
|
|
139
169
|
class String(ARLiteral):
|
|
140
170
|
|
|
@@ -175,9 +205,9 @@ class ARBoolean(ARType):
|
|
|
175
205
|
|
|
176
206
|
def _convertStringToBoolean(self, value: str) -> bool:
|
|
177
207
|
value = value.lower()
|
|
178
|
-
if value == "true":
|
|
208
|
+
if value == "true" or value == "1":
|
|
179
209
|
return True
|
|
180
|
-
elif value == "false":
|
|
210
|
+
elif value == "false" or value == "0":
|
|
181
211
|
return False
|
|
182
212
|
else:
|
|
183
213
|
return self._convertNumberToBoolean(int(value))
|
|
@@ -237,6 +267,16 @@ class PositiveInteger(ARPositiveInteger):
|
|
|
237
267
|
def __init__(self):
|
|
238
268
|
super().__init__()
|
|
239
269
|
|
|
270
|
+
class PositiveUnlimitedInteger(ARPositiveInteger):
|
|
271
|
+
'''
|
|
272
|
+
This is a positive unlimited integer which can be denoted in decimal, binary, octal and hexadecimal.
|
|
273
|
+
|
|
274
|
+
Tags:
|
|
275
|
+
* xml.xsd.customType=POSITIVE-UNLIMITED-INTEGER
|
|
276
|
+
* xml.xsd.pattern=0|[\+]?[1-9][0-9]*|0[xX][0-9a-fA-F]+|0[bB][0-1]+|0[0-7]+
|
|
277
|
+
* xml.xsd.type=string
|
|
278
|
+
'''
|
|
279
|
+
|
|
240
280
|
class Integer(ARNumerical):
|
|
241
281
|
'''
|
|
242
282
|
An instance of Integer is an element in the set of integer numbers ( ..., -2, -1, 0, 1, 2, ...).
|
|
@@ -252,6 +292,34 @@ class Integer(ARNumerical):
|
|
|
252
292
|
def __init__(self):
|
|
253
293
|
super().__init__()
|
|
254
294
|
|
|
295
|
+
class UnlimitedInteger(Integer):
|
|
296
|
+
'''
|
|
297
|
+
An instance of UnlimitedInteger is an element in the set of integer numbers ( ..., -2, -1, 0, 1, 2, ...).
|
|
298
|
+
The range is limited by constraint 2534.
|
|
299
|
+
The value can be expressed in decimal, octal, hexadecimal and binary representation. Negative numbers
|
|
300
|
+
can only be expressed in decimal notation.
|
|
301
|
+
|
|
302
|
+
Tags:
|
|
303
|
+
* xml.xsd.customType=UNLIMITED-INTEGER
|
|
304
|
+
* xml.xsd.pattern=0|[\+\-]?[1-9][0-9]*|0[xX][0-9a-fA-F]+|0[bB][0-1]+|0[0-7]+
|
|
305
|
+
* xml.xsd.type=string
|
|
306
|
+
'''
|
|
307
|
+
def __init__(self):
|
|
308
|
+
super().__init__()
|
|
309
|
+
|
|
310
|
+
class Boolean(ARBoolean):
|
|
311
|
+
'''
|
|
312
|
+
A Boolean value denotes a logical condition that is either 'true' or 'false'. It can be one of "0", "1", "true",
|
|
313
|
+
"false"
|
|
314
|
+
|
|
315
|
+
Tags:
|
|
316
|
+
* xml.xsd.customType=BOOLEAN
|
|
317
|
+
* xml.xsd.pattern=0|1|true|false
|
|
318
|
+
* xml.xsd.type=string
|
|
319
|
+
'''
|
|
320
|
+
def __init__(self):
|
|
321
|
+
super().__init__()
|
|
322
|
+
|
|
255
323
|
class Identifier(ARLiteral):
|
|
256
324
|
'''
|
|
257
325
|
An Identifier is a string with a number of constraints on its appearance, satisfying the requirements typical
|
|
@@ -267,6 +335,21 @@ class Identifier(ARLiteral):
|
|
|
267
335
|
'''
|
|
268
336
|
def __init__(self):
|
|
269
337
|
super().__init__()
|
|
338
|
+
|
|
339
|
+
class RevisionLabelString(ARLiteral):
|
|
340
|
+
'''
|
|
341
|
+
This primitive represents an internal AUTOSAR revision label which identifies an engineering object. It
|
|
342
|
+
represents a pattern which
|
|
343
|
+
* supports three integers representing from left to right MajorVersion, MinorVersion, PatchVersion.
|
|
344
|
+
* may add an application specific suffix separated by one of ".", "_", ";".
|
|
345
|
+
Legal patterns are for example:
|
|
346
|
+
* 4.0.0
|
|
347
|
+
* 4.0.0.1234565
|
|
348
|
+
* 4.0.0_vendor specific;13
|
|
349
|
+
* 4.0.0;12
|
|
350
|
+
'''
|
|
351
|
+
|
|
352
|
+
|
|
270
353
|
class Limit(ARObject):
|
|
271
354
|
def __init__(self):
|
|
272
355
|
super().__init__()
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
from . import *
|