armodel 1.6.1__py3-none-any.whl → 1.6.3__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 +31 -25
- armodel/cli/arxml_format_cli.py +1 -4
- armodel/cli/connector_update_cli.py +1 -1
- armodel/cli/swc_list_cli.py +1 -1
- armodel/lib/sw_component.py +3 -1
- armodel/lib/system_signal.py +3 -1
- armodel/models/M2/AUTOSARTemplates/AutosarTopLevelStructure.py +123 -0
- armodel/models/{bsw_module_template.py → M2/AUTOSARTemplates/BswModuleTemplate/BswBehavior.py} +115 -140
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswImplementation.py +21 -0
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswInterfaces.py +52 -0
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswOverview.py +78 -0
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/__init__.py +1 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/Implementation.py +81 -0
- armodel/models/{m2/autosar_templates/common_structure/implementation_data_types.py → M2/AUTOSARTemplates/CommonStructure/ImplementationDataTypes.py} +20 -10
- armodel/models/M2/AUTOSARTemplates/CommonStructure/InternalBehavior.py +108 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ModeDeclaration.py +96 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ResourceConsumption/MemorySectionUsage.py +72 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ResourceConsumption/__init__.py +22 -0
- armodel/models/{service_needs.py → M2/AUTOSARTemplates/CommonStructure/ServiceNeeds.py} +7 -7
- armodel/models/M2/AUTOSARTemplates/CommonStructure/SwcBswMapping.py +36 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/SwcInternalBehavior/ModeDeclarationGroup.py +27 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/SwcInternalBehavior/__init__.py +1 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/TriggerDeclaration.py +9 -0
- armodel/models/{m2/autosar_templates/common_structure → M2/AUTOSARTemplates/CommonStructure}/__init__.py +5 -2
- armodel/models/{m2/autosar_templates/generic_structure/abstract_structure.py → M2/AUTOSARTemplates/GenericStructure/AbstractStructure.py} +25 -2
- armodel/models/{ar_package.py → M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ARPackage.py} +113 -218
- 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 +55 -0
- armodel/models/{general_structure.py → M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/Identifiable.py} +37 -149
- armodel/models/{ar_object.py → M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/PrimitiveTypes.py} +163 -70
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/__init__.py +1 -0
- 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 -2
- armodel/models/{m2/autosar_templates/sw_component_template/components → M2/AUTOSARTemplates/SWComponentTemplate/Components}/__init__.py +10 -8
- armodel/models/{m2/autosar_templates/sw_component_template/composition/instance_refs.py → M2/AUTOSARTemplates/SWComponentTemplate/Composition/InstanceRefs.py} +2 -2
- armodel/models/{m2/autosar_templates/sw_component_template/composition → M2/AUTOSARTemplates/SWComponentTemplate/Composition}/__init__.py +5 -5
- armodel/models/{m2/autosar_templates/sw_component_template/data_type/data_prototypes.py → M2/AUTOSARTemplates/SWComponentTemplate/Datatype/DataPrototypes.py} +25 -7
- armodel/models/{datatype.py → M2/AUTOSARTemplates/SWComponentTemplate/Datatype/Datatypes.py} +16 -74
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Datatype/__init__.py +1 -0
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/EndToEndProtection.py +177 -0
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcImplementation.py +11 -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} +3 -3
- armodel/models/{per_instance_memory.py → M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/PerInstanceMemory.py} +5 -6
- armodel/models/{m2/autosar_templates/sw_component_template/swc_internal_behavior/server_call.py → M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ServerCall.py} +3 -3
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ServiceMapping.py +23 -0
- armodel/models/{m2/autosar_templates/sw_component_template/swc_internal_behavior/trigger.py → M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/Trigger.py} +2 -2
- armodel/models/{m2/autosar_templates/sw_component_template/swc_internal_behavior → M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior}/__init__.py +9 -10
- armodel/models/{m2/autosar_templates/sw_component_template → M2/AUTOSARTemplates/SWComponentTemplate}/port_interface/__init__.py +12 -8
- armodel/models/{m2/autosar_templates/sw_component_template → M2/AUTOSARTemplates/SWComponentTemplate}/port_interface/instance_refs.py +2 -2
- armodel/models/{m2/autosar_templates/system_template/instance_refs.py → M2/AUTOSARTemplates/SystemTemplate/InstanceRefs.py} +2 -2
- armodel/models/{m2/autosar_templates/system_template → M2/AUTOSARTemplates/SystemTemplate}/__init__.py +4 -2
- armodel/models/{m2/autosar_templates/system_template → M2/AUTOSARTemplates/SystemTemplate}/data_mapping.py +2 -2
- armodel/models/{m2/autosar_templates/system_template → M2/AUTOSARTemplates/SystemTemplate}/network_management.py +7 -3
- armodel/models/{m2/autosar_templates/system_template → M2/AUTOSARTemplates/SystemTemplate}/transport_protocols.py +1 -1
- armodel/models/{m2/autosar_templates → M2/AUTOSARTemplates}/ecuc_description_template.py +10 -6
- armodel/models/M2/MSR/AsamHdo/AdminData.py +21 -0
- armodel/models/M2/MSR/AsamHdo/BaseTypes.py +77 -0
- armodel/models/{m2_msr.py → M2/MSR/AsamHdo/ComputationMethod.py} +44 -28
- armodel/models/{global_constraints.py → M2/MSR/AsamHdo/Constraints/GlobalConstraints.py} +7 -4
- armodel/models/M2/MSR/AsamHdo/Constraints/__init__.py +1 -0
- armodel/models/M2/MSR/AsamHdo/SpecialData.py +63 -0
- armodel/models/{m2/msr/asam_hdo/units.py → M2/MSR/AsamHdo/Units.py} +6 -3
- armodel/models/M2/MSR/AsamHdo/__init__.py +1 -0
- armodel/models/M2/MSR/CalibrationData/CalibrationValue.py +30 -0
- armodel/models/M2/MSR/CalibrationData/__init__.py +1 -0
- armodel/models/{m2/msr/data_dictionary/auxillary_objects.py → M2/MSR/DataDictionary/AuxillaryObjects.py} +4 -2
- 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 -9
- armodel/models/{record_layout.py → M2/MSR/DataDictionary/RecordLayout.py} +26 -25
- armodel/models/M2/MSR/DataDictionary/__init__.py +1 -0
- armodel/models/{annotation.py → M2/MSR/Documentation/Annotation.py} +8 -8
- armodel/models/{m2/msr/documentation/block_elements.py → M2/MSR/Documentation/BlockElements.py} +2 -2
- armodel/models/M2/MSR/Documentation/TextModel/LanguageDataModel.py +17 -0
- armodel/models/{multilanguage_data.py → M2/MSR/Documentation/TextModel/MultilanguageData.py} +21 -30
- armodel/models/M2/MSR/Documentation/TextModel/__init__.py +2 -0
- armodel/models/M2/MSR/Documentation/__init__.py +3 -0
- armodel/models/M2/MSR/__init__.py +1 -0
- armodel/models/M2/__init__.py +1 -0
- armodel/models/__init__.py +6 -23
- armodel/models/fibex/can_communication.py +3 -2
- armodel/models/fibex/fibex_4_multiplatform.py +5 -3
- armodel/models/fibex/fibex_core/core_communication.py +9 -3
- armodel/models/fibex/fibex_core/core_topology.py +7 -3
- armodel/models/fibex/lin_communication.py +5 -1
- armodel/models/rpt_scenario.py +2 -2
- armodel/models/sw_component.py +19 -14
- armodel/models/timing.py +3 -3
- armodel/parser/abstract_arxml_parser.py +8 -4
- armodel/parser/arxml_parser.py +120 -86
- armodel/parser/connector_xlsx_parser.py +6 -2
- armodel/report/connector_xls_report.py +2 -1
- armodel/tests/test_armodel/models/test_ar_object.py +2 -1
- armodel/tests/test_armodel/models/test_ar_package.py +20 -8
- 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 +7 -3
- armodel/tests/test_armodel/models/test_datatype.py +22 -8
- 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 +16 -6
- armodel/tests/test_armodel/models/test_port_prototype.py +1 -1
- armodel/tests/test_armodel/parser/test_parse_bswmd.py +3 -1
- 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 +100 -67
- {armodel-1.6.1.dist-info → armodel-1.6.3.dist-info}/METADATA +366 -356
- armodel-1.6.3.dist-info/RECORD +148 -0
- {armodel-1.6.1.dist-info → armodel-1.6.3.dist-info}/WHEEL +1 -1
- armodel/lib/data_analyzer.py +0 -34
- 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/ecuc_parameter_def_template.py +0 -0
- 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/constants.py +0 -0
- armodel/models/m2/autosar_templates/common_structure/implementation.py +0 -21
- armodel/models/m2/autosar_templates/generic_structure/__init__.py +0 -0
- armodel/models/m2/autosar_templates/sw_component_template/__init__.py +0 -0
- armodel/models/m2/autosar_templates/sw_component_template/data_type/__init__.py +0 -0
- armodel/models/m2/autosar_templates/sw_component_template/port_interface.py +0 -236
- armodel/models/m2/msr/__init__.py +0 -0
- armodel/models/m2/msr/asam_hdo/__init__.py +0 -0
- armodel/models/m2/msr/data_dictionary/__init__.py +0 -0
- armodel/models/m2/msr/documentation/__init__.py +0 -0
- 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/system_template/__init__.py +0 -0
- armodel/models/system_template/network_management.py +0 -7
- armodel/models/system_template/transport_protocols.py +0 -7
- armodel/models/unit.py +0 -14
- armodel-1.6.1.dist-info/RECORD +0 -140
- /armodel/models/{m2 → M2/AUTOSARTemplates/SWComponentTemplate}/__init__.py +0 -0
- /armodel/models/{m2/autosar_templates → M2/AUTOSARTemplates}/__init__.py +0 -0
- {armodel-1.6.1.dist-info → armodel-1.6.3.dist-info}/LICENSE +0 -0
- {armodel-1.6.1.dist-info → armodel-1.6.3.dist-info}/entry_points.txt +0 -0
- {armodel-1.6.1.dist-info → armodel-1.6.3.dist-info}/top_level.txt +0 -0
|
@@ -1,36 +1,40 @@
|
|
|
1
|
-
from
|
|
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
|
|
2
36
|
|
|
3
|
-
from
|
|
4
|
-
from .fibex.fibex_core.core_communication import ISignalGroup, ISignalIPdu, ISignalIPduGroup, SecuredIPdu, SystemSignal, DcmIPdu, ISignal, NPdu, NmPdu, SystemSignalGroup
|
|
5
|
-
from .fibex.can_communication import CanFrame
|
|
6
|
-
from .fibex.fibex_4_multiplatform import Gateway
|
|
7
|
-
from .fibex.lin_communication import LinUnconditionalFrame
|
|
8
|
-
|
|
9
|
-
from .m2.msr.asam_hdo.units import PhysicalDimension, Unit
|
|
10
|
-
from .m2.msr.data_dictionary.auxillary_objects import SwAddrMethod
|
|
11
|
-
from .m2.autosar_templates.common_structure import ConstantSpecification
|
|
12
|
-
from .m2.autosar_templates.common_structure.implementation_data_types import ImplementationDataType
|
|
13
|
-
from .m2.autosar_templates.ecuc_description_template import EcucModuleConfigurationValues, EcucValueCollection
|
|
14
|
-
from .m2.autosar_templates.system_template import System
|
|
15
|
-
from .m2.autosar_templates.system_template.transport_protocols import CanTpConfig
|
|
16
|
-
from .m2.autosar_templates.system_template.network_management import NmConfig
|
|
17
|
-
from .m2.autosar_templates.sw_component_template.composition import CompositionSwComponentType
|
|
18
|
-
from .m2.autosar_templates.sw_component_template.port_interface import ClientServerInterface, ModeSwitchInterface, ParameterInterface, SenderReceiverInterface, TriggerInterface
|
|
19
|
-
from .m2.autosar_templates.sw_component_template.components import SwComponentType
|
|
20
|
-
|
|
21
|
-
from .timing import SwcTiming
|
|
22
|
-
from .record_layout import SwRecordLayout
|
|
23
|
-
from .end_to_end_protection import EndToEndProtectionSet
|
|
24
|
-
from .general_structure import Identifiable, ARObject, Referrable, CollectableElement, SwcBswMapping
|
|
25
|
-
|
|
26
|
-
from .sw_component import EcuAbstractionSwComponentType, AtomicSwComponentType, ApplicationSwComponentType
|
|
27
|
-
from .sw_component import ServiceSwComponentType, SensorActuatorSwComponentType, ComplexDeviceDriverSwComponentType
|
|
28
|
-
from .datatype import ApplicationArrayDataType, ApplicationDataType, DataTypeMappingSet, DataTypeMap, SwBaseType, ApplicationPrimitiveDataType, ApplicationRecordDataType
|
|
29
|
-
from .m2_msr import CompuMethod
|
|
30
|
-
from .common_structure import ModeDeclarationGroup
|
|
31
|
-
from .implementation import BswImplementation, SwcImplementation, Implementation
|
|
32
|
-
from .bsw_module_template import BswModuleDescription, BswModuleEntry
|
|
33
|
-
from .global_constraints import DataConstr
|
|
37
|
+
from typing import Dict, List
|
|
34
38
|
|
|
35
39
|
class ARPackage(Identifiable, CollectableElement):
|
|
36
40
|
def __init__(self, parent: ARObject, short_name: str):
|
|
@@ -54,12 +58,12 @@ class ARPackage(Identifiable, CollectableElement):
|
|
|
54
58
|
ar_package = ARPackage(self, short_name)
|
|
55
59
|
self._ar_packages[short_name] = ar_package
|
|
56
60
|
return self._ar_packages[short_name]
|
|
57
|
-
|
|
61
|
+
|
|
58
62
|
def getElement(self, short_name: str) -> Referrable:
|
|
59
63
|
if (short_name in self._ar_packages):
|
|
60
64
|
return self._ar_packages[short_name]
|
|
61
65
|
return CollectableElement.getElement(self, short_name)
|
|
62
|
-
|
|
66
|
+
|
|
63
67
|
def createEcuAbstractionSwComponentType(self, short_name: str) -> EcuAbstractionSwComponentType:
|
|
64
68
|
if (short_name not in self.elements):
|
|
65
69
|
sw_component = EcuAbstractionSwComponentType(self, short_name)
|
|
@@ -71,7 +75,7 @@ class ARPackage(Identifiable, CollectableElement):
|
|
|
71
75
|
sw_component = ApplicationSwComponentType(self, short_name)
|
|
72
76
|
self.addElement(sw_component)
|
|
73
77
|
return self.getElement(short_name)
|
|
74
|
-
|
|
78
|
+
|
|
75
79
|
def createComplexDeviceDriverSwComponentType(self, short_name: str) -> ComplexDeviceDriverSwComponentType:
|
|
76
80
|
if short_name not in self.elements:
|
|
77
81
|
sw_component = ComplexDeviceDriverSwComponentType(self, short_name)
|
|
@@ -83,7 +87,7 @@ class ARPackage(Identifiable, CollectableElement):
|
|
|
83
87
|
sw_component = ServiceSwComponentType(self, short_name)
|
|
84
88
|
self.addElement(sw_component)
|
|
85
89
|
return self.getElement(short_name)
|
|
86
|
-
|
|
90
|
+
|
|
87
91
|
def createSensorActuatorSwComponentType(self, short_name: str) -> SensorActuatorSwComponentType:
|
|
88
92
|
if (short_name not in self.elements):
|
|
89
93
|
sw_component = SensorActuatorSwComponentType(self, short_name)
|
|
@@ -101,7 +105,7 @@ class ARPackage(Identifiable, CollectableElement):
|
|
|
101
105
|
sr_interface = SenderReceiverInterface(self, short_name)
|
|
102
106
|
self.addElement(sr_interface)
|
|
103
107
|
return self.getElement(short_name)
|
|
104
|
-
|
|
108
|
+
|
|
105
109
|
def createParameterInterface(self, short_name: str) -> ParameterInterface:
|
|
106
110
|
if (short_name not in self.elements):
|
|
107
111
|
sr_interface = ParameterInterface(self, short_name)
|
|
@@ -167,7 +171,7 @@ class ARPackage(Identifiable, CollectableElement):
|
|
|
167
171
|
impl = BswImplementation(self, short_name)
|
|
168
172
|
self.addElement(impl)
|
|
169
173
|
return self.getElement(short_name)
|
|
170
|
-
|
|
174
|
+
|
|
171
175
|
def createSwcImplementation(self, short_name: str) -> SwcImplementation:
|
|
172
176
|
if (short_name not in self.elements):
|
|
173
177
|
impl = SwcImplementation(self, short_name)
|
|
@@ -179,208 +183,208 @@ class ARPackage(Identifiable, CollectableElement):
|
|
|
179
183
|
mapping = SwcBswMapping(self, short_name)
|
|
180
184
|
self.addElement(mapping)
|
|
181
185
|
return self.getElement(short_name)
|
|
182
|
-
|
|
186
|
+
|
|
183
187
|
def createConstantSpecification(self, short_name: str) -> ConstantSpecification:
|
|
184
188
|
if (short_name not in self.elements):
|
|
185
189
|
spec = ConstantSpecification(self, short_name)
|
|
186
190
|
self.addElement(spec)
|
|
187
191
|
return self.getElement(short_name)
|
|
188
|
-
|
|
192
|
+
|
|
189
193
|
def createDataConstr(self, short_name: str) -> DataConstr:
|
|
190
194
|
if (short_name not in self.elements):
|
|
191
195
|
constr = DataConstr(self, short_name)
|
|
192
196
|
self.addElement(constr)
|
|
193
197
|
return self.getElement(short_name)
|
|
194
|
-
|
|
198
|
+
|
|
195
199
|
def createUnit(self, short_name: str) -> Unit:
|
|
196
200
|
if (short_name not in self.elements):
|
|
197
201
|
unit = Unit(self, short_name)
|
|
198
202
|
self.addElement(unit)
|
|
199
203
|
return self.getElement(short_name)
|
|
200
|
-
|
|
204
|
+
|
|
201
205
|
def createEndToEndProtectionSet(self, short_name: str) -> EndToEndProtectionSet:
|
|
202
206
|
if (short_name not in self.elements):
|
|
203
207
|
e2d_set = EndToEndProtectionSet(self, short_name)
|
|
204
208
|
self.addElement(e2d_set)
|
|
205
209
|
return self.getElement(short_name)
|
|
206
|
-
|
|
210
|
+
|
|
207
211
|
def createApplicationArrayDataType(self, short_name: str) -> ApplicationArrayDataType:
|
|
208
212
|
if (short_name not in self.elements):
|
|
209
213
|
data_type = ApplicationArrayDataType(self, short_name)
|
|
210
214
|
self.addElement(data_type)
|
|
211
215
|
return self.getElement(short_name)
|
|
212
|
-
|
|
216
|
+
|
|
213
217
|
def createSwRecordLayout(self, short_name: str) -> SwRecordLayout:
|
|
214
218
|
if (short_name not in self.elements):
|
|
215
219
|
layout = SwRecordLayout(self, short_name)
|
|
216
220
|
self.addElement(layout)
|
|
217
221
|
return self.getElement(short_name)
|
|
218
|
-
|
|
222
|
+
|
|
219
223
|
def createSwAddrMethod(self, short_name: str) -> SwAddrMethod:
|
|
220
224
|
if (short_name not in self.elements):
|
|
221
225
|
method = SwAddrMethod(self, short_name)
|
|
222
226
|
self.addElement(method)
|
|
223
227
|
return self.getElement(short_name)
|
|
224
|
-
|
|
228
|
+
|
|
225
229
|
def createTriggerInterface(self, short_name: str) -> TriggerInterface:
|
|
226
230
|
if (short_name not in self.elements):
|
|
227
231
|
trigger_interface = TriggerInterface(self, short_name)
|
|
228
232
|
self.addElement(trigger_interface)
|
|
229
233
|
return trigger_interface
|
|
230
|
-
|
|
234
|
+
|
|
231
235
|
def createModeDeclarationGroup(self, short_name: str) -> ModeDeclarationGroup:
|
|
232
236
|
if (short_name not in self.elements):
|
|
233
237
|
group = ModeDeclarationGroup(self, short_name)
|
|
234
238
|
self.addElement(group)
|
|
235
239
|
return self.getElement(short_name)
|
|
236
|
-
|
|
240
|
+
|
|
237
241
|
def createModeSwitchInterface(self, short_name: str) -> ModeSwitchInterface:
|
|
238
242
|
if (short_name not in self.elements):
|
|
239
243
|
switch_interface = ModeSwitchInterface(self, short_name)
|
|
240
244
|
self.addElement(switch_interface)
|
|
241
245
|
return self.getElement(short_name)
|
|
242
|
-
|
|
246
|
+
|
|
243
247
|
def createSwcTiming(self, short_name: str) -> SwcTiming:
|
|
244
248
|
if (short_name not in self.elements):
|
|
245
249
|
timing = SwcTiming(self, short_name)
|
|
246
250
|
self.addElement(timing)
|
|
247
251
|
return self.getElement(short_name)
|
|
248
|
-
|
|
252
|
+
|
|
249
253
|
def createLinCluster(self, short_name: str) -> LinCluster:
|
|
250
254
|
if (short_name not in self.elements):
|
|
251
255
|
cluster = LinCluster(self, short_name)
|
|
252
256
|
self.addElement(cluster)
|
|
253
257
|
return self.getElement(short_name)
|
|
254
|
-
|
|
258
|
+
|
|
255
259
|
def createCanCluster(self, short_name: str) -> CanCluster:
|
|
256
260
|
if (short_name not in self.elements):
|
|
257
261
|
cluster = CanCluster(self, short_name)
|
|
258
262
|
self.addElement(cluster)
|
|
259
263
|
return self.getElement(short_name)
|
|
260
|
-
|
|
264
|
+
|
|
261
265
|
def createLinUnconditionalFrame(self, short_name: str) -> LinUnconditionalFrame:
|
|
262
266
|
if (short_name not in self.elements):
|
|
263
267
|
frame = LinUnconditionalFrame(self, short_name)
|
|
264
268
|
self.addElement(frame)
|
|
265
269
|
return self.getElement(short_name)
|
|
266
|
-
|
|
270
|
+
|
|
267
271
|
def createNmPdu(self, short_name: str) -> NmPdu:
|
|
268
272
|
if (short_name not in self.elements):
|
|
269
273
|
element = NmPdu(self, short_name)
|
|
270
274
|
self.addElement(element)
|
|
271
275
|
return self.getElement(short_name)
|
|
272
|
-
|
|
276
|
+
|
|
273
277
|
def createNPdu(self, short_name: str) -> NPdu:
|
|
274
278
|
if (short_name not in self.elements):
|
|
275
279
|
element = NPdu(self, short_name)
|
|
276
280
|
self.addElement(element)
|
|
277
281
|
return self.getElement(short_name)
|
|
278
|
-
|
|
282
|
+
|
|
279
283
|
def createDcmIPdu(self, short_name: str) -> DcmIPdu:
|
|
280
284
|
if (short_name not in self.elements):
|
|
281
285
|
element = DcmIPdu(self, short_name)
|
|
282
286
|
self.addElement(element)
|
|
283
287
|
return self.getElement(short_name)
|
|
284
|
-
|
|
288
|
+
|
|
285
289
|
def createSecuredIPdu(self, short_name: str) -> SecuredIPdu:
|
|
286
290
|
if (short_name not in self.elements):
|
|
287
291
|
element = SecuredIPdu(self, short_name)
|
|
288
292
|
self.addElement(element)
|
|
289
293
|
return self.getElement(short_name)
|
|
290
|
-
|
|
294
|
+
|
|
291
295
|
def createNmConfig(self, short_name: str) -> NmConfig:
|
|
292
296
|
if (short_name not in self.elements):
|
|
293
297
|
element = NmConfig(self, short_name)
|
|
294
298
|
self.addElement(element)
|
|
295
299
|
return self.getElement(short_name)
|
|
296
|
-
|
|
300
|
+
|
|
297
301
|
def createCanTpConfig(self, short_name: str) -> CanTpConfig:
|
|
298
302
|
if (short_name not in self.elements):
|
|
299
303
|
element = CanTpConfig(self, short_name)
|
|
300
304
|
self.addElement(element)
|
|
301
305
|
return self.getElement(short_name)
|
|
302
|
-
|
|
306
|
+
|
|
303
307
|
def createCanFrame(self, short_name: str) -> CanFrame:
|
|
304
308
|
if (short_name not in self.elements):
|
|
305
309
|
element = CanFrame(self, short_name)
|
|
306
310
|
self.addElement(element)
|
|
307
311
|
return self.getElement(short_name)
|
|
308
|
-
|
|
312
|
+
|
|
309
313
|
def createEcuInstance(self, short_name: str) -> EcuInstance:
|
|
310
314
|
if (short_name not in self.elements):
|
|
311
315
|
element = EcuInstance(self, short_name)
|
|
312
316
|
self.addElement(element)
|
|
313
317
|
return self.getElement(short_name)
|
|
314
|
-
|
|
318
|
+
|
|
315
319
|
def createGateway(self, short_name: str) -> Gateway:
|
|
316
320
|
if (short_name not in self.elements):
|
|
317
321
|
element = Gateway(self, short_name)
|
|
318
322
|
self.addElement(element)
|
|
319
323
|
return self.getElement(short_name)
|
|
320
|
-
|
|
324
|
+
|
|
321
325
|
def createISignal(self, short_name: str) -> ISignal:
|
|
322
326
|
if (short_name not in self.elements):
|
|
323
327
|
element = ISignal(self, short_name)
|
|
324
328
|
self.addElement(element)
|
|
325
329
|
return self.getElement(short_name)
|
|
326
|
-
|
|
330
|
+
|
|
327
331
|
def createSystemSignal(self, short_name: str) -> SystemSignal:
|
|
328
332
|
if (short_name not in self.elements):
|
|
329
333
|
element = SystemSignal(self, short_name)
|
|
330
334
|
self.addElement(element)
|
|
331
335
|
return self.getElement(short_name)
|
|
332
|
-
|
|
336
|
+
|
|
333
337
|
def createSystemSignalGroup(self, short_name: str) -> SystemSignalGroup:
|
|
334
338
|
if (short_name not in self.elements):
|
|
335
339
|
element = SystemSignalGroup(self, short_name)
|
|
336
340
|
self.addElement(element)
|
|
337
341
|
return self.getElement(short_name)
|
|
338
|
-
|
|
342
|
+
|
|
339
343
|
def createISignalIPdu(self, short_name: str) -> ISignalIPdu:
|
|
340
344
|
if (short_name not in self.elements):
|
|
341
345
|
element = ISignalIPdu(self, short_name)
|
|
342
346
|
self.addElement(element)
|
|
343
347
|
return self.getElement(short_name)
|
|
344
|
-
|
|
348
|
+
|
|
345
349
|
def createEcucValueCollection(self, short_name: str) -> EcucValueCollection:
|
|
346
350
|
if (short_name not in self.elements):
|
|
347
351
|
element = EcucValueCollection(self, short_name)
|
|
348
352
|
self.addElement(element)
|
|
349
353
|
return self.getElement(short_name)
|
|
350
|
-
|
|
354
|
+
|
|
351
355
|
def createEcucModuleConfigurationValues(self, short_name: str) -> EcucModuleConfigurationValues:
|
|
352
356
|
if (short_name not in self.elements):
|
|
353
357
|
element = EcucModuleConfigurationValues(self, short_name)
|
|
354
358
|
self.addElement(element)
|
|
355
359
|
return self.getElement(short_name)
|
|
356
|
-
|
|
360
|
+
|
|
357
361
|
def createPhysicalDimension(self, short_name: str) -> PhysicalDimension:
|
|
358
362
|
if (short_name not in self.elements):
|
|
359
363
|
element = PhysicalDimension(self, short_name)
|
|
360
364
|
self.addElement(element)
|
|
361
365
|
return self.getElement(short_name)
|
|
362
|
-
|
|
366
|
+
|
|
363
367
|
def createISignalGroup(self, short_name: str) -> ISignalGroup:
|
|
364
368
|
if (short_name not in self.elements):
|
|
365
369
|
element = ISignalGroup(self, short_name)
|
|
366
370
|
self.addElement(element)
|
|
367
371
|
return self.getElement(short_name)
|
|
368
|
-
|
|
372
|
+
|
|
369
373
|
def createISignalIPduGroup(self, short_name: str) -> ISignalIPduGroup:
|
|
370
374
|
if (short_name not in self.elements):
|
|
371
375
|
element = ISignalIPduGroup(self, short_name)
|
|
372
376
|
self.addElement(element)
|
|
373
377
|
return self.getElement(short_name)
|
|
374
|
-
|
|
378
|
+
|
|
375
379
|
def createSystem(self, short_name: str) -> System:
|
|
376
380
|
if (short_name not in self.elements):
|
|
377
381
|
element = System(self, short_name)
|
|
378
382
|
self.addElement(element)
|
|
379
383
|
return self.getElement(short_name)
|
|
380
|
-
|
|
384
|
+
|
|
381
385
|
def getApplicationPrimitiveDataTypes(self) -> List[ApplicationPrimitiveDataType]:
|
|
382
386
|
return list(sorted(filter(lambda a: isinstance(a, ApplicationPrimitiveDataType), self.elements.values()), key= lambda o:o.short_name))
|
|
383
|
-
|
|
387
|
+
|
|
384
388
|
def getApplicationDataType(self) -> List[ApplicationDataType]:
|
|
385
389
|
return list(sorted(filter(lambda a: isinstance(a, ApplicationDataType), self.elements.values()), key= lambda o:o.short_name))
|
|
386
390
|
|
|
@@ -392,7 +396,7 @@ class ARPackage(Identifiable, CollectableElement):
|
|
|
392
396
|
|
|
393
397
|
def getSwComponentTypes(self) -> List[SwComponentType]:
|
|
394
398
|
return list(filter(lambda a : isinstance(a, SwComponentType), self.elements.values()))
|
|
395
|
-
|
|
399
|
+
|
|
396
400
|
def getSensorActuatorSwComponentType(self) -> List[SensorActuatorSwComponentType]:
|
|
397
401
|
return list(filter(lambda a : isinstance(a, SensorActuatorSwComponentType), self.elements.values()))
|
|
398
402
|
|
|
@@ -401,13 +405,13 @@ class ARPackage(Identifiable, CollectableElement):
|
|
|
401
405
|
|
|
402
406
|
def getCompositionSwComponentTypes(self) -> List[CompositionSwComponentType]:
|
|
403
407
|
return list(filter(lambda a : isinstance(a, CompositionSwComponentType), self.elements.values()))
|
|
404
|
-
|
|
408
|
+
|
|
405
409
|
def getComplexDeviceDriverSwComponentTypes(self) -> List[ComplexDeviceDriverSwComponentType]:
|
|
406
410
|
return list(sorted(filter(lambda a : isinstance(a, ComplexDeviceDriverSwComponentType), self.elements.values()), key = lambda a: a.short_name))
|
|
407
411
|
|
|
408
412
|
def getSenderReceiverInterfaces(self) -> List[SenderReceiverInterface]:
|
|
409
413
|
return list(sorted(filter(lambda a : isinstance(a, SenderReceiverInterface), self.elements.values()), key = lambda a: a.short_name))
|
|
410
|
-
|
|
414
|
+
|
|
411
415
|
def getParameterInterfaces(self) -> List[ParameterInterface]:
|
|
412
416
|
return list(sorted(filter(lambda a : isinstance(a, ParameterInterface), self.elements.values()), key = lambda a: a.short_name))
|
|
413
417
|
|
|
@@ -416,7 +420,7 @@ class ARPackage(Identifiable, CollectableElement):
|
|
|
416
420
|
|
|
417
421
|
def getDataTypeMappingSets(self) -> List[DataTypeMappingSet]:
|
|
418
422
|
return list(sorted(filter(lambda a : isinstance(a, DataTypeMappingSet), self.elements.values()), key = lambda a: a.short_name))
|
|
419
|
-
|
|
423
|
+
|
|
420
424
|
def getCompuMethods(self) -> List[CompuMethod]:
|
|
421
425
|
return list(filter(lambda a: isinstance(a, CompuMethod), self.elements.values()))
|
|
422
426
|
|
|
@@ -428,214 +432,105 @@ class ARPackage(Identifiable, CollectableElement):
|
|
|
428
432
|
|
|
429
433
|
def getBswImplementations(self) -> List[BswImplementation]:
|
|
430
434
|
return list(filter(lambda a: isinstance(a, BswImplementation), self.elements.values()))
|
|
431
|
-
|
|
435
|
+
|
|
432
436
|
def getSwcImplementations(self) -> List[SwcImplementation]:
|
|
433
437
|
return list(filter(lambda a: isinstance(a, SwcImplementation), self.elements.values()))
|
|
434
|
-
|
|
438
|
+
|
|
435
439
|
def getImplementations(self) -> List[Implementation]:
|
|
436
440
|
return list(filter(lambda a: isinstance(a, Implementation), self.elements.values()))
|
|
437
441
|
|
|
438
442
|
def getSwcBswMappings(self) -> List[SwcBswMapping]:
|
|
439
443
|
return list(filter(lambda a: isinstance(a, SwcBswMapping), self.elements.values()))
|
|
440
|
-
|
|
444
|
+
|
|
441
445
|
def getConstantSpecifications(self) -> List[ConstantSpecification]:
|
|
442
446
|
return list(filter(lambda a: isinstance(a, ConstantSpecification), self.elements.values()))
|
|
443
|
-
|
|
447
|
+
|
|
444
448
|
def getDataConstrs(self) -> List[DataConstr]:
|
|
445
449
|
return list(filter(lambda a: isinstance(a, DataConstr), self.elements.values()))
|
|
446
|
-
|
|
450
|
+
|
|
447
451
|
def getUnits(self) -> List[Unit]:
|
|
448
452
|
return list(filter(lambda a: isinstance(a, Unit), self.elements.values()))
|
|
449
|
-
|
|
453
|
+
|
|
450
454
|
def getApplicationArrayDataTypes(self) -> List[ApplicationArrayDataType]:
|
|
451
455
|
return list(sorted(filter(lambda a : isinstance(a, ApplicationArrayDataType), self.elements.values()), key = lambda a: a.short_name))
|
|
452
|
-
|
|
456
|
+
|
|
453
457
|
def getSwRecordLayouts(self) -> List[SwRecordLayout]:
|
|
454
458
|
return list(sorted(filter(lambda a : isinstance(a, SwRecordLayout), self.elements.values()), key = lambda a: a.short_name))
|
|
455
459
|
|
|
456
460
|
def getSwAddrMethods(self) -> List[SwAddrMethod]:
|
|
457
461
|
return list(sorted(filter(lambda a : isinstance(a, SwAddrMethod), self.elements.values()), key = lambda a: a.short_name))
|
|
458
|
-
|
|
462
|
+
|
|
459
463
|
def getTriggerInterfaces(self) -> List[TriggerInterface]:
|
|
460
464
|
return list(sorted(filter(lambda a : isinstance(a, TriggerInterface), self.elements.values()), key = lambda a: a.short_name))
|
|
461
|
-
|
|
465
|
+
|
|
462
466
|
def getModeDeclarationGroups(self) -> List[ModeDeclarationGroup]:
|
|
463
467
|
return list(sorted(filter(lambda a : isinstance(a, ModeDeclarationGroup), self.elements.values()), key = lambda a: a.short_name))
|
|
464
|
-
|
|
468
|
+
|
|
465
469
|
def getModeSwitchInterfaces(self) -> List[ModeSwitchInterface]:
|
|
466
470
|
return list(sorted(filter(lambda a : isinstance(a, ModeSwitchInterface), self.elements.values()), key = lambda a: a.short_name))
|
|
467
|
-
|
|
471
|
+
|
|
468
472
|
def getSwcTimings(self) -> List[SwcTiming]:
|
|
469
473
|
return list(sorted(filter(lambda a : isinstance(a, SwcTiming), self.elements.values()), key = lambda a: a.short_name))
|
|
470
|
-
|
|
474
|
+
|
|
471
475
|
def getLinClusters(self) -> List[LinCluster]:
|
|
472
476
|
return list(sorted(filter(lambda a : isinstance(a, LinCluster), self.elements.values()), key = lambda a: a.short_name))
|
|
473
|
-
|
|
477
|
+
|
|
474
478
|
def getCanClusters(self) -> List[CanCluster]:
|
|
475
479
|
return list(sorted(filter(lambda a : isinstance(a, CanCluster), self.elements.values()), key = lambda a: a.short_name))
|
|
476
|
-
|
|
480
|
+
|
|
477
481
|
def getLinUnconditionalFrames(self) -> List[LinUnconditionalFrame]:
|
|
478
482
|
return list(sorted(filter(lambda a : isinstance(a, LinUnconditionalFrame), self.elements.values()), key = lambda a: a.short_name))
|
|
479
|
-
|
|
483
|
+
|
|
480
484
|
def getNmPdus(self) -> List[NmPdu]:
|
|
481
485
|
return list(sorted(filter(lambda a : isinstance(a, NmPdu), self.elements.values()), key = lambda a: a.short_name))
|
|
482
|
-
|
|
486
|
+
|
|
483
487
|
def getNPdus(self) -> List[NPdu]:
|
|
484
488
|
return list(sorted(filter(lambda a : isinstance(a, NPdu), self.elements.values()), key = lambda a: a.short_name))
|
|
485
|
-
|
|
489
|
+
|
|
486
490
|
def getDcmIPdus(self) -> List[DcmIPdu]:
|
|
487
491
|
return list(sorted(filter(lambda a : isinstance(a, DcmIPdu), self.elements.values()), key = lambda a: a.short_name))
|
|
488
|
-
|
|
492
|
+
|
|
489
493
|
def getSecuredIPdus(self) -> List[SecuredIPdu]:
|
|
490
494
|
return list(sorted(filter(lambda a : isinstance(a, SecuredIPdu), self.elements.values()), key = lambda a: a.short_name))
|
|
491
|
-
|
|
495
|
+
|
|
492
496
|
def getNmConfigs(self) -> List[NmConfig]:
|
|
493
497
|
return list(sorted(filter(lambda a : isinstance(a, NmConfig), self.elements.values()), key = lambda a: a.short_name))
|
|
494
|
-
|
|
498
|
+
|
|
495
499
|
def getCanTpConfigs(self) -> List[CanTpConfig]:
|
|
496
500
|
return list(sorted(filter(lambda a : isinstance(a, CanTpConfig), self.elements.values()), key = lambda a: a.short_name))
|
|
497
|
-
|
|
501
|
+
|
|
498
502
|
def getCanFrames(self) -> List[CanFrame]:
|
|
499
503
|
return list(sorted(filter(lambda a : isinstance(a, CanFrame), self.elements.values()), key = lambda a: a.short_name))
|
|
500
|
-
|
|
504
|
+
|
|
501
505
|
def getEcuInstances(self) -> List[EcuInstance]:
|
|
502
506
|
return list(sorted(filter(lambda a : isinstance(a, EcuInstance), self.elements.values()), key = lambda a: a.short_name))
|
|
503
|
-
|
|
507
|
+
|
|
504
508
|
def getGateways(self) -> List[Gateway]:
|
|
505
509
|
return list(sorted(filter(lambda a : isinstance(a, Gateway), self.elements.values()), key = lambda a: a.short_name))
|
|
506
|
-
|
|
510
|
+
|
|
507
511
|
def getISignals(self) -> List[ISignal]:
|
|
508
512
|
return list(sorted(filter(lambda a : isinstance(a, ISignal), self.elements.values()), key = lambda a: a.short_name))
|
|
509
|
-
|
|
513
|
+
|
|
510
514
|
def getEcucValueCollections(self) -> List[EcucValueCollection]:
|
|
511
515
|
return list(sorted(filter(lambda a : isinstance(a, EcucValueCollection), self.elements.values()), key = lambda a: a.short_name))
|
|
512
|
-
|
|
516
|
+
|
|
513
517
|
def getEcucModuleConfigurationValues(self) -> List[EcucModuleConfigurationValues]:
|
|
514
518
|
return list(sorted(filter(lambda a : isinstance(a, EcucModuleConfigurationValues), self.elements.values()), key = lambda a: a.short_name))
|
|
515
|
-
|
|
519
|
+
|
|
516
520
|
def getEcucModuleConfigurationValues(self) -> List[PhysicalDimension]:
|
|
517
521
|
return list(sorted(filter(lambda a : isinstance(a, PhysicalDimension), self.elements.values()), key = lambda a: a.short_name))
|
|
518
|
-
|
|
522
|
+
|
|
519
523
|
def getISignalGroups(self) -> List[ISignalGroup]:
|
|
520
524
|
return list(sorted(filter(lambda a : isinstance(a, ISignalGroup), self.elements.values()), key = lambda a: a.short_name))
|
|
521
|
-
|
|
525
|
+
|
|
522
526
|
def getSystemSignals(self) -> List[SystemSignal]:
|
|
523
527
|
return list(sorted(filter(lambda a : isinstance(a, SystemSignal), self.elements.values()), key = lambda a: a.short_name))
|
|
524
|
-
|
|
528
|
+
|
|
525
529
|
def getSystemSignalGroups(self) -> List[SystemSignalGroup]:
|
|
526
530
|
return list(sorted(filter(lambda a : isinstance(a, SystemSignalGroup), self.elements.values()), key = lambda a: a.short_name))
|
|
527
|
-
|
|
531
|
+
|
|
528
532
|
def getISignalIPdus(self) -> List[ISignalIPdu]:
|
|
529
533
|
return list(sorted(filter(lambda a : isinstance(a, ISignalIPdu), self.elements.values()), key = lambda a: a.short_name))
|
|
530
|
-
|
|
534
|
+
|
|
531
535
|
def getSystems(self) -> List[System]:
|
|
532
536
|
return list(sorted(filter(lambda a : isinstance(a, System), self.elements.values()), key = lambda a: a.short_name))
|
|
533
|
-
|
|
534
|
-
class AbstractAUTOSAR(CollectableElement):
|
|
535
|
-
def __init__(self):
|
|
536
|
-
super().__init__()
|
|
537
|
-
|
|
538
|
-
CollectableElement.__init__(self)
|
|
539
|
-
|
|
540
|
-
self.schema_location = ""
|
|
541
|
-
self._appl_impl_type_maps = {}
|
|
542
|
-
self._impl_appl_type_maps = {}
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
self._ar_packages = {} # type: Dict[str, ARPackage]
|
|
546
|
-
self.short_name_mappings = {} # type: Dict[str, str]
|
|
547
|
-
|
|
548
|
-
def reload(self):
|
|
549
|
-
pass
|
|
550
|
-
|
|
551
|
-
@property
|
|
552
|
-
def full_name(self):
|
|
553
|
-
return ""
|
|
554
|
-
|
|
555
|
-
def clear(self):
|
|
556
|
-
self._ar_packages = {}
|
|
557
|
-
self.elements = {}
|
|
558
|
-
|
|
559
|
-
def getElement(self, short_name: str) -> Referrable:
|
|
560
|
-
if (short_name in self._ar_packages):
|
|
561
|
-
return self._ar_packages[short_name]
|
|
562
|
-
return CollectableElement.getElement(self, short_name)
|
|
563
|
-
|
|
564
|
-
def getARPackages(self) -> List[ARPackage]:
|
|
565
|
-
#return list(filter(lambda e: isinstance(e, ARPackage), self.elements.values()))
|
|
566
|
-
return list(sorted(self._ar_packages.values(), key= lambda a: a.short_name))
|
|
567
|
-
|
|
568
|
-
def createARPackage(self, short_name: str) -> ARPackage:
|
|
569
|
-
if (short_name not in self._ar_packages):
|
|
570
|
-
ar_package = ARPackage(self, short_name)
|
|
571
|
-
self._ar_packages[short_name] = ar_package
|
|
572
|
-
return self._ar_packages[short_name]
|
|
573
|
-
|
|
574
|
-
def find(self, referred_name: str) -> Referrable:
|
|
575
|
-
short_name_list = referred_name.split("/")
|
|
576
|
-
element = AUTOSAR.getInstance()
|
|
577
|
-
for short_name in short_name_list:
|
|
578
|
-
if (short_name == ""):
|
|
579
|
-
continue
|
|
580
|
-
element = element.getElement(short_name)
|
|
581
|
-
if (element == None):
|
|
582
|
-
return element
|
|
583
|
-
# raise ValueError("The %s of reference <%s> does not exist." % (short_name, referred_name))
|
|
584
|
-
return element
|
|
585
|
-
|
|
586
|
-
def findByShortName(self, short_name: str) -> Referrable:
|
|
587
|
-
pass
|
|
588
|
-
|
|
589
|
-
def getDataType(self, data_type: ImplementationDataType) -> ImplementationDataType:
|
|
590
|
-
if (isinstance(data_type, ImplementationDataType) or isinstance(data_type, SwBaseType)):
|
|
591
|
-
if (data_type.category == ImplementationDataType.CATEGORY_TYPE_REFERENCE):
|
|
592
|
-
referred_type = self.find(data_type.swDataDefProps.implementationDataTypeRef.value)
|
|
593
|
-
return self.getDataType(referred_type)
|
|
594
|
-
if (data_type.category == ImplementationDataType.CATEGORY_DATA_REFERENCE):
|
|
595
|
-
if (data_type.swDataDefProps.swPointerTargetProps.target_category == "VALUE"):
|
|
596
|
-
referred_type = self.find(data_type.swDataDefProps.swPointerTargetProps.sw_data_def_props.baseTypeRef.value)
|
|
597
|
-
return self.getDataType(referred_type)
|
|
598
|
-
return data_type
|
|
599
|
-
else:
|
|
600
|
-
raise ValueError("%s is not ImplementationDataType." % data_type)
|
|
601
|
-
|
|
602
|
-
def addDataTypeMap(self, data_type_map: DataTypeMap):
|
|
603
|
-
if (data_type_map.application_data_type_ref is None) or (data_type_map.implementation_data_type_ref is None):
|
|
604
|
-
return
|
|
605
|
-
self._appl_impl_type_maps[data_type_map.application_data_type_ref.value] = data_type_map.implementation_data_type_ref.value
|
|
606
|
-
self._impl_appl_type_maps[data_type_map.implementation_data_type_ref.value] = data_type_map.application_data_type_ref.value
|
|
607
|
-
|
|
608
|
-
def convertToImplementationDataType(self, appl_data_type: str) -> ImplementationDataType:
|
|
609
|
-
if (appl_data_type not in self._appl_impl_type_maps.keys()):
|
|
610
|
-
raise IndexError("Invalid application data type <%s>" % appl_data_type)
|
|
611
|
-
|
|
612
|
-
return self.find(self._appl_impl_type_maps[appl_data_type])
|
|
613
|
-
|
|
614
|
-
def convertToApplicationDataType(self, impl_data_type: str) -> ApplicationDataType:
|
|
615
|
-
if (impl_data_type not in self._impl_appl_type_maps.keys()):
|
|
616
|
-
raise IndexError("Invalid Implementation data type <%s>" % impl_data_type)
|
|
617
|
-
|
|
618
|
-
return self.find(self._impl_appl_type_maps[impl_data_type])
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
class AUTOSAR (AbstractAUTOSAR):
|
|
622
|
-
__instance = None
|
|
623
|
-
|
|
624
|
-
@staticmethod
|
|
625
|
-
def getInstance():
|
|
626
|
-
if (AUTOSAR.__instance == None):
|
|
627
|
-
AUTOSAR()
|
|
628
|
-
return AUTOSAR.__instance
|
|
629
|
-
|
|
630
|
-
def __init__(self):
|
|
631
|
-
if (AUTOSAR.__instance != None):
|
|
632
|
-
raise Exception("The AUTOSAR is singleton!")
|
|
633
|
-
|
|
634
|
-
AUTOSAR.__instance = self
|
|
635
|
-
|
|
636
|
-
super().__init__()
|
|
637
|
-
|
|
638
|
-
class AUTOSARDoc(AbstractAUTOSAR):
|
|
639
|
-
def __init__(self):
|
|
640
|
-
super().__init__()
|
|
641
|
-
|
|
@@ -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"], "")
|