armodel 1.6.2__py3-none-any.whl → 1.6.4__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 +13 -10
- armodel/cli/arxml_format_cli.py +1 -2
- armodel/cli/connector2xlsx_cli.py +2 -3
- armodel/cli/connector_update_cli.py +2 -5
- 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 +3 -3
- armodel/lib/system_signal.py +3 -5
- armodel/models/{m2/autosar_templates/autosar_top_level_structure.py → M2/AUTOSARTemplates/AutosarTopLevelStructure.py} +5 -7
- armodel/models/{bsw_module_template.py → M2/AUTOSARTemplates/BswModuleTemplate/BswBehavior.py} +113 -140
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswImplementation.py +60 -0
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswInterfaces.py +52 -0
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswOverview.py +77 -0
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/__init__.py +4 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/Implementation.py +238 -0
- armodel/models/{m2/autosar_templates/common_structure/implementation_data_types.py → M2/AUTOSARTemplates/CommonStructure/ImplementationDataTypes.py} +7 -6
- armodel/models/M2/AUTOSARTemplates/CommonStructure/InternalBehavior.py +119 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ModeDeclaration.py +96 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ResourceConsumption/MemorySectionUsage.py +69 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ResourceConsumption/__init__.py +20 -0
- armodel/models/{service_needs.py → M2/AUTOSARTemplates/CommonStructure/ServiceNeeds.py} +13 -9
- armodel/models/M2/AUTOSARTemplates/CommonStructure/SwcBswMapping.py +35 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/SwcInternalBehavior/ModeDeclarationGroup.py +24 -0
- 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 +9 -0
- armodel/models/{m2/autosar_templates/common_structure → M2/AUTOSARTemplates/CommonStructure}/__init__.py +4 -3
- armodel/models/{m2/autosar_templates/ecuc_description_template.py → M2/AUTOSARTemplates/ECUCDescriptionTemplate.py} +6 -7
- armodel/models/{m2/autosar_templates/generic_structure/abstract_structure.py → M2/AUTOSARTemplates/GenericStructure/AbstractStructure.py} +25 -5
- armodel/models/{m2/autosar_templates/generic_structure/ar_package.py → M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ARPackage.py} +41 -29
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ArObject.py +16 -0
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ElementCollection.py +1 -0
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/EngineeringObject.py +52 -0
- armodel/models/{general_structure.py → M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/Identifiable.py} +42 -159
- armodel/models/{ar_object.py → M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/PrimitiveTypes.py} +179 -71
- armodel/models/M2/AUTOSARTemplates/GenericStructure/__init__.py +1 -0
- armodel/models/{m2/autosar_templates/sw_component_template/communication.py → M2/AUTOSARTemplates/SWComponentTemplate/Communication.py} +22 -5
- armodel/models/{m2/autosar_templates/sw_component_template/components/instance_refs.py → M2/AUTOSARTemplates/SWComponentTemplate/Components/InstanceRefs.py} +2 -4
- armodel/models/{m2/autosar_templates/sw_component_template/components → M2/AUTOSARTemplates/SWComponentTemplate/Components}/__init__.py +114 -10
- armodel/models/{m2/autosar_templates/sw_component_template/composition/instance_refs.py → M2/AUTOSARTemplates/SWComponentTemplate/Composition/InstanceRefs.py} +2 -5
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Composition/__init__.py +96 -0
- armodel/models/{m2/autosar_templates/sw_component_template/data_type/data_prototypes.py → M2/AUTOSARTemplates/SWComponentTemplate/Datatype/DataPrototypes.py} +24 -8
- armodel/models/{datatype.py → M2/AUTOSARTemplates/SWComponentTemplate/Datatype/Datatypes.py} +16 -73
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/EndToEndProtection.py +177 -0
- armodel/models/{m2/autosar_templates/sw_component_template/port_interface/instance_refs.py → M2/AUTOSARTemplates/SWComponentTemplate/PortInterface/InstanceRefs.py} +2 -2
- armodel/models/{m2/autosar_templates/sw_component_template/port_interface → M2/AUTOSARTemplates/SWComponentTemplate/PortInterface}/__init__.py +10 -6
- armodel/models/{rpt_scenario.py → M2/AUTOSARTemplates/SWComponentTemplate/RPTScenario.py} +4 -6
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcImplementation.py +34 -0
- armodel/models/{m2/autosar_templates/sw_component_template/swc_internal_behavior/access_count.py → M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/AccessCount.py} +2 -2
- armodel/models/{m2/autosar_templates/sw_component_template/swc_internal_behavior/data_elements.py → M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/DataElements.py} +7 -5
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/IncludedDataTypes.py +24 -0
- armodel/models/{m2/autosar_templates/sw_component_template/swc_internal_behavior/instance_refs_usage.py → M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/InstanceRefsUsage.py} +3 -3
- armodel/models/{m2/autosar_templates/sw_component_template/swc_internal_behavior/mode_declaration_group.py → M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ModeDeclarationGroup.py} +4 -4
- armodel/models/{per_instance_memory.py → M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/PerInstanceMemory.py} +5 -6
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/PortAPIOptions.py +86 -0
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/RTEEvents.py +174 -0
- armodel/models/{m2/autosar_templates/sw_component_template/swc_internal_behavior/server_call.py → M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ServerCall.py} +3 -4
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ServiceMapping.py +57 -0
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/Trigger.py +8 -0
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/__init__.py +358 -0
- armodel/models/{m2/autosar_templates/system_template/data_mapping.py → M2/AUTOSARTemplates/SystemTemplate/DataMapping.py} +2 -3
- armodel/models/{fibex/can_communication.py → M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Can/CanCommunication.py} +3 -3
- 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} +5 -2
- armodel/models/{fibex/fibex_4_multiplatform.py → M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Multiplatform.py} +5 -4
- armodel/models/{fibex/fibex_core/core_communication.py → M2/AUTOSARTemplates/SystemTemplate/Fibex/FibexCore/CoreCommunication.py} +4 -6
- armodel/models/{fibex/fibex_core/core_topology.py → M2/AUTOSARTemplates/SystemTemplate/Fibex/FibexCore/CoreTopology.py} +6 -7
- armodel/models/{m2/autosar_templates/system_template/instance_refs.py → M2/AUTOSARTemplates/SystemTemplate/InstanceRefs.py} +2 -2
- armodel/models/{m2/autosar_templates/system_template/network_management.py → M2/AUTOSARTemplates/SystemTemplate/NetworkManagement.py} +5 -6
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/TransportProtocols.py +6 -0
- armodel/models/{m2/autosar_templates/system_template → M2/AUTOSARTemplates/SystemTemplate}/__init__.py +3 -4
- armodel/models/M2/MSR/AsamHdo/AdminData.py +18 -0
- armodel/models/M2/MSR/AsamHdo/BaseTypes.py +77 -0
- armodel/models/{m2_msr.py → M2/MSR/AsamHdo/ComputationMethod.py} +43 -28
- armodel/models/{global_constraints.py → M2/MSR/AsamHdo/Constraints/GlobalConstraints.py} +6 -4
- armodel/models/M2/MSR/AsamHdo/SpecialData.py +60 -0
- armodel/models/{m2/msr/asam_hdo/units.py → M2/MSR/AsamHdo/Units.py} +3 -3
- armodel/models/M2/MSR/CalibrationData/CalibrationValue.py +26 -0
- armodel/models/{m2/msr/data_dictionary/auxillary_objects.py → M2/MSR/DataDictionary/AuxillaryObjects.py} +3 -4
- armodel/models/M2/MSR/DataDictionary/Axis.py +145 -0
- armodel/models/M2/MSR/DataDictionary/CalibrationParameter.py +37 -0
- armodel/models/{m2/msr/data_dictionary/data_def_properties.py → M2/MSR/DataDictionary/DataDefProperties.py} +19 -10
- armodel/models/{record_layout.py → M2/MSR/DataDictionary/RecordLayout.py} +26 -25
- armodel/models/{annotation.py → M2/MSR/Documentation/Annotation.py} +8 -10
- armodel/models/{m2/msr/documentation/block_elements.py → M2/MSR/Documentation/BlockElements.py} +2 -2
- armodel/models/M2/MSR/Documentation/TextModel/LanguageDataModel.py +16 -0
- armodel/models/{multilanguage_data.py → M2/MSR/Documentation/TextModel/MultilanguageData.py} +20 -32
- armodel/models/M2/MSR/Documentation/TextModel/__init__.py +0 -0
- armodel/models/M2/MSR/Documentation/__init__.py +3 -0
- armodel/models/M2/MSR/__init__.py +1 -0
- armodel/models/M2/__init__.py +0 -0
- armodel/models/__init__.py +50 -24
- armodel/parser/abstract_arxml_parser.py +8 -4
- armodel/parser/arxml_parser.py +117 -90
- armodel/parser/connector_xlsx_parser.py +5 -3
- armodel/parser/file_parser.py +2 -1
- armodel/report/connector_xls_report.py +3 -2
- armodel/tests/test_armodel/models/test_ar_object.py +2 -3
- armodel/tests/test_armodel/models/test_ar_package.py +21 -9
- armodel/tests/test_armodel/models/test_ar_ref.py +7 -5
- armodel/tests/test_armodel/models/test_bsw_module_template.py +5 -1
- armodel/tests/test_armodel/models/test_common_structure.py +11 -5
- armodel/tests/test_armodel/models/test_data_dictionary.py +2 -2
- armodel/tests/test_armodel/models/test_data_prototype.py +8 -4
- armodel/tests/test_armodel/models/test_datatype.py +28 -14
- armodel/tests/test_armodel/models/test_general_structure.py +12 -2
- armodel/tests/test_armodel/models/test_implementation.py +3 -2
- armodel/tests/test_armodel/models/test_m2_msr.py +4 -2
- armodel/tests/test_armodel/models/test_port_interface.py +21 -11
- armodel/tests/test_armodel/models/test_port_prototype.py +1 -1
- armodel/tests/test_armodel/parser/test_parse_bswmd.py +13 -13
- armodel/tests/test_armodel/parser/test_sw_components.py +2 -2
- armodel/tests/test_armodel/parser/test_system.py +30 -0
- armodel/writer/abstract_arxml_writer.py +5 -2
- armodel/writer/arxml_writer.py +136 -91
- {armodel-1.6.2.dist-info → armodel-1.6.4.dist-info}/METADATA +16 -1
- armodel-1.6.4.dist-info/RECORD +156 -0
- armodel/lib/data_analyzer.py +0 -34
- armodel/models/ar_package.py +0 -641
- armodel/models/ar_ref.py +0 -25
- armodel/models/calibration.py +0 -119
- armodel/models/common_structure.py +0 -272
- armodel/models/communication.py +0 -17
- armodel/models/data_def_properties.py +0 -16
- armodel/models/data_dictionary.py +0 -59
- armodel/models/data_prototype.py +0 -103
- armodel/models/end_to_end_protection.py +0 -67
- armodel/models/fibex/fibex_core.py +0 -341
- armodel/models/fibex/lin_topology.py +0 -7
- armodel/models/implementation.py +0 -135
- armodel/models/internal_behavior.py +0 -63
- armodel/models/m2/autosar_templates/common_structure/implementation.py +0 -21
- armodel/models/m2/autosar_templates/sw_component_template/composition/__init__.py +0 -154
- armodel/models/m2/autosar_templates/sw_component_template/port_interface.py +0 -236
- armodel/models/m2/autosar_templates/sw_component_template/swc_internal_behavior/__init__.py +0 -203
- armodel/models/m2/autosar_templates/sw_component_template/swc_internal_behavior/trigger.py +0 -10
- armodel/models/m2/autosar_templates/system_template/transport_protocols.py +0 -7
- armodel/models/mode_declaration.py +0 -8
- armodel/models/port_interface.py +0 -165
- armodel/models/port_prototype.py +0 -6
- armodel/models/service_mapping.py +0 -11
- armodel/models/sw_component.py +0 -385
- armodel/models/system_template/network_management.py +0 -7
- armodel/models/system_template/transport_protocols.py +0 -7
- armodel/models/timing.py +0 -91
- armodel/models/unit.py +0 -14
- armodel-1.6.2.dist-info/RECORD +0 -142
- /armodel/models/{fibex → M2/AUTOSARTemplates/CommonStructure/SwcInternalBehavior}/__init__.py +0 -0
- /armodel/models/{fibex/fibex_4_can → M2/AUTOSARTemplates/CommonStructure/Timing/TimingConstraint}/__init__.py +0 -0
- /armodel/models/{fibex/fibex_4_lin → M2/AUTOSARTemplates/CommonStructure/Timing}/__init__.py +0 -0
- /armodel/models/{fibex/fibex_core → M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses}/__init__.py +0 -0
- /armodel/models/{m2 → M2/AUTOSARTemplates/SWComponentTemplate/Datatype}/__init__.py +0 -0
- /armodel/models/{m2/autosar_templates → M2/AUTOSARTemplates/SWComponentTemplate}/__init__.py +0 -0
- /armodel/models/{m2/autosar_templates/generic_structure → M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Can}/__init__.py +0 -0
- /armodel/models/{m2/autosar_templates/sw_component_template → M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Ethernet}/__init__.py +0 -0
- /armodel/models/{m2/autosar_templates/sw_component_template/data_type → M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Lin}/__init__.py +0 -0
- /armodel/models/{m2/msr → M2/AUTOSARTemplates/SystemTemplate/Fibex/FibexCore}/__init__.py +0 -0
- /armodel/models/{m2/msr/asam_hdo → M2/AUTOSARTemplates/SystemTemplate/Fibex}/__init__.py +0 -0
- /armodel/models/{m2/msr/data_dictionary → M2/AUTOSARTemplates}/__init__.py +0 -0
- /armodel/models/{m2/msr/documentation → M2/MSR/AsamHdo/Constraints}/__init__.py +0 -0
- /armodel/models/{system_template → M2/MSR/AsamHdo}/__init__.py +0 -0
- /armodel/models/{ecuc_parameter_def_template.py → M2/MSR/CalibrationData/__init__.py} +0 -0
- /armodel/models/{m2/autosar_templates/common_structure/constants.py → M2/MSR/DataDictionary/__init__.py} +0 -0
- {armodel-1.6.2.dist-info → armodel-1.6.4.dist-info}/LICENSE +0 -0
- {armodel-1.6.2.dist-info → armodel-1.6.4.dist-info}/WHEEL +0 -0
- {armodel-1.6.2.dist-info → armodel-1.6.4.dist-info}/entry_points.txt +0 -0
- {armodel-1.6.2.dist-info → armodel-1.6.4.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
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
|
|
4
|
+
from typing import List
|
|
5
|
+
|
|
6
|
+
class ResourceConsumption(Identifiable):
|
|
7
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
8
|
+
super().__init__(parent, short_name)
|
|
9
|
+
|
|
10
|
+
def createMemorySection(self, short_name: str) -> MemorySection:
|
|
11
|
+
if (short_name not in self.elements):
|
|
12
|
+
entry = MemorySection(self, short_name)
|
|
13
|
+
self.elements[short_name] = entry
|
|
14
|
+
return self.elements[short_name]
|
|
15
|
+
|
|
16
|
+
def getMemorySections(self) -> List[MemorySection]:
|
|
17
|
+
return list(filter(lambda a : isinstance(a, MemorySection), self.elements.values()))
|
|
18
|
+
|
|
19
|
+
def getMemorySection(self, short_name: str) -> MemorySection:
|
|
20
|
+
return next(filter(lambda o: isinstance(o, MemorySection) and (o.short_name == short_name), self.elements.values()), None)
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
2
1
|
from abc import ABCMeta
|
|
3
|
-
|
|
4
|
-
from .
|
|
5
|
-
from .
|
|
6
|
-
from .
|
|
7
|
-
from .ar_object import ARBoolean, ARLiteral, ARObject
|
|
8
|
-
|
|
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
|
|
9
6
|
|
|
10
7
|
class RoleBasedDataAssignment(ARObject):
|
|
11
8
|
def __init__(self):
|
|
@@ -16,13 +13,15 @@ class RoleBasedDataAssignment(ARObject):
|
|
|
16
13
|
self.used_parameter_element = None # type: AutosarParameterRef
|
|
17
14
|
self.used_pim_ref = None # type: RefType
|
|
18
15
|
|
|
16
|
+
|
|
19
17
|
class ServiceNeeds(Identifiable, metaclass = ABCMeta):
|
|
20
18
|
def __init__(self, parent: ARObject, short_name: str):
|
|
21
19
|
if type(self) == ServiceNeeds:
|
|
22
20
|
raise NotImplementedError("ServiceNeeds is an abstract class.")
|
|
23
|
-
|
|
21
|
+
|
|
24
22
|
super().__init__(parent, short_name)
|
|
25
23
|
|
|
24
|
+
|
|
26
25
|
class NvBlockNeeds(ServiceNeeds):
|
|
27
26
|
def __init__(self, parent: ARObject, short_name: str):
|
|
28
27
|
super().__init__(parent, short_name)
|
|
@@ -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)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
from typing import List
|
|
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
|
|
5
|
+
|
|
6
|
+
class SwcBswRunnableMapping(ARObject):
|
|
7
|
+
def __init__(self):
|
|
8
|
+
'''
|
|
9
|
+
Maps a BswModuleEntity to a RunnableEntity if it is implemented as part of a BSW
|
|
10
|
+
module (in the case of an AUTOSAR Service, a Complex Driver or an ECU
|
|
11
|
+
Abstraction). The mapping can be used by a tool to find relevant information on the
|
|
12
|
+
behavior, e.g. whether the bswEntity shall be running in interrupt context.
|
|
13
|
+
|
|
14
|
+
'''
|
|
15
|
+
super().__init__()
|
|
16
|
+
|
|
17
|
+
self.bswEntityRef = None # type: RefType
|
|
18
|
+
self.swcRunnableRef = None # type: RefType
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class SwcBswMapping(Identifiable):
|
|
22
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
23
|
+
super().__init__(parent, short_name)
|
|
24
|
+
|
|
25
|
+
self.bswBehaviorRef = None # type: RefType
|
|
26
|
+
self._runnableMappings = []
|
|
27
|
+
self.swcBehaviorRef = None # type: RefType
|
|
28
|
+
self.synchronizedModeGroups = []
|
|
29
|
+
self.synchronizedTriggers = []
|
|
30
|
+
|
|
31
|
+
def addRunnableMapping(self, mapping: SwcBswRunnableMapping):
|
|
32
|
+
self._runnableMappings.append(mapping)
|
|
33
|
+
|
|
34
|
+
def getRunnableMappings(self) -> List[SwcBswRunnableMapping]:
|
|
35
|
+
return self._runnableMappings
|
armodel/models/M2/AUTOSARTemplates/CommonStructure/SwcInternalBehavior/ModeDeclarationGroup.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
2
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARLiteral, RefType
|
|
3
|
+
from typing import List
|
|
4
|
+
|
|
5
|
+
class IncludedModeDeclarationGroupSet(ARObject):
|
|
6
|
+
def __init__(self):
|
|
7
|
+
super().__init__()
|
|
8
|
+
|
|
9
|
+
self.mode_declaration_group_refs = [] # type: List[RefType]
|
|
10
|
+
self.prefix = None # type: ARLiteral
|
|
11
|
+
|
|
12
|
+
def addModeDeclarationGroupRef(self, ref: RefType):
|
|
13
|
+
self.mode_declaration_group_refs.append(ref)
|
|
14
|
+
return self
|
|
15
|
+
|
|
16
|
+
def getModeDeclarationGroupRefs(self) -> List[RefType]:
|
|
17
|
+
return self.mode_declaration_group_refs
|
|
18
|
+
|
|
19
|
+
def setPrefix(self, prefix: str):
|
|
20
|
+
self.prefix = prefix
|
|
21
|
+
return self
|
|
22
|
+
|
|
23
|
+
def getPrefix(self) -> ARLiteral:
|
|
24
|
+
return self.prefix
|
|
@@ -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)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
2
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Identifiable
|
|
3
|
+
|
|
4
|
+
class Trigger(Identifiable):
|
|
5
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
6
|
+
super().__init__(parent, short_name)
|
|
7
|
+
|
|
8
|
+
self.swImplPolicy = None # type: str
|
|
9
|
+
self.triggerPeriod = None # type: float
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
from abc import ABCMeta
|
|
2
2
|
from typing import List
|
|
3
|
-
|
|
4
|
-
from
|
|
5
|
-
from ....
|
|
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
|
|
6
7
|
|
|
7
8
|
class ValueSpecification(ARObject, metaclass = ABCMeta):
|
|
8
9
|
'''
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
from abc import ABCMeta
|
|
2
2
|
from typing import List
|
|
3
|
-
|
|
4
|
-
from
|
|
5
|
-
from
|
|
6
|
-
from ...
|
|
7
|
-
from ...
|
|
8
|
-
from ...
|
|
9
|
-
from ...general_structure 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
|
|
10
9
|
|
|
11
10
|
class EcucValueCollection(ARElement):
|
|
12
11
|
def __init__(self, parent: ARObject, short_name: str):
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
|
|
2
2
|
from abc import ABCMeta
|
|
3
3
|
from typing import List
|
|
4
|
-
|
|
5
|
-
from ....
|
|
6
|
-
from ....
|
|
7
|
-
|
|
8
|
-
|
|
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
|
|
9
7
|
class AtpInstanceRef(ARObject, metaclass = ABCMeta):
|
|
10
8
|
def __init__(self):
|
|
11
9
|
|
|
@@ -67,3 +65,25 @@ class AnyInstanceRef(ARObject):
|
|
|
67
65
|
def setTargetRef(self, value:RefType):
|
|
68
66
|
self.targetRef = value
|
|
69
67
|
return self
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
class AtpFeature(Identifiable, metaclass = ABCMeta):
|
|
71
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
72
|
+
if type(self) == AtpFeature:
|
|
73
|
+
raise NotImplementedError("AtpFeature is an abstract class.")
|
|
74
|
+
super().__init__(parent, short_name)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
class AtpStructureElement(AtpFeature, metaclass=ABCMeta):
|
|
78
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
79
|
+
if type(self) == AtpFeature:
|
|
80
|
+
raise NotImplementedError("AtpStructureElement is an abstract class.")
|
|
81
|
+
super().__init__(parent, short_name)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
class AtpType(ARElement, metaclass=ABCMeta):
|
|
85
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
86
|
+
if type(self) == AtpType:
|
|
87
|
+
raise NotImplementedError("AtpType is an abstract class.")
|
|
88
|
+
|
|
89
|
+
super().__init__(parent, short_name)
|
|
@@ -1,32 +1,38 @@
|
|
|
1
|
-
from armodel.models.bsw_module_template import BswModuleDescription, BswModuleEntry
|
|
2
|
-
from armodel.models.common_structure import ModeDeclarationGroup
|
|
3
|
-
from armodel.models.datatype import ApplicationArrayDataType, ApplicationDataType, ApplicationPrimitiveDataType, ApplicationRecordDataType, DataTypeMappingSet, SwBaseType
|
|
4
|
-
from armodel.models.end_to_end_protection import EndToEndProtectionSet
|
|
5
|
-
from armodel.models.fibex.can_communication import CanFrame
|
|
6
|
-
from armodel.models.fibex.fibex_4_multiplatform import Gateway
|
|
7
|
-
from armodel.models.fibex.fibex_core.core_communication import DcmIPdu, ISignal, ISignalGroup, ISignalIPdu, ISignalIPduGroup, NPdu, NmPdu, SecuredIPdu, SystemSignal, SystemSignalGroup
|
|
8
|
-
from armodel.models.fibex.fibex_core.core_topology import CanCluster, EcuInstance, LinCluster
|
|
9
|
-
from armodel.models.fibex.lin_communication import LinUnconditionalFrame
|
|
10
|
-
from armodel.models.general_structure import ARObject, CollectableElement, Identifiable, Referrable, SwcBswMapping
|
|
11
|
-
from armodel.models.global_constraints import DataConstr
|
|
12
|
-
from armodel.models.implementation import BswImplementation, Implementation, SwcImplementation
|
|
13
|
-
from armodel.models.m2.autosar_templates.common_structure import ConstantSpecification
|
|
14
|
-
from armodel.models.m2.autosar_templates.common_structure.implementation_data_types import ImplementationDataType
|
|
15
|
-
from armodel.models.m2.autosar_templates.ecuc_description_template import EcucModuleConfigurationValues, EcucValueCollection
|
|
16
|
-
from armodel.models.m2.autosar_templates.sw_component_template.components import SwComponentType
|
|
17
|
-
from armodel.models.m2.autosar_templates.sw_component_template.composition import CompositionSwComponentType
|
|
18
|
-
from armodel.models.m2.autosar_templates.sw_component_template.port_interface import ClientServerInterface, ModeSwitchInterface, ParameterInterface, SenderReceiverInterface, TriggerInterface
|
|
19
|
-
from armodel.models.m2.autosar_templates.system_template import System
|
|
20
|
-
from armodel.models.m2.autosar_templates.system_template.network_management import NmConfig
|
|
21
|
-
from armodel.models.m2.autosar_templates.system_template.transport_protocols import CanTpConfig
|
|
22
|
-
from armodel.models.m2.msr.asam_hdo.units import PhysicalDimension, Unit
|
|
23
|
-
from armodel.models.m2.msr.data_dictionary.auxillary_objects import SwAddrMethod
|
|
24
|
-
from armodel.models.m2_msr import CompuMethod
|
|
25
|
-
from armodel.models.record_layout import SwRecordLayout
|
|
26
|
-
from armodel.models.sw_component import ApplicationSwComponentType, AtomicSwComponentType, ComplexDeviceDriverSwComponentType, EcuAbstractionSwComponentType, SensorActuatorSwComponentType, ServiceSwComponentType
|
|
27
|
-
from armodel.models.timing import SwcTiming
|
|
28
|
-
|
|
29
1
|
from typing import Dict, List
|
|
2
|
+
from .....M2.AUTOSARTemplates.CommonStructure.Timing.TimingConstraint.TimingExtensions import SwcTiming
|
|
3
|
+
from .....M2.AUTOSARTemplates.SWComponentTemplate.Components import CompositionSwComponentType, ServiceSwComponentType, SwComponentType, ApplicationSwComponentType, AtomicSwComponentType, ComplexDeviceDriverSwComponentType, EcuAbstractionSwComponentType, SensorActuatorSwComponentType
|
|
4
|
+
from .....M2.AUTOSARTemplates.SystemTemplate.Fibex.Fibex4Ethernet.EthernetFrame import GenericEthernetFrame
|
|
5
|
+
from .....M2.MSR.AsamHdo.BaseTypes import SwBaseType
|
|
6
|
+
from .....M2.MSR.AsamHdo.Units import PhysicalDimension, Unit
|
|
7
|
+
from .....M2.MSR.AsamHdo.Constraints.GlobalConstraints import DataConstr
|
|
8
|
+
from .....M2.MSR.AsamHdo.ComputationMethod import CompuMethod
|
|
9
|
+
from .....M2.MSR.DataDictionary.AuxillaryObjects import SwAddrMethod
|
|
10
|
+
from .....M2.MSR.DataDictionary.RecordLayout import SwRecordLayout
|
|
11
|
+
from .....M2.AUTOSARTemplates.BswModuleTemplate.BswOverview import BswModuleDescription
|
|
12
|
+
from .....M2.AUTOSARTemplates.CommonStructure.Implementation import Implementation
|
|
13
|
+
from .....M2.AUTOSARTemplates.BswModuleTemplate.BswImplementation import BswImplementation
|
|
14
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
15
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import CollectableElement
|
|
16
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Identifiable, Referrable
|
|
17
|
+
from .....M2.AUTOSARTemplates.SWComponentTemplate.Datatype.Datatypes import ApplicationArrayDataType, ApplicationDataType, ApplicationPrimitiveDataType, ApplicationRecordDataType
|
|
18
|
+
from .....M2.AUTOSARTemplates.BswModuleTemplate.BswInterfaces import BswModuleEntry
|
|
19
|
+
from .....M2.AUTOSARTemplates.CommonStructure.ModeDeclaration import ModeDeclarationGroup
|
|
20
|
+
from .....M2.AUTOSARTemplates.SWComponentTemplate.Datatype.Datatypes import DataTypeMappingSet
|
|
21
|
+
from .....M2.AUTOSARTemplates.SWComponentTemplate.EndToEndProtection import EndToEndProtectionSet
|
|
22
|
+
from .....M2.AUTOSARTemplates.SystemTemplate.Fibex.Fibex4Can.CanCommunication import CanFrame
|
|
23
|
+
from .....M2.AUTOSARTemplates.SystemTemplate.Fibex.Fibex4Multiplatform import Gateway
|
|
24
|
+
from .....M2.AUTOSARTemplates.SystemTemplate.Fibex.FibexCore.CoreCommunication import DcmIPdu, ISignal, ISignalGroup, ISignalIPdu, ISignalIPduGroup, NPdu, NmPdu, SecuredIPdu, SystemSignal, SystemSignalGroup
|
|
25
|
+
from .....M2.AUTOSARTemplates.SystemTemplate.Fibex.FibexCore.CoreTopology import CanCluster, EcuInstance, LinCluster
|
|
26
|
+
from .....M2.AUTOSARTemplates.SystemTemplate.Fibex.Fibex4Lin.LinCommunication import LinUnconditionalFrame
|
|
27
|
+
from .....M2.AUTOSARTemplates.CommonStructure.SwcBswMapping import SwcBswMapping
|
|
28
|
+
from .....M2.AUTOSARTemplates.SWComponentTemplate.SwcImplementation import SwcImplementation
|
|
29
|
+
from .....M2.AUTOSARTemplates.CommonStructure import ConstantSpecification
|
|
30
|
+
from .....M2.AUTOSARTemplates.CommonStructure.ImplementationDataTypes import ImplementationDataType
|
|
31
|
+
from .....M2.AUTOSARTemplates.ECUCDescriptionTemplate import EcucModuleConfigurationValues, EcucValueCollection
|
|
32
|
+
from .....M2.AUTOSARTemplates.SWComponentTemplate.PortInterface import ClientServerInterface, ModeSwitchInterface, ParameterInterface, SenderReceiverInterface, TriggerInterface
|
|
33
|
+
from .....M2.AUTOSARTemplates.SystemTemplate import System
|
|
34
|
+
from .....M2.AUTOSARTemplates.SystemTemplate.NetworkManagement import NmConfig
|
|
35
|
+
from .....M2.AUTOSARTemplates.SystemTemplate.TransportProtocols import CanTpConfig
|
|
30
36
|
|
|
31
37
|
class ARPackage(Identifiable, CollectableElement):
|
|
32
38
|
def __init__(self, parent: ARObject, short_name: str):
|
|
@@ -103,6 +109,12 @@ class ARPackage(Identifiable, CollectableElement):
|
|
|
103
109
|
sr_interface = ParameterInterface(self, short_name)
|
|
104
110
|
self.addElement(sr_interface)
|
|
105
111
|
return self.getElement(short_name)
|
|
112
|
+
|
|
113
|
+
def createGenericEthernetFrame(self, short_name: str) -> GenericEthernetFrame:
|
|
114
|
+
if (short_name not in self.elements):
|
|
115
|
+
sr_interface = GenericEthernetFrame(self, short_name)
|
|
116
|
+
self.addElement(sr_interface)
|
|
117
|
+
return self.getElement(short_name)
|
|
106
118
|
|
|
107
119
|
def createClientServerInterface(self, short_name: str) -> ClientServerInterface:
|
|
108
120
|
if (short_name not in self.elements):
|
|
@@ -525,4 +537,4 @@ class ARPackage(Identifiable, CollectableElement):
|
|
|
525
537
|
return list(sorted(filter(lambda a : isinstance(a, ISignalIPdu), self.elements.values()), key = lambda a: a.short_name))
|
|
526
538
|
|
|
527
539
|
def getSystems(self) -> List[System]:
|
|
528
|
-
return list(sorted(filter(lambda a : isinstance(a, System), self.elements.values()), key = lambda a: a.short_name))
|
|
540
|
+
return list(sorted(filter(lambda a : isinstance(a, System), self.elements.values()), key = lambda a: a.short_name))
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from abc import ABCMeta
|
|
2
|
+
from typing import Dict
|
|
3
|
+
|
|
4
|
+
class ARObject(metaclass = ABCMeta):
|
|
5
|
+
def __init__(self):
|
|
6
|
+
if type(self) == ARObject:
|
|
7
|
+
raise NotImplementedError("ARObject is an abstract class.")
|
|
8
|
+
|
|
9
|
+
self.parent = None # type: ARObject
|
|
10
|
+
self.checksum = None # type: str
|
|
11
|
+
|
|
12
|
+
self.timestamp = None # type: str
|
|
13
|
+
self.uuid = None # type: str
|
|
14
|
+
|
|
15
|
+
def getTagName(self, tag: str, nsmap: Dict) -> str:
|
|
16
|
+
return tag.replace("{%s}" % nsmap["xmlns"], "")
|
armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ElementCollection.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/EngineeringObject.py
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
2
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARLiteral
|
|
3
|
+
from abc import ABCMeta
|
|
4
|
+
|
|
5
|
+
class EngineeringObject(ARObject, metaclass=ABCMeta):
|
|
6
|
+
def __init__(self):
|
|
7
|
+
if type(self) == EngineeringObject:
|
|
8
|
+
raise NotImplementedError("EngineeringObject is an abstract class.")
|
|
9
|
+
|
|
10
|
+
super().__init__()
|
|
11
|
+
|
|
12
|
+
self.category = None # type: ARLiteral
|
|
13
|
+
self.domain = None # type: ARLiteral
|
|
14
|
+
self.revision_label = None # type: ARLiteral
|
|
15
|
+
self.short_label = None # type: ARLiteral
|
|
16
|
+
|
|
17
|
+
def setCategory(self, category: any):
|
|
18
|
+
if isinstance(category, ARLiteral):
|
|
19
|
+
self.category = category
|
|
20
|
+
else:
|
|
21
|
+
self.category = ARLiteral()
|
|
22
|
+
self.category.setValue(str(category))
|
|
23
|
+
return self
|
|
24
|
+
|
|
25
|
+
def getCategory(self) -> ARLiteral:
|
|
26
|
+
return self.category
|
|
27
|
+
|
|
28
|
+
def setDomain(self, domain: ARLiteral):
|
|
29
|
+
self.domain = domain
|
|
30
|
+
return self
|
|
31
|
+
|
|
32
|
+
def getDomain(self) -> ARLiteral:
|
|
33
|
+
return self.domain
|
|
34
|
+
|
|
35
|
+
def setRevisionLabel(self, revision_label: ARLiteral):
|
|
36
|
+
self.revision_label = revision_label
|
|
37
|
+
return self
|
|
38
|
+
|
|
39
|
+
def getRevisionLabel(self) -> ARLiteral:
|
|
40
|
+
return self.revision_label
|
|
41
|
+
|
|
42
|
+
def setShortLabel(self, label: ARLiteral):
|
|
43
|
+
self.short_label = label
|
|
44
|
+
return self
|
|
45
|
+
|
|
46
|
+
def getShortLabel(self) -> ARLiteral:
|
|
47
|
+
return self.short_label
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class AutosarEngineeringObject(EngineeringObject):
|
|
51
|
+
def __init__(self):
|
|
52
|
+
super().__init__()
|