armodel 1.6.0__py3-none-any.whl → 1.6.2__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 +25 -22
- 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/data_models/sw_connector.py +3 -3
- armodel/lib/sw_component.py +3 -1
- armodel/lib/system_signal.py +3 -1
- armodel/models/__init__.py +5 -3
- armodel/models/ar_object.py +1 -1
- armodel/models/ar_package.py +185 -151
- armodel/models/ar_ref.py +0 -202
- armodel/models/common_structure.py +3 -71
- armodel/models/communication.py +1 -1
- armodel/models/datatype.py +7 -72
- armodel/models/end_to_end_protection.py +1 -1
- armodel/models/general_structure.py +10 -4
- armodel/models/internal_behavior.py +1 -1
- armodel/models/m2/autosar_templates/autosar_top_level_structure.py +120 -0
- armodel/models/m2/autosar_templates/common_structure/implementation.py +21 -0
- armodel/models/m2/autosar_templates/common_structure/implementation_data_types.py +154 -0
- armodel/models/m2/autosar_templates/ecuc_description_template.py +2 -1
- armodel/models/m2/autosar_templates/generic_structure/__init__.py +0 -0
- armodel/models/m2/autosar_templates/generic_structure/abstract_structure.py +69 -0
- armodel/models/m2/autosar_templates/generic_structure/ar_package.py +528 -0
- armodel/models/m2/autosar_templates/sw_component_template/communication.py +44 -0
- armodel/models/m2/autosar_templates/sw_component_template/components/__init__.py +246 -0
- armodel/models/m2/autosar_templates/sw_component_template/components/instance_refs.py +33 -1
- armodel/models/m2/autosar_templates/sw_component_template/composition/__init__.py +154 -0
- armodel/models/m2/autosar_templates/sw_component_template/composition/instance_refs.py +157 -0
- armodel/models/m2/autosar_templates/sw_component_template/data_type/__init__.py +0 -0
- armodel/models/m2/autosar_templates/sw_component_template/data_type/data_prototypes.py +104 -0
- armodel/models/m2/autosar_templates/sw_component_template/port_interface/__init__.py +243 -0
- armodel/models/m2/autosar_templates/sw_component_template/port_interface/instance_refs.py +39 -0
- armodel/models/m2/autosar_templates/sw_component_template/swc_internal_behavior/data_elements.py +3 -11
- armodel/models/m2/autosar_templates/sw_component_template/swc_internal_behavior/instance_refs_usage.py +169 -0
- armodel/models/m2/autosar_templates/sw_component_template/swc_internal_behavior/mode_declaration_group.py +1 -2
- armodel/models/m2/autosar_templates/sw_component_template/swc_internal_behavior/server_call.py +5 -4
- armodel/models/m2/autosar_templates/system_template/instance_refs.py +48 -0
- armodel/models/m2_msr.py +1 -0
- armodel/models/port_prototype.py +1 -90
- armodel/models/service_needs.py +3 -1
- armodel/models/sw_component.py +6 -143
- armodel/parser/__init__.py +2 -1
- armodel/parser/abstract_arxml_parser.py +1 -1
- armodel/parser/arxml_parser.py +157 -80
- armodel/parser/connector_xlsx_parser.py +3 -1
- armodel/parser/file_parser.py +43 -0
- armodel/report/connector_xls_report.py +2 -1
- armodel/tests/test_armodel/models/test_ar_package.py +6 -3
- armodel/tests/test_armodel/models/test_ar_ref.py +15 -13
- armodel/tests/test_armodel/models/test_common_structure.py +6 -5
- armodel/tests/test_armodel/models/test_data_prototype.py +1 -1
- armodel/tests/test_armodel/models/test_datatype.py +9 -9
- armodel/tests/test_armodel/models/test_general_structure.py +1 -1
- armodel/tests/test_armodel/models/test_implementation.py +1 -1
- armodel/tests/test_armodel/models/test_port_interface.py +2 -2
- armodel/tests/test_armodel/parser/test_parse_bswmd.py +3 -1
- armodel/tests/test_armodel/parser/test_sw_components.py +2 -2
- armodel/writer/abstract_arxml_writer.py +5 -1
- armodel/writer/arxml_writer.py +70 -60
- {armodel-1.6.0.dist-info → armodel-1.6.2.dist-info}/METADATA +5 -1
- {armodel-1.6.0.dist-info → armodel-1.6.2.dist-info}/RECORD +66 -51
- {armodel-1.6.0.dist-info → armodel-1.6.2.dist-info}/LICENSE +0 -0
- {armodel-1.6.0.dist-info → armodel-1.6.2.dist-info}/WHEEL +0 -0
- {armodel-1.6.0.dist-info → armodel-1.6.2.dist-info}/entry_points.txt +0 -0
- {armodel-1.6.0.dist-info → armodel-1.6.2.dist-info}/top_level.txt +0 -0
armodel/cli/arxml_dump_cli.py
CHANGED
|
@@ -2,7 +2,10 @@ import getopt
|
|
|
2
2
|
import sys
|
|
3
3
|
import logging
|
|
4
4
|
|
|
5
|
-
from ..models import
|
|
5
|
+
from ..models.m2.autosar_templates.sw_component_template.swc_internal_behavior.data_elements import VariableAccess
|
|
6
|
+
from ..models.m2.autosar_templates.generic_structure.ar_package import ARPackage
|
|
7
|
+
|
|
8
|
+
from ..models import AUTOSAR, SwComponentType, DataTypeMappingSet
|
|
6
9
|
from ..models import SwcInternalBehavior, ImplementationDataType
|
|
7
10
|
from ..models import BswModuleDescription, BswInternalBehavior, BswModuleEntity, BswModuleEntry
|
|
8
11
|
from ..models import PortPrototype, RPortPrototype, PPortPrototype
|
|
@@ -10,38 +13,38 @@ from ..models import SenderReceiverInterface, ClientServerInterface
|
|
|
10
13
|
from ..parser import ARXMLParser
|
|
11
14
|
|
|
12
15
|
def show_variable_access(indent:int, variable_access: VariableAccess):
|
|
13
|
-
if (variable_access.
|
|
14
|
-
accessed_variable_ref = variable_access.
|
|
15
|
-
if (accessed_variable_ref.
|
|
16
|
-
autosar_variable_in_impl_datatype = accessed_variable_ref.
|
|
17
|
-
print("%s: %s" % (" " * indent, autosar_variable_in_impl_datatype.
|
|
18
|
-
print("%s: %s" % (" " * indent, autosar_variable_in_impl_datatype.
|
|
16
|
+
if (variable_access.getAccessedVariableRef() != None):
|
|
17
|
+
accessed_variable_ref = variable_access.getAccessedVariableRef()
|
|
18
|
+
if (accessed_variable_ref.getAutosarVariableInImplDatatype() != None):
|
|
19
|
+
autosar_variable_in_impl_datatype = accessed_variable_ref.getAutosarVariableInImplDatatype()
|
|
20
|
+
print("%s: %s" % (" " * indent, autosar_variable_in_impl_datatype.getPortPrototypeRef().getValue()))
|
|
21
|
+
print("%s: %s" % (" " * indent, autosar_variable_in_impl_datatype.getTargetDataPrototypeRef().getValue()))
|
|
19
22
|
|
|
20
23
|
def show_port(indent:int, port_prototype: PortPrototype):
|
|
21
24
|
if (isinstance(port_prototype, RPortPrototype)):
|
|
22
|
-
print("%s-RPort: %s (%s)" % (" " * indent, port_prototype.short_name, port_prototype.
|
|
25
|
+
print("%s-RPort: %s (%s)" % (" " * indent, port_prototype.short_name, port_prototype.getRequiredInterfaceTRef().getValue()))
|
|
23
26
|
for client_com_spec in port_prototype.getClientComSpecs():
|
|
24
|
-
print("%s : %s (ClientComSpec)" % (" " * (indent + 2), client_com_spec.
|
|
27
|
+
print("%s : %s (ClientComSpec)" % (" " * (indent + 2), client_com_spec.getOperationRef().getValue()))
|
|
25
28
|
for com_spec in port_prototype.getNonqueuedReceiverComSpecs():
|
|
26
|
-
print("%s : %s (NonqueuedReceiverComSpec)" % (" " * (indent + 2), com_spec.
|
|
29
|
+
print("%s : %s (NonqueuedReceiverComSpec)" % (" " * (indent + 2), com_spec.getDataElementRef().getValue()))
|
|
27
30
|
elif (isinstance(port_prototype, PPortPrototype)):
|
|
28
|
-
print("%s-PPort: %s (%s)" % (" " * indent, port_prototype.short_name, port_prototype.
|
|
31
|
+
print("%s-PPort: %s (%s)" % (" " * indent, port_prototype.short_name, port_prototype.getProvidedInterfaceTRef().getValue()))
|
|
29
32
|
for com_spec in port_prototype.getNonqueuedSenderComSpecs():
|
|
30
|
-
print("%s : %s (NonqueuedSenderComSpec)" % (" " * (indent + 2), com_spec.
|
|
33
|
+
print("%s : %s (NonqueuedSenderComSpec)" % (" " * (indent + 2), com_spec.getDataElementRef().getValue()))
|
|
31
34
|
else:
|
|
32
35
|
raise ValueError("Unsupported Port prototype")
|
|
33
36
|
|
|
34
37
|
def show_type(indent: int, data_type: ImplementationDataType):
|
|
35
38
|
print("%s-Implementation Type: %s (%s)" % (" " * indent, data_type.short_name, data_type._parent.full_name))
|
|
36
|
-
print("%s : %s" % (" " * indent, data_type.
|
|
37
|
-
if (data_type.
|
|
38
|
-
if (data_type.
|
|
39
|
-
base_type_ref = data_type.
|
|
40
|
-
print("%s : %s (%s)" % (" " * indent, base_type_ref.
|
|
39
|
+
print("%s : %s" % (" " * indent, data_type.getCategory()))
|
|
40
|
+
if (data_type.getSwDataDefProps() != None):
|
|
41
|
+
if (data_type.getSwDataDefProps().getBaseTypeRef() != None):
|
|
42
|
+
base_type_ref = data_type.getSwDataDefProps().getBaseTypeRef()
|
|
43
|
+
print("%s : %s (%s)" % (" " * indent, base_type_ref.getValue(), base_type_ref.getDest()))
|
|
41
44
|
|
|
42
|
-
if (data_type.
|
|
43
|
-
implementation_data_type_ref = data_type.
|
|
44
|
-
print("%s : %s (%s)" % (" " * indent, implementation_data_type_ref.
|
|
45
|
+
if (data_type.getSwDataDefProps().getImplementationDataTypeRef() != None):
|
|
46
|
+
implementation_data_type_ref = data_type.getSwDataDefProps().getImplementationDataTypeRef()
|
|
47
|
+
print("%s : %s (%s)" % (" " * indent, implementation_data_type_ref.getValue(), implementation_data_type_ref.getDest()))
|
|
45
48
|
|
|
46
49
|
def show_data_type_mapping(indent: int, mapping_set: DataTypeMappingSet):
|
|
47
50
|
print("%s- Data Mapping Set <%s>:" % (" " * indent, mapping_set.short_name))
|
|
@@ -63,8 +66,8 @@ def show_behavior(indent:int, behavior: SwcInternalBehavior):
|
|
|
63
66
|
for server_call_point in runnable.getServerCallPoints():
|
|
64
67
|
print("%s-scp : %s" % (" " * (indent + 4), variable_access.short_name))
|
|
65
68
|
if (server_call_point.operation_iref != None):
|
|
66
|
-
print("%s: %s" % (" " * (indent + 9), server_call_point.
|
|
67
|
-
print("%s: %s" % (" " * (indent + 9), server_call_point.
|
|
69
|
+
print("%s: %s" % (" " * (indent + 9), server_call_point.getOperationIRef().getContextRPortRef().getValue()))
|
|
70
|
+
print("%s: %s" % (" " * (indent + 9), server_call_point.getOperationIRef().getTargetRequiredOperationRef().getValue()))
|
|
68
71
|
for event in behavior.getOperationInvokedEvents():
|
|
69
72
|
print(" - OperationInvokedEvent : %s" % event.short_name)
|
|
70
73
|
print(" : %s" % (event.start_on_event_ref.value))
|
armodel/cli/arxml_format_cli.py
CHANGED
|
@@ -5,11 +5,8 @@ import sys
|
|
|
5
5
|
import os.path
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
from ..models.
|
|
8
|
+
from ..models.m2.autosar_templates.autosar_top_level_structure import AUTOSAR
|
|
9
9
|
from ..parser.arxml_parser import ARXMLParser
|
|
10
|
-
from ..parser.connector_xlsx_parser import ConnectorXlsReader
|
|
11
|
-
|
|
12
|
-
from ..lib import InputFileParser
|
|
13
10
|
from ..writer import ARXMLWriter
|
|
14
11
|
|
|
15
12
|
def main():
|
|
@@ -5,7 +5,7 @@ import sys
|
|
|
5
5
|
import os.path
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
from ..models.
|
|
8
|
+
from ..models.m2.autosar_templates.autosar_top_level_structure import AUTOSAR
|
|
9
9
|
from ..parser.arxml_parser import ARXMLParser
|
|
10
10
|
from ..parser.connector_xlsx_parser import ConnectorXlsReader
|
|
11
11
|
|
armodel/cli/swc_list_cli.py
CHANGED
armodel/lib/sw_component.py
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
|
|
3
3
|
from typing import List
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
from ..models.m2.autosar_templates.generic_structure.ar_package import ARPackage
|
|
6
|
+
from ..models import AUTOSAR, AtomicSwComponentType, CompositionSwComponentType
|
|
5
7
|
|
|
6
8
|
class SwComponentAnalyzer:
|
|
7
9
|
def __init__(self) -> None:
|
armodel/lib/system_signal.py
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
from typing import List
|
|
3
3
|
|
|
4
|
-
from ..models.ar_package import
|
|
4
|
+
from ..models.m2.autosar_templates.generic_structure.ar_package import ARPackage
|
|
5
|
+
|
|
6
|
+
from ..models.m2.autosar_templates.autosar_top_level_structure import AUTOSAR
|
|
5
7
|
from ..models.fibex.fibex_core.core_communication import SystemSignal
|
|
6
8
|
|
|
7
9
|
class SystemSignalAnalyzer:
|
armodel/models/__init__.py
CHANGED
|
@@ -3,11 +3,11 @@ from .ar_object import *
|
|
|
3
3
|
from .general_structure import *
|
|
4
4
|
from .common_structure import *
|
|
5
5
|
from .sw_component import *
|
|
6
|
-
from .
|
|
6
|
+
from .m2.autosar_templates.autosar_top_level_structure import *
|
|
7
7
|
from .ar_ref import *
|
|
8
8
|
from .datatype import *
|
|
9
9
|
from .port_prototype import *
|
|
10
|
-
from .
|
|
10
|
+
from .m2.autosar_templates.sw_component_template.data_type.data_prototypes import *
|
|
11
11
|
from .m2.msr.asam_hdo.units import *
|
|
12
12
|
from .m2.msr.data_dictionary.data_def_properties import *
|
|
13
13
|
from .m2.msr.data_dictionary.auxillary_objects import *
|
|
@@ -19,4 +19,6 @@ from .communication import *
|
|
|
19
19
|
from .calibration import *
|
|
20
20
|
from .global_constraints import *
|
|
21
21
|
from .m2.msr.asam_hdo.units import *
|
|
22
|
-
from .m2.autosar_templates.sw_component_template import *
|
|
22
|
+
from .m2.autosar_templates.sw_component_template import *
|
|
23
|
+
from .m2.autosar_templates.sw_component_template.components import *
|
|
24
|
+
from .m2.autosar_templates.sw_component_template.composition import *
|
armodel/models/ar_object.py
CHANGED