armodel 1.5.0__py3-none-any.whl → 1.6.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 +13 -13
- armodel/cli/memory_section_cli.py +76 -0
- armodel/cli/system_signal_cli.py +74 -0
- armodel/lib/__init__.py +2 -1
- armodel/lib/system_signal.py +37 -0
- armodel/models/__init__.py +6 -3
- armodel/models/annotation.py +27 -3
- armodel/models/ar_object.py +18 -6
- armodel/models/ar_package.py +124 -14
- armodel/models/ar_ref.py +109 -62
- armodel/models/bsw_module_template.py +37 -14
- armodel/models/common_structure.py +132 -147
- armodel/models/communication.py +1 -1
- armodel/models/data_prototype.py +41 -6
- armodel/models/datatype.py +11 -5
- armodel/models/fibex/can_communication.py +119 -3
- armodel/models/fibex/fibex_4_can/__init__.py +0 -0
- armodel/models/fibex/fibex_4_lin/__init__.py +0 -0
- armodel/models/fibex/fibex_4_multiplatform.py +81 -88
- armodel/models/fibex/fibex_core/__init__.py +0 -0
- armodel/models/fibex/fibex_core/core_communication.py +627 -0
- armodel/models/fibex/fibex_core/core_topology.py +180 -0
- armodel/models/fibex/lin_communication.py +24 -3
- armodel/models/general_structure.py +101 -8
- armodel/models/m2/__init__.py +0 -0
- armodel/models/m2/autosar_templates/__init__.py +0 -0
- armodel/models/m2/autosar_templates/common_structure/__init__.py +188 -0
- armodel/models/m2/autosar_templates/common_structure/constants.py +0 -0
- armodel/models/m2/autosar_templates/ecuc_description_template.py +268 -0
- armodel/models/m2/autosar_templates/sw_component_template/__init__.py +0 -0
- armodel/models/m2/autosar_templates/sw_component_template/communication.py +316 -0
- armodel/models/m2/autosar_templates/sw_component_template/components/__init__.py +0 -0
- armodel/models/m2/autosar_templates/sw_component_template/components/instance_refs.py +149 -0
- armodel/models/m2/autosar_templates/sw_component_template/port_interface.py +236 -0
- armodel/models/m2/autosar_templates/sw_component_template/swc_internal_behavior/__init__.py +203 -0
- armodel/models/m2/autosar_templates/sw_component_template/swc_internal_behavior/access_count.py +13 -0
- armodel/models/m2/autosar_templates/sw_component_template/swc_internal_behavior/data_elements.py +54 -0
- armodel/models/m2/autosar_templates/sw_component_template/swc_internal_behavior/mode_declaration_group.py +39 -0
- armodel/models/m2/autosar_templates/sw_component_template/swc_internal_behavior/server_call.py +26 -0
- armodel/models/m2/autosar_templates/sw_component_template/swc_internal_behavior/trigger.py +10 -0
- armodel/models/m2/autosar_templates/system_template/__init__.py +321 -0
- armodel/models/m2/autosar_templates/system_template/data_mapping.py +88 -0
- armodel/models/m2/autosar_templates/system_template/network_management.py +554 -0
- armodel/models/m2/autosar_templates/system_template/transport_protocols.py +7 -0
- armodel/models/m2/msr/__init__.py +0 -0
- armodel/models/m2/msr/asam_hdo/__init__.py +0 -0
- armodel/models/m2/msr/asam_hdo/units.py +105 -0
- armodel/models/m2/msr/data_dictionary/__init__.py +0 -0
- armodel/models/m2/msr/data_dictionary/auxillary_objects.py +42 -0
- armodel/models/m2/msr/data_dictionary/data_def_properties.py +295 -0
- armodel/models/m2/msr/documentation/__init__.py +0 -0
- armodel/models/m2/msr/documentation/block_elements.py +18 -0
- armodel/models/multilanguage_data.py +15 -0
- armodel/models/per_instance_memory.py +34 -6
- armodel/models/port_prototype.py +12 -174
- armodel/models/sw_component.py +14 -216
- armodel/parser/abstract_arxml_parser.py +10 -1
- armodel/parser/arxml_parser.py +803 -186
- armodel/tests/test_armodel/models/test_ar_package.py +1 -1
- armodel/tests/test_armodel/models/test_ar_ref.py +3 -3
- armodel/tests/test_armodel/models/test_bsw_module_template.py +5 -5
- armodel/tests/test_armodel/models/test_common_structure.py +3 -3
- armodel/tests/test_armodel/models/test_data_dictionary.py +5 -5
- armodel/tests/test_armodel/models/test_data_prototype.py +1 -1
- armodel/tests/test_armodel/models/test_datatype.py +1 -1
- armodel/tests/test_armodel/models/test_port_interface.py +1 -1
- armodel/tests/test_armodel/parser/test_parse_bswmd.py +3 -3
- armodel/tests/test_armodel/parser/test_sw_components.py +2 -2
- armodel/writer/arxml_writer.py +832 -196
- {armodel-1.5.0.dist-info → armodel-1.6.0.dist-info}/METADATA +24 -1
- armodel-1.6.0.dist-info/RECORD +127 -0
- {armodel-1.5.0.dist-info → armodel-1.6.0.dist-info}/entry_points.txt +3 -1
- armodel-1.5.0.dist-info/RECORD +0 -91
- {armodel-1.5.0.dist-info → armodel-1.6.0.dist-info}/LICENSE +0 -0
- {armodel-1.5.0.dist-info → armodel-1.6.0.dist-info}/WHEEL +0 -0
- {armodel-1.5.0.dist-info → armodel-1.6.0.dist-info}/top_level.txt +0 -0
|
@@ -5,7 +5,7 @@ from ....models.ar_package import AUTOSAR
|
|
|
5
5
|
from ....models.datatype import ApplicationPrimitiveDataType, ApplicationRecordDataType, DataTypeMappingSet, ImplementationDataType, SwBaseType
|
|
6
6
|
from ....models.general_structure import ARElement, ARObject, CollectableElement, Identifiable, MultilanguageReferrable, PackageableElement, Referrable
|
|
7
7
|
from ....models.m2_msr import CompuMethod
|
|
8
|
-
from ....models.port_interface import ClientServerInterface, DataInterface, PortInterface, SenderReceiverInterface
|
|
8
|
+
from ....models.m2.autosar_templates.sw_component_template.port_interface import ClientServerInterface, DataInterface, PortInterface, SenderReceiverInterface
|
|
9
9
|
from ....models.sw_component import ApplicationSwComponentType, AtomicSwComponentType, CompositionSwComponentType, EcuAbstractionSwComponentType, ServiceSwComponentType, SwComponentType
|
|
10
10
|
|
|
11
11
|
class TestAUTOSAR:
|
|
@@ -21,9 +21,9 @@ class TestARRef:
|
|
|
21
21
|
def test_AutosarVariableRef(self):
|
|
22
22
|
ref_type = AutosarVariableRef()
|
|
23
23
|
assert(ref_type != None)
|
|
24
|
-
assert(ref_type.
|
|
25
|
-
assert(ref_type.
|
|
26
|
-
assert(ref_type.
|
|
24
|
+
assert(ref_type.autosarVariableIRef == None)
|
|
25
|
+
assert(ref_type.autosarVariableInImplDatatype == None)
|
|
26
|
+
assert(ref_type.localVariableRef == None)
|
|
27
27
|
|
|
28
28
|
def test_AtpInstanceRef(self):
|
|
29
29
|
with pytest.raises(NotImplementedError) as err:
|
|
@@ -15,12 +15,12 @@ class TestBswModuleDescription:
|
|
|
15
15
|
document = AUTOSAR.getInstance()
|
|
16
16
|
ar_root = document.createARPackage("AUTOSAR")
|
|
17
17
|
bsw_module_description = BswModuleDescription(ar_root, "bsw_module")
|
|
18
|
-
with pytest.raises(ValueError) as err:
|
|
19
|
-
|
|
20
|
-
assert(str(err.value) == "Invalid category <invalid> of BswModuleDescription <bsw_module>")
|
|
18
|
+
#with pytest.raises(ValueError) as err:
|
|
19
|
+
# bsw_module_description.category = "invalid"
|
|
20
|
+
#assert(str(err.value) == "Invalid category <invalid> of BswModuleDescription <bsw_module>")
|
|
21
21
|
|
|
22
|
-
bsw_module_description.
|
|
23
|
-
assert(bsw_module_description.
|
|
22
|
+
bsw_module_description.setCategory("BSW_MODULE")
|
|
23
|
+
assert(bsw_module_description.getCategory() == "BSW_MODULE")
|
|
24
24
|
|
|
25
25
|
class Test_M2_AUTOSARTemplates_BswModuleTemplate_BswInterfaces:
|
|
26
26
|
def test_BswModuleEntry(self):
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import pytest
|
|
2
2
|
|
|
3
3
|
from .... import AUTOSAR
|
|
4
|
-
from ....models.common_structure import
|
|
5
|
-
from ....models.
|
|
4
|
+
from ....models.m2.autosar_templates.common_structure import ConstantReference, ConstantSpecification, ValueSpecification
|
|
5
|
+
from ....models.common_structure import AbstractImplementationDataTypeElement, ImplementationDataTypeElement, ExecutableEntity
|
|
6
6
|
from ....models.general_structure import ARElement, ARObject, CollectableElement, Identifiable
|
|
7
7
|
from ....models.general_structure import MultilanguageReferrable, PackageableElement, Referrable
|
|
8
8
|
|
|
@@ -30,7 +30,7 @@ class Test_M2_AUTOSARTemplates_CommonStructure_Constants:
|
|
|
30
30
|
def test_ConstantReference(self):
|
|
31
31
|
ref = ConstantReference()
|
|
32
32
|
|
|
33
|
-
assert(ref.
|
|
33
|
+
assert(ref.getConstantRef() == None)
|
|
34
34
|
|
|
35
35
|
assert(isinstance(ref, ARObject))
|
|
36
36
|
assert(isinstance(ref, ValueSpecification))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import pytest
|
|
2
2
|
|
|
3
|
-
from ....models.data_dictionary import SwDataDefProps, SwPointerTargetProps
|
|
3
|
+
from ....models.m2.msr.data_dictionary.data_def_properties import SwDataDefProps, SwPointerTargetProps
|
|
4
4
|
from ....models.general_structure import ARObject
|
|
5
5
|
|
|
6
6
|
class Test_M2_MSR_DataDictionary_DataDefProperties:
|
|
@@ -16,7 +16,7 @@ class Test_M2_MSR_DataDictionary_DataDefProperties:
|
|
|
16
16
|
assert(props.implementationDataTypeRef == None)
|
|
17
17
|
assert(props.swImplPolicy == None)
|
|
18
18
|
assert(props.swCalibrationAccess == None)
|
|
19
|
-
assert(props.
|
|
19
|
+
assert(props.swPointerTargetProps == None)
|
|
20
20
|
|
|
21
21
|
def test_SwPointerTargetProps(self):
|
|
22
22
|
props = SwPointerTargetProps()
|
|
@@ -24,6 +24,6 @@ class Test_M2_MSR_DataDictionary_DataDefProperties:
|
|
|
24
24
|
assert(isinstance(props, ARObject))
|
|
25
25
|
assert(isinstance(props, SwPointerTargetProps))
|
|
26
26
|
|
|
27
|
-
assert(props.
|
|
28
|
-
assert(props.
|
|
29
|
-
assert(props.
|
|
27
|
+
assert(props.getFunctionPointerSignatureRef() == None)
|
|
28
|
+
assert(props.getSwDataDefProps() == None)
|
|
29
|
+
assert(props.getTargetCategory() == None)
|
|
@@ -44,7 +44,7 @@ class Test_M2_AUTOSARTemplates_SWComponentTemplate_Datatype_DataPrototypes:
|
|
|
44
44
|
|
|
45
45
|
assert(prototype._parent == ar_root)
|
|
46
46
|
assert(prototype.short_name == "prototype")
|
|
47
|
-
assert(prototype.
|
|
47
|
+
assert(prototype.typeTRef is None)
|
|
48
48
|
|
|
49
49
|
def test_ApplicationCompositeElementDataPrototype(self):
|
|
50
50
|
with pytest.raises(NotImplementedError) as err:
|
|
@@ -99,7 +99,7 @@ class Test_M2_AUTOSARTemplates_SWComponentTemplate_Datatype_Datatypes:
|
|
|
99
99
|
|
|
100
100
|
assert(data_type._parent == ar_root)
|
|
101
101
|
assert(data_type.short_name == "ApplicationPrimitiveDataType")
|
|
102
|
-
assert(data_type.
|
|
102
|
+
assert(data_type.swDataDefProps == None)
|
|
103
103
|
|
|
104
104
|
def test_ApplicationCompositeDataType(self):
|
|
105
105
|
with pytest.raises(NotImplementedError) as err:
|
|
@@ -5,7 +5,7 @@ from ....models.ar_ref import RefType
|
|
|
5
5
|
from ....models.data_prototype import AtpPrototype, AutosarDataPrototype, DataPrototype, VariableDataPrototype
|
|
6
6
|
from ....models.datatype import AtpType
|
|
7
7
|
from ....models.general_structure import ARElement, ARObject, AtpFeature, CollectableElement, Identifiable, MultilanguageReferrable, PackageableElement, Referrable
|
|
8
|
-
from ....models.port_interface import ApplicationError, ArgumentDataPrototype, ClientServerInterface, ClientServerOperation, DataInterface, NvDataInterface, ParameterInterface, PortInterface, SenderReceiverInterface
|
|
8
|
+
from ....models.m2.autosar_templates.sw_component_template.port_interface import ApplicationError, ArgumentDataPrototype, ClientServerInterface, ClientServerOperation, DataInterface, NvDataInterface, ParameterInterface, PortInterface, SenderReceiverInterface
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class Test_M2_AUTOSARTemplates_SWComponentTemplate_PortInterface:
|
|
@@ -72,13 +72,13 @@ class TestBswMD:
|
|
|
72
72
|
assert(len(behavior.getBswSchedulableEntities()) == 1)
|
|
73
73
|
entity = behavior.getBswSchedulableEntities()[0]
|
|
74
74
|
assert(entity.short_name == "BswM_MainFunction")
|
|
75
|
-
assert(entity.
|
|
75
|
+
assert(entity.minimumStartInterval is not None)
|
|
76
76
|
assert(entity.minimumStartIntervalMs is not None)
|
|
77
77
|
assert(len(entity.getCanEnterExclusiveAreaRefs()) == 1)
|
|
78
78
|
assert(entity.getCanEnterExclusiveAreaRefs()[0].dest == "EXCLUSIVE-AREA")
|
|
79
79
|
assert(entity.getCanEnterExclusiveAreaRefs()[0].value == "/AUTOSAR_BswM/BswModuleDescriptions/BswM/InternalBehavior_0/SCHM_BSWM_EXCLUSIVE_AREA")
|
|
80
|
-
assert(entity.
|
|
81
|
-
assert(entity.
|
|
80
|
+
assert(entity.implementedEntryRef.dest == "BSW-MODULE-ENTRY")
|
|
81
|
+
assert(entity.implementedEntryRef.value == "/AUTOSAR_BswM/BswModuleEntrys/BswM_MainFunction")
|
|
82
82
|
|
|
83
83
|
assert(len(behavior.getBswTimingEvents()) == 1)
|
|
84
84
|
event = behavior.getBswTimingEvents()[0]
|
|
@@ -13,10 +13,10 @@ class TestSWComponents:
|
|
|
13
13
|
|
|
14
14
|
def test_ar_packages(self):
|
|
15
15
|
document = AUTOSAR.getInstance()
|
|
16
|
-
root_pkgs = sorted(document.getARPackages(), key = lambda pkg: pkg.
|
|
16
|
+
root_pkgs = sorted(document.getARPackages(), key = lambda pkg: pkg.getShortName())
|
|
17
17
|
|
|
18
18
|
assert(len(root_pkgs) == 1)
|
|
19
|
-
assert("DemoApplication" == root_pkgs[0].
|
|
19
|
+
assert("DemoApplication" == root_pkgs[0].getShortName())
|
|
20
20
|
|
|
21
21
|
def test_composition_sw_component_types(self):
|
|
22
22
|
document = AUTOSAR.getInstance()
|