armodel 1.6.3__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 +7 -7
- armodel/cli/arxml_format_cli.py +0 -1
- armodel/cli/connector2xlsx_cli.py +2 -3
- armodel/cli/connector_update_cli.py +1 -4
- armodel/cli/memory_section_cli.py +2 -2
- armodel/cli/swc_list_cli.py +2 -3
- armodel/cli/system_signal_cli.py +2 -2
- armodel/lib/sw_component.py +2 -2
- armodel/lib/system_signal.py +1 -3
- armodel/models/M2/AUTOSARTemplates/AutosarTopLevelStructure.py +5 -10
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswBehavior.py +9 -11
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswImplementation.py +51 -12
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswInterfaces.py +3 -3
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswOverview.py +5 -6
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/__init__.py +4 -1
- armodel/models/M2/AUTOSARTemplates/CommonStructure/Implementation.py +186 -29
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ImplementationDataTypes.py +7 -10
- armodel/models/M2/AUTOSARTemplates/CommonStructure/InternalBehavior.py +18 -7
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ModeDeclaration.py +3 -3
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ResourceConsumption/MemorySectionUsage.py +3 -6
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ResourceConsumption/__init__.py +3 -5
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ServiceNeeds.py +10 -6
- armodel/models/M2/AUTOSARTemplates/CommonStructure/SwcBswMapping.py +3 -4
- armodel/models/M2/AUTOSARTemplates/CommonStructure/SwcInternalBehavior/ModeDeclarationGroup.py +2 -5
- armodel/models/M2/AUTOSARTemplates/CommonStructure/SwcInternalBehavior/__init__.py +0 -1
- armodel/models/M2/AUTOSARTemplates/CommonStructure/Timing/TimingConstraint/ExecutionOrderConstraint.py +45 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/Timing/TimingConstraint/TimingConstraint.py +24 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/Timing/TimingConstraint/TimingExtensions.py +33 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/TriggerDeclaration.py +2 -2
- armodel/models/M2/AUTOSARTemplates/CommonStructure/__init__.py +4 -6
- armodel/models/M2/AUTOSARTemplates/{ecuc_description_template.py → ECUCDescriptionTemplate.py} +6 -11
- armodel/models/M2/AUTOSARTemplates/GenericStructure/AbstractStructure.py +3 -6
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ARPackage.py +40 -36
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/EngineeringObject.py +2 -5
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/Identifiable.py +11 -16
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/PrimitiveTypes.py +17 -2
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/__init__.py +0 -1
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Communication.py +1 -1
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Components/InstanceRefs.py +2 -4
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Components/__init__.py +114 -12
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Composition/InstanceRefs.py +2 -5
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Composition/__init__.py +4 -62
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Datatype/DataPrototypes.py +6 -8
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Datatype/Datatypes.py +7 -7
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Datatype/__init__.py +0 -1
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/{port_interface/instance_refs.py → PortInterface/InstanceRefs.py} +2 -2
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/{port_interface → PortInterface}/__init__.py +10 -10
- armodel/models/{rpt_scenario.py → M2/AUTOSARTemplates/SWComponentTemplate/RPTScenario.py} +4 -6
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcImplementation.py +29 -6
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/DataElements.py +6 -6
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/IncludedDataTypes.py +2 -2
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/InstanceRefsUsage.py +3 -3
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ModeDeclarationGroup.py +4 -4
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/PerInstanceMemory.py +3 -3
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/PortAPIOptions.py +86 -0
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/RTEEvents.py +174 -0
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ServerCall.py +3 -4
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ServiceMapping.py +37 -3
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/Trigger.py +2 -4
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/__init__.py +166 -10
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/{data_mapping.py → DataMapping.py} +2 -3
- armodel/models/{fibex/can_communication.py → M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Can/CanCommunication.py} +3 -4
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Ethernet/EthernetFrame.py +14 -0
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Ethernet/ServiceInstances.py +116 -0
- armodel/models/{fibex/lin_communication.py → M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Lin/LinCommunication.py} +4 -5
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Lin/__init__.py +0 -0
- armodel/models/{fibex/fibex_4_multiplatform.py → M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Multiplatform.py} +5 -6
- armodel/models/{fibex/fibex_core/core_communication.py → M2/AUTOSARTemplates/SystemTemplate/Fibex/FibexCore/CoreCommunication.py} +4 -12
- armodel/models/{fibex/fibex_core/core_topology.py → M2/AUTOSARTemplates/SystemTemplate/Fibex/FibexCore/CoreTopology.py} +6 -11
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/FibexCore/__init__.py +0 -0
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/__init__.py +0 -0
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/InstanceRefs.py +2 -2
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/{network_management.py → NetworkManagement.py} +5 -10
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/TransportProtocols.py +6 -0
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/__init__.py +3 -6
- armodel/models/M2/MSR/AsamHdo/AdminData.py +2 -5
- armodel/models/M2/MSR/AsamHdo/BaseTypes.py +3 -3
- armodel/models/M2/MSR/AsamHdo/ComputationMethod.py +5 -6
- armodel/models/M2/MSR/AsamHdo/Constraints/GlobalConstraints.py +3 -4
- armodel/models/M2/MSR/AsamHdo/Constraints/__init__.py +0 -1
- armodel/models/M2/MSR/AsamHdo/SpecialData.py +1 -4
- armodel/models/M2/MSR/AsamHdo/Units.py +3 -6
- armodel/models/M2/MSR/AsamHdo/__init__.py +0 -1
- armodel/models/M2/MSR/CalibrationData/CalibrationValue.py +3 -7
- armodel/models/M2/MSR/CalibrationData/__init__.py +0 -1
- armodel/models/M2/MSR/DataDictionary/AuxillaryObjects.py +3 -6
- armodel/models/M2/MSR/DataDictionary/Axis.py +3 -3
- armodel/models/M2/MSR/DataDictionary/CalibrationParameter.py +3 -3
- armodel/models/M2/MSR/DataDictionary/DataDefProperties.py +5 -6
- armodel/models/M2/MSR/DataDictionary/RecordLayout.py +4 -4
- armodel/models/M2/MSR/DataDictionary/__init__.py +0 -1
- armodel/models/M2/MSR/Documentation/Annotation.py +4 -6
- armodel/models/M2/MSR/Documentation/BlockElements.py +2 -2
- armodel/models/M2/MSR/Documentation/TextModel/LanguageDataModel.py +1 -2
- armodel/models/M2/MSR/Documentation/TextModel/MultilanguageData.py +3 -6
- armodel/models/M2/MSR/Documentation/TextModel/__init__.py +0 -2
- armodel/models/M2/MSR/Documentation/__init__.py +1 -1
- armodel/models/M2/MSR/__init__.py +1 -1
- armodel/models/M2/__init__.py +0 -1
- armodel/models/__init__.py +46 -3
- armodel/parser/arxml_parser.py +58 -54
- armodel/parser/file_parser.py +2 -1
- armodel/report/connector_xls_report.py +2 -1
- armodel/tests/test_armodel/models/test_ar_object.py +0 -2
- armodel/tests/test_armodel/models/test_ar_package.py +4 -4
- armodel/tests/test_armodel/models/test_data_prototype.py +1 -1
- armodel/tests/test_armodel/models/test_datatype.py +7 -7
- armodel/tests/test_armodel/models/test_port_interface.py +6 -6
- armodel/tests/test_armodel/parser/test_parse_bswmd.py +12 -12
- armodel/tests/test_armodel/parser/test_sw_components.py +1 -1
- armodel/tests/test_armodel/parser/test_system.py +1 -1
- armodel/writer/arxml_writer.py +61 -49
- {armodel-1.6.3.dist-info → armodel-1.6.4.dist-info}/METADATA +371 -366
- armodel-1.6.4.dist-info/RECORD +156 -0
- {armodel-1.6.3.dist-info → armodel-1.6.4.dist-info}/WHEEL +1 -1
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/transport_protocols.py +0 -7
- armodel/models/sw_component.py +0 -390
- armodel/models/timing.py +0 -91
- armodel-1.6.3.dist-info/RECORD +0 -148
- /armodel/models/{fibex → M2/AUTOSARTemplates/CommonStructure/Timing/TimingConstraint}/__init__.py +0 -0
- /armodel/models/{fibex/fibex_4_can → M2/AUTOSARTemplates/CommonStructure/Timing}/__init__.py +0 -0
- /armodel/models/{fibex/fibex_4_lin → M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Can}/__init__.py +0 -0
- /armodel/models/{fibex/fibex_core → M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Ethernet}/__init__.py +0 -0
- {armodel-1.6.3.dist-info → armodel-1.6.4.dist-info}/LICENSE +0 -0
- {armodel-1.6.3.dist-info → armodel-1.6.4.dist-info}/entry_points.txt +0 -0
- {armodel-1.6.3.dist-info → armodel-1.6.4.dist-info}/top_level.txt +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
from typing import List
|
|
2
|
-
from ...AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
3
|
-
from ...AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARFloat
|
|
4
|
-
|
|
5
2
|
from abc import ABCMeta
|
|
3
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
4
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARFloat
|
|
5
|
+
|
|
6
6
|
class SwCalprmAxisTypeProps(ARObject, metaclass = ABCMeta):
|
|
7
7
|
def __init__(self):
|
|
8
8
|
if type(self) == SwCalprmAxisTypeProps:
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
from typing import List
|
|
2
|
-
|
|
3
|
-
from
|
|
4
|
-
from
|
|
5
|
-
from
|
|
6
|
-
from
|
|
7
|
-
from ...AUTOSARTemplates.CommonStructure import ValueSpecification
|
|
2
|
+
from ....M2.MSR.Documentation.Annotation import Annotation
|
|
3
|
+
from ....M2.MSR.DataDictionary.CalibrationParameter import SwCalprmAxisSet
|
|
4
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
5
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARFloat, RefType, ARLiteral
|
|
6
|
+
from ....M2.AUTOSARTemplates.CommonStructure import ValueSpecification
|
|
8
7
|
|
|
9
8
|
class SwDataDefPropsConditional(ARObject):
|
|
10
9
|
'''
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
3
|
-
from
|
|
4
|
-
from
|
|
1
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
2
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import ARElement
|
|
3
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARLiteral, ARNumerical, RefType
|
|
4
|
+
from ....M2.MSR.Documentation.TextModel.MultilanguageData import MultiLanguageOverviewParagraph
|
|
5
5
|
|
|
6
6
|
class SwRecordLayoutV(ARObject):
|
|
7
7
|
def __init__(self):
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
from . import *
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
3
|
-
from .
|
|
4
|
-
from
|
|
5
|
-
|
|
1
|
+
from ....M2.MSR.Documentation.BlockElements import DocumentationBlock
|
|
2
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
3
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARLiteral
|
|
4
|
+
from ....M2.MSR.Documentation.TextModel.MultilanguageData import MultilanguageLongName
|
|
6
5
|
from abc import ABCMeta
|
|
7
6
|
|
|
8
|
-
|
|
9
7
|
class GeneralAnnotation(ARObject, metaclass=ABCMeta):
|
|
10
8
|
def __init__(self):
|
|
11
9
|
if type(self) == ARObject:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from typing import List
|
|
2
|
-
from .TextModel.MultilanguageData import MultiLanguageParagraph
|
|
3
|
-
from
|
|
2
|
+
from ....M2.MSR.Documentation.TextModel.MultilanguageData import MultiLanguageParagraph
|
|
3
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
4
4
|
|
|
5
5
|
class DocumentationBlock(ARObject):
|
|
6
6
|
def __init__(self):
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
from armodel.models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
2
|
-
from armodel.models.M2.MSR.Documentation.TextModel.LanguageDataModel import LOverviewParagraph
|
|
3
|
-
from armodel.models.M2.MSR.Documentation.TextModel.LanguageDataModel import LLongName
|
|
4
|
-
|
|
5
|
-
|
|
6
1
|
from typing import List
|
|
7
|
-
|
|
2
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
3
|
+
from .....M2.MSR.Documentation.TextModel.LanguageDataModel import LOverviewParagraph
|
|
4
|
+
from .....M2.MSR.Documentation.TextModel.LanguageDataModel import LLongName
|
|
8
5
|
|
|
9
6
|
class MultiLanguageParagraph(ARObject):
|
|
10
7
|
def __init__(self):
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
armodel/models/M2/__init__.py
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
from . import *
|
armodel/models/__init__.py
CHANGED
|
@@ -1,7 +1,50 @@
|
|
|
1
|
-
from .
|
|
1
|
+
from .M2.MSR.AsamHdo import *
|
|
2
|
+
from .M2.MSR.AsamHdo.AdminData import *
|
|
3
|
+
from .M2.MSR.AsamHdo.BaseTypes import *
|
|
4
|
+
from .M2.MSR.AsamHdo.ComputationMethod import *
|
|
5
|
+
from .M2.MSR.AsamHdo.SpecialData import *
|
|
6
|
+
from .M2.MSR.AsamHdo.Units import *
|
|
7
|
+
from .M2.MSR.AsamHdo.Constraints.GlobalConstraints import *
|
|
2
8
|
from .M2.MSR.DataDictionary import *
|
|
3
9
|
from .M2.MSR.Documentation import *
|
|
4
|
-
from .M2.MSR.
|
|
10
|
+
from .M2.MSR.Documentation.Annotation import *
|
|
11
|
+
from .M2.MSR.Documentation.BlockElements import *
|
|
12
|
+
from .M2.MSR.Documentation.TextModel import *
|
|
13
|
+
from .M2.MSR.Documentation.TextModel.LanguageDataModel import *
|
|
14
|
+
from .M2.MSR.Documentation.TextModel.MultilanguageData import *
|
|
5
15
|
from .M2.AUTOSARTemplates.AutosarTopLevelStructure import *
|
|
16
|
+
from .M2.AUTOSARTemplates.BswModuleTemplate import *
|
|
17
|
+
from .M2.AUTOSARTemplates.BswModuleTemplate.BswBehavior import *
|
|
18
|
+
from .M2.AUTOSARTemplates.BswModuleTemplate.BswImplementation import *
|
|
19
|
+
from .M2.AUTOSARTemplates.BswModuleTemplate.BswInterfaces import *
|
|
20
|
+
from .M2.AUTOSARTemplates.BswModuleTemplate.BswOverview import *
|
|
6
21
|
from .M2.AUTOSARTemplates.CommonStructure import *
|
|
7
|
-
from .M2.AUTOSARTemplates.
|
|
22
|
+
from .M2.AUTOSARTemplates.CommonStructure.Implementation import *
|
|
23
|
+
from .M2.AUTOSARTemplates.CommonStructure.ImplementationDataTypes import *
|
|
24
|
+
from .M2.AUTOSARTemplates.CommonStructure.InternalBehavior import *
|
|
25
|
+
from .M2.AUTOSARTemplates.CommonStructure.ModeDeclaration import *
|
|
26
|
+
from .M2.AUTOSARTemplates.CommonStructure.ServiceNeeds import *
|
|
27
|
+
from .M2.AUTOSARTemplates.CommonStructure.SwcBswMapping import *
|
|
28
|
+
from .M2.AUTOSARTemplates.CommonStructure.TriggerDeclaration import *
|
|
29
|
+
from .M2.AUTOSARTemplates.SWComponentTemplate import *
|
|
30
|
+
from .M2.AUTOSARTemplates.SWComponentTemplate.Communication import *
|
|
31
|
+
from .M2.AUTOSARTemplates.SWComponentTemplate.Components import *
|
|
32
|
+
from .M2.AUTOSARTemplates.SWComponentTemplate.Composition import *
|
|
33
|
+
from .M2.AUTOSARTemplates.SWComponentTemplate.EndToEndProtection import *
|
|
34
|
+
from .M2.AUTOSARTemplates.SWComponentTemplate.RPTScenario import *
|
|
35
|
+
from .M2.AUTOSARTemplates.SWComponentTemplate.SwcImplementation import *
|
|
36
|
+
from .M2.AUTOSARTemplates.SWComponentTemplate.SwcInternalBehavior.DataElements import *
|
|
37
|
+
from .M2.AUTOSARTemplates.SWComponentTemplate.SwcInternalBehavior.AccessCount import *
|
|
38
|
+
from .M2.AUTOSARTemplates.SWComponentTemplate.SwcInternalBehavior.IncludedDataTypes import *
|
|
39
|
+
from .M2.AUTOSARTemplates.SWComponentTemplate.SwcInternalBehavior.InstanceRefsUsage import *
|
|
40
|
+
from .M2.AUTOSARTemplates.SWComponentTemplate.SwcInternalBehavior.ModeDeclarationGroup import *
|
|
41
|
+
from .M2.AUTOSARTemplates.SWComponentTemplate.SwcInternalBehavior.PerInstanceMemory import *
|
|
42
|
+
from .M2.AUTOSARTemplates.SWComponentTemplate.SwcInternalBehavior.ServerCall import *
|
|
43
|
+
from .M2.AUTOSARTemplates.SWComponentTemplate.SwcInternalBehavior.ServiceMapping import *
|
|
44
|
+
from .M2.AUTOSARTemplates.SWComponentTemplate.SwcInternalBehavior.Trigger import *
|
|
45
|
+
from .M2.AUTOSARTemplates.SystemTemplate.Fibex.Fibex4Can.CanCommunication import *
|
|
46
|
+
from .M2.AUTOSARTemplates.SystemTemplate.Fibex.Fibex4Lin.LinCommunication import *
|
|
47
|
+
from .M2.AUTOSARTemplates.SystemTemplate.Fibex.Fibex4Ethernet.EthernetFrame import *
|
|
48
|
+
from .M2.AUTOSARTemplates.SystemTemplate.Fibex.Fibex4Ethernet.ServiceInstances import *
|
|
49
|
+
from .M2.AUTOSARTemplates.SystemTemplate.Fibex.FibexCore.CoreCommunication import *
|
|
50
|
+
from .M2.AUTOSARTemplates.SystemTemplate.Fibex.FibexCore.CoreTopology import *
|
armodel/parser/arxml_parser.py
CHANGED
|
@@ -2,21 +2,29 @@ from typing import List
|
|
|
2
2
|
import xml.etree.ElementTree as ET
|
|
3
3
|
import os
|
|
4
4
|
|
|
5
|
-
from ..models.M2.MSR.DataDictionary.RecordLayout import SwRecordLayoutGroupContent, SwRecordLayoutV
|
|
6
|
-
|
|
7
|
-
|
|
8
5
|
from ..models.M2.MSR.AsamHdo.Constraints.GlobalConstraints import DataConstrRule, InternalConstrs, PhysConstrs
|
|
9
|
-
from ..models.M2.MSR.DataDictionary.CalibrationParameter import SwCalprmAxis
|
|
10
|
-
from ..models.M2.MSR.DataDictionary.Axis import SwAxisGrouped, SwAxisIndividual
|
|
11
|
-
from ..models.M2.MSR.CalibrationData.CalibrationValue import SwValues
|
|
12
6
|
from ..models.M2.MSR.AsamHdo.BaseTypes import BaseTypeDirectDefinition
|
|
13
7
|
from ..models.M2.MSR.AsamHdo.SpecialData import Sdg
|
|
14
8
|
from ..models.M2.MSR.AsamHdo.AdminData import AdminData
|
|
15
9
|
from ..models.M2.MSR.AsamHdo.ComputationMethod import Compu, CompuConst, CompuConstTextContent, CompuNominatorDenominator, CompuRationalCoeffs, CompuScale, CompuScaleConstantContents, CompuScaleRationalFormula, CompuScales
|
|
10
|
+
from ..models.M2.MSR.CalibrationData.CalibrationValue import SwValues
|
|
11
|
+
from ..models.M2.MSR.DataDictionary.DataDefProperties import SwDataDefProps, SwPointerTargetProps
|
|
12
|
+
from ..models.M2.MSR.DataDictionary.CalibrationParameter import SwCalprmAxis
|
|
13
|
+
from ..models.M2.MSR.DataDictionary.Axis import SwAxisGrouped, SwAxisIndividual
|
|
14
|
+
from ..models.M2.MSR.DataDictionary.RecordLayout import SwRecordLayoutGroupContent, SwRecordLayoutV
|
|
15
|
+
from ..models.M2.MSR.DataDictionary.DataDefProperties import ValueList
|
|
16
|
+
from ..models.M2.MSR.DataDictionary.RecordLayout import SwRecordLayoutGroup
|
|
17
|
+
from ..models.M2.MSR.DataDictionary.CalibrationParameter import SwCalprmAxisSet
|
|
18
|
+
from ..models.M2.MSR.Documentation.TextModel.LanguageDataModel import LLongName
|
|
19
|
+
from ..models.M2.MSR.Documentation.BlockElements import DocumentationBlock
|
|
16
20
|
from ..models.M2.MSR.Documentation.TextModel.LanguageDataModel import LOverviewParagraph
|
|
17
21
|
from ..models.M2.MSR.Documentation.TextModel.MultilanguageData import MultiLanguageOverviewParagraph, MultiLanguageParagraph, MultilanguageLongName
|
|
18
22
|
from ..models.M2.MSR.Documentation.Annotation import GeneralAnnotation
|
|
19
23
|
|
|
24
|
+
from ..models.M2.AUTOSARTemplates.CommonStructure import SwcInternalBehavior
|
|
25
|
+
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.SwcInternalBehavior.PortAPIOptions import PortAPIOption, PortDefinedArgumentValue
|
|
26
|
+
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.SwcInternalBehavior.RTEEvents import DataReceivedEvent, OperationInvokedEvent, RTEEvent, SwcModeSwitchEvent
|
|
27
|
+
from ..models.M2.AUTOSARTemplates.CommonStructure.Timing.TimingConstraint.ExecutionOrderConstraint import ExecutionOrderConstraint
|
|
20
28
|
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.Datatype.Datatypes import ApplicationCompositeDataType, ApplicationDataType, AutosarDataType, DataTypeMap, DataTypeMappingSet
|
|
21
29
|
from ..models.M2.AUTOSARTemplates.CommonStructure.Implementation import Code
|
|
22
30
|
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.EndToEndProtection import EndToEndDescription, EndToEndProtection, EndToEndProtectionVariablePrototype
|
|
@@ -34,50 +42,43 @@ from ..models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Primit
|
|
|
34
42
|
from ..models.M2.AUTOSARTemplates.CommonStructure.Implementation import ImplementationProps
|
|
35
43
|
from ..models.M2.AUTOSARTemplates.CommonStructure import ApplicationValueSpecification, ArrayValueSpecification, ConstantReference, NumericalValueSpecification, RecordValueSpecification, TextValueSpecification, ValueSpecification
|
|
36
44
|
from ..models.M2.AUTOSARTemplates.GenericStructure.AbstractStructure import AnyInstanceRef
|
|
37
|
-
from ..models.M2.AUTOSARTemplates.CommonStructure.ImplementationDataTypes import ImplementationDataTypeElement
|
|
45
|
+
from ..models.M2.AUTOSARTemplates.CommonStructure.ImplementationDataTypes import ImplementationDataType, ImplementationDataTypeElement
|
|
38
46
|
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.Composition.InstanceRefs import POperationInAtomicSwcInstanceRef, PPortInCompositionInstanceRef, ROperationInAtomicSwcInstanceRef, RPortInCompositionInstanceRef
|
|
39
|
-
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.
|
|
47
|
+
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.PortInterface.InstanceRefs import ApplicationCompositeElementInPortInterfaceInstanceRef
|
|
40
48
|
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.SwcInternalBehavior.InstanceRefsUsage import AutosarParameterRef, AutosarVariableRef, VariableInAtomicSWCTypeInstanceRef
|
|
41
49
|
from ..models.M2.AUTOSARTemplates.SystemTemplate.InstanceRefs import VariableDataPrototypeInSystemInstanceRef
|
|
42
|
-
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.Components.InstanceRefs import InnerPortGroupInCompositionInstanceRef, PModeGroupInAtomicSwcInstanceRef, RModeGroupInAtomicSWCInstanceRef
|
|
43
|
-
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.SwcInternalBehavior import RunnableEntityArgument
|
|
44
|
-
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.Components import PortGroup, SwComponentType, SymbolProps, PPortPrototype, RPortPrototype
|
|
45
|
-
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.Composition import AssemblySwConnector,
|
|
50
|
+
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.Components.InstanceRefs import InnerPortGroupInCompositionInstanceRef, PModeGroupInAtomicSwcInstanceRef, RModeGroupInAtomicSWCInstanceRef, RModeInAtomicSwcInstanceRef, RVariableInAtomicSwcInstanceRef
|
|
51
|
+
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.SwcInternalBehavior import RunnableEntity, RunnableEntityArgument
|
|
52
|
+
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.Components import CompositionSwComponentType, PortGroup, SwComponentType, SymbolProps, PPortPrototype, RPortPrototype
|
|
53
|
+
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.Composition import AssemblySwConnector, DelegationSwConnector
|
|
46
54
|
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.SwcInternalBehavior.ModeDeclarationGroup import ModeAccessPoint
|
|
47
55
|
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.SwcInternalBehavior.ServerCall import ServerCallPoint
|
|
48
56
|
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.Communication import ClientComSpec, ModeSwitchReceiverComSpec, ModeSwitchSenderComSpec, NonqueuedReceiverComSpec, NonqueuedSenderComSpec, ParameterRequireComSpec, QueuedReceiverComSpec, QueuedSenderComSpec, ReceiverComSpec, SenderComSpec, ServerComSpec
|
|
49
|
-
|
|
50
|
-
from ..models.
|
|
51
|
-
from ..models.
|
|
52
|
-
from ..models.M2.
|
|
53
|
-
from ..models.M2.
|
|
57
|
+
from ..models.M2.AUTOSARTemplates.SystemTemplate.Fibex.Fibex4Lin.LinCommunication import LinFrameTriggering
|
|
58
|
+
from ..models.M2.AUTOSARTemplates.SystemTemplate.Fibex.FibexCore.CoreTopology import AbstractCanCluster, CanPhysicalChannel, CommunicationCluster, LinPhysicalChannel, PhysicalChannel
|
|
59
|
+
from ..models.M2.AUTOSARTemplates.SystemTemplate.Fibex.Fibex4Can.CanCommunication import CanFrameTriggering, RxIdentifierRange
|
|
60
|
+
from ..models.M2.AUTOSARTemplates.SystemTemplate.Fibex.Fibex4Multiplatform import ISignalMapping
|
|
61
|
+
from ..models.M2.AUTOSARTemplates.SystemTemplate.Fibex.FibexCore.CoreCommunication import Frame, FrameTriggering, IPdu, ISignalIPdu, ISignalTriggering, PduTriggering
|
|
54
62
|
from ..models.M2.AUTOSARTemplates.SystemTemplate import System, SystemMapping
|
|
55
|
-
from ..models.M2.AUTOSARTemplates.SystemTemplate.
|
|
56
|
-
from ..models.M2.AUTOSARTemplates.SystemTemplate.
|
|
57
|
-
from ..models.
|
|
58
|
-
from ..models.M2.AUTOSARTemplates.ecuc_description_template import EcucAbstractReferenceValue, EcucContainerValue, EcucInstanceReferenceValue, EcucModuleConfigurationValues, EcucNumericalParamValue, EcucParameterValue, EcucReferenceValue, EcucTextualParamValue, EcucValueCollection
|
|
63
|
+
from ..models.M2.AUTOSARTemplates.SystemTemplate.DataMapping import SenderReceiverToSignalGroupMapping, SenderReceiverToSignalMapping
|
|
64
|
+
from ..models.M2.AUTOSARTemplates.SystemTemplate.NetworkManagement import CanNmCluster, CanNmClusterCoupling, CanNmNode, NmCluster, NmConfig, NmNode
|
|
65
|
+
from ..models.M2.AUTOSARTemplates.ECUCDescriptionTemplate import EcucAbstractReferenceValue, EcucContainerValue, EcucInstanceReferenceValue, EcucModuleConfigurationValues, EcucNumericalParamValue, EcucParameterValue, EcucReferenceValue, EcucTextualParamValue, EcucValueCollection
|
|
59
66
|
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.Communication import CompositeNetworkRepresentation, TransmissionAcknowledgementRequest
|
|
60
|
-
from ..models.fibex.fibex_4_multiplatform import ISignalMapping
|
|
61
|
-
from ..models.fibex.fibex_core.core_communication import Frame, FrameTriggering, IPdu, ISignalIPdu, ISignalTriggering, PduTriggering
|
|
62
67
|
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.SwcInternalBehavior.IncludedDataTypes import IncludedDataTypeSet
|
|
63
|
-
from ..models.
|
|
68
|
+
from ..models.M2.AUTOSARTemplates.CommonStructure.Timing.TimingConstraint.TimingExtensions import TimingExtension
|
|
64
69
|
from ..models.M2.AUTOSARTemplates.BswModuleTemplate.BswBehavior import BswModeSenderPolicy
|
|
65
|
-
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.
|
|
70
|
+
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.PortInterface import ArgumentDataPrototype, ClientServerInterface, ClientServerOperation, InvalidationPolicy, ModeSwitchInterface, ParameterInterface, PortInterface, SenderReceiverInterface
|
|
66
71
|
from ..models.M2.AUTOSARTemplates.CommonStructure.ModeDeclaration import ModeDeclarationGroupPrototype
|
|
67
72
|
from ..models.M2.AUTOSARTemplates.BswModuleTemplate.BswImplementation import BswImplementation
|
|
68
73
|
from ..models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import MultilanguageReferrable
|
|
69
|
-
from ..models.M2.MSR.Documentation.TextModel.LanguageDataModel import LLongName
|
|
70
|
-
from ..models.M2.MSR.DataDictionary.DataDefProperties import ValueList
|
|
71
|
-
from ..models.M2.MSR.DataDictionary.RecordLayout import SwRecordLayoutGroup
|
|
72
74
|
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.Datatype.Datatypes import ApplicationArrayDataType
|
|
73
|
-
from ..models.M2.MSR.DataDictionary.CalibrationParameter import SwCalprmAxisSet
|
|
74
75
|
|
|
75
76
|
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.EndToEndProtection import EndToEndProtectionSet
|
|
76
|
-
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.SwcInternalBehavior.ServiceMapping import RoleBasedPortAssignment
|
|
77
|
+
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.SwcInternalBehavior.ServiceMapping import RoleBasedPortAssignment, SwcServiceDependency
|
|
77
78
|
from ..models.M2.AUTOSARTemplates.AutosarTopLevelStructure import AUTOSAR
|
|
78
79
|
from ..models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARLiteral
|
|
79
|
-
from ..models.M2.AUTOSARTemplates.CommonStructure.ServiceNeeds import RoleBasedDataAssignment
|
|
80
|
-
from ..models.
|
|
80
|
+
from ..models.M2.AUTOSARTemplates.CommonStructure.ServiceNeeds import RoleBasedDataAssignment, ServiceDependency
|
|
81
|
+
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.Components import AtomicSwComponentType
|
|
81
82
|
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.Datatype.DataPrototypes import ApplicationCompositeElementDataPrototype, AutosarDataPrototype, DataPrototype, ParameterDataPrototype, VariableDataPrototype
|
|
82
83
|
from ..models.M2.AUTOSARTemplates.CommonStructure.Implementation import Implementation
|
|
83
84
|
from ..models.M2.MSR.Documentation.Annotation import Annotation
|
|
@@ -85,10 +86,6 @@ from ..models.M2.MSR.AsamHdo.Constraints.GlobalConstraints import DataConstr
|
|
|
85
86
|
from ..models.M2.MSR.AsamHdo.SpecialData import Sd
|
|
86
87
|
from ..models.M2.MSR.AsamHdo.ComputationMethod import CompuMethod
|
|
87
88
|
from ..models.M2.MSR.CalibrationData.CalibrationValue import SwValueCont
|
|
88
|
-
|
|
89
|
-
from ..models import SwcInternalBehavior, RunnableEntity, RTEEvent, OperationInvokedEvent, DataReceivedEvent, RVariableInAtomicSwcInstanceRef
|
|
90
|
-
from ..models import SwcModeSwitchEvent, RModeInAtomicSwcInstanceRef
|
|
91
|
-
from ..models import ImplementationDataType
|
|
92
89
|
from ..models.M2.AUTOSARTemplates.CommonStructure.InternalBehavior import InternalBehavior
|
|
93
90
|
from ..models.M2.AUTOSARTemplates.BswModuleTemplate.BswOverview import BswModuleDescription
|
|
94
91
|
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.Datatype.Datatypes import ApplicationRecordDataType
|
|
@@ -598,12 +595,12 @@ class ARXMLParser(AbstractARXMLParser):
|
|
|
598
595
|
def readImplementation(self, element: ET.Element, impl: Implementation):
|
|
599
596
|
self.readIdentifiable(element, impl)
|
|
600
597
|
self.readCodeDescriptor(element, impl)
|
|
601
|
-
impl.
|
|
598
|
+
impl.programmingLanguage = self.getChildElementOptionalLiteral(element, "PROGRAMMING-LANGUAGE")
|
|
602
599
|
self.readResourceConsumption(element, impl)
|
|
603
|
-
impl.
|
|
604
|
-
impl.
|
|
605
|
-
impl.
|
|
606
|
-
impl.
|
|
600
|
+
impl.swVersion = self.getChildElementOptionalLiteral(element, "SW-VERSION")
|
|
601
|
+
impl.swcBswMappingRef = self.getChildElementOptionalRefType(element, "SWC-BSW-MAPPING-REF")
|
|
602
|
+
impl.usedCodeGenerator = self.getChildElementOptionalLiteral(element, "USED-CODE-GENERATOR")
|
|
603
|
+
impl.vendorId = self.getChildElementOptionalNumericalValue(element, "VENDOR-ID")
|
|
607
604
|
|
|
608
605
|
def readBswImplementationVendorSpecificModuleDefRefs(self, element: ET.Element, parent: BswImplementation):
|
|
609
606
|
child_element = element.find("./xmlns:VENDOR-SPECIFIC-MODULE-DEF-REFS", self.nsmap)
|
|
@@ -616,8 +613,8 @@ class ARXMLParser(AbstractARXMLParser):
|
|
|
616
613
|
impl = parent.createBswImplementation(short_name)
|
|
617
614
|
self.logger.debug("readBswImplementation %s" % impl.getShortName())
|
|
618
615
|
self.readImplementation(element, impl)
|
|
619
|
-
impl.
|
|
620
|
-
|
|
616
|
+
impl.setArReleaseVersion(self.getChildElementOptionalLiteral(element, "AR-RELEASE-VERSION")) \
|
|
617
|
+
.setBehaviorRef(self.getChildElementOptionalRefType(element, "BEHAVIOR-REF"))
|
|
621
618
|
self.readBswImplementationVendorSpecificModuleDefRefs(element, impl)
|
|
622
619
|
|
|
623
620
|
def readSwcImplementation(self, element: ET.Element, parent: ARPackage):
|
|
@@ -625,7 +622,7 @@ class ARXMLParser(AbstractARXMLParser):
|
|
|
625
622
|
impl = parent.createSwcImplementation(short_name)
|
|
626
623
|
self.logger.debug("readSwcImplementation %s" % impl.getShortName())
|
|
627
624
|
self.readImplementation(element, impl)
|
|
628
|
-
impl.
|
|
625
|
+
impl.behaviorRef = self.getChildElementOptionalRefType(element, "BEHAVIOR-REF")
|
|
629
626
|
|
|
630
627
|
def readDataReceivePointByArguments(self, element, parent: RunnableEntity):
|
|
631
628
|
self._readVariableAccesses(element, parent, "DATA-RECEIVE-POINT-BY-ARGUMENTS")
|
|
@@ -807,7 +804,7 @@ class ARXMLParser(AbstractARXMLParser):
|
|
|
807
804
|
|
|
808
805
|
def readRTEEvent(self, element: ET.Element, event: RTEEvent):
|
|
809
806
|
self.readIdentifiable(element, event)
|
|
810
|
-
event.
|
|
807
|
+
event.startOnEventRef = self.getChildElementOptionalRefType(element, "START-ON-EVENT-REF")
|
|
811
808
|
for child_element in element.findall("./xmlns:DISABLED-MODE-IREFS/xmlns:DISABLED-MODE-IREF", self.nsmap):
|
|
812
809
|
iref = self.getRModeInAtomicSwcInstanceRef(child_element)
|
|
813
810
|
event.addDisabledModeIRef(iref)
|
|
@@ -815,9 +812,9 @@ class ARXMLParser(AbstractARXMLParser):
|
|
|
815
812
|
def readOperationIRef(self, element: ET.Element, parent: OperationInvokedEvent):
|
|
816
813
|
child_element = element.find("./xmlns:OPERATION-IREF", self.nsmap)
|
|
817
814
|
if (child_element is not None):
|
|
818
|
-
parent.
|
|
819
|
-
parent.
|
|
820
|
-
parent.
|
|
815
|
+
parent.operationIRef = POperationInAtomicSwcInstanceRef()
|
|
816
|
+
parent.operationIRef.context_p_port_ref = self.getChildElementRefType(parent.getShortName(), child_element, "CONTEXT-P-PORT-REF")
|
|
817
|
+
parent.operationIRef.target_provided_operation_ref = self.getChildElementRefType(parent.getShortName(), child_element, "TARGET-PROVIDED-OPERATION-REF")
|
|
821
818
|
|
|
822
819
|
def readOperationInvokedEvent(self, element: ET.Element, parent: SwcInternalBehavior):
|
|
823
820
|
short_name = self.getShortName(element)
|
|
@@ -865,15 +862,15 @@ class ARXMLParser(AbstractARXMLParser):
|
|
|
865
862
|
child_element = element.find("./xmlns:VALUE/*", self.nsmap)
|
|
866
863
|
if child_element is not None:
|
|
867
864
|
argument_value.value = self.getValueSpecification(child_element)
|
|
868
|
-
argument_value.
|
|
865
|
+
argument_value.valueTypeTRef = self.getChildElementOptionalRefType(element, "VALUE-TYPE-TREF")
|
|
869
866
|
return argument_value
|
|
870
867
|
|
|
871
868
|
def readPortAPIOptions(self, element: ET.Element, behavior: SwcInternalBehavior):
|
|
872
869
|
for child_element in element.findall("./xmlns:PORT-API-OPTIONS/xmlns:PORT-API-OPTION", self.nsmap):
|
|
873
870
|
option = PortAPIOption()
|
|
874
|
-
option.
|
|
875
|
-
option.
|
|
876
|
-
option.
|
|
871
|
+
option.enableTakeAddress = self.getChildElementOptionalBooleanValue(child_element, "ENABLE-TAKE-ADDRESS")
|
|
872
|
+
option.indirectAPI = self.getChildElementOptionalBooleanValue(child_element, "INDIRECT-API")
|
|
873
|
+
option.portRef = self.getChildElementOptionalRefType(child_element, "PORT-REF")
|
|
877
874
|
for argument_value_tag in child_element.findall("./xmlns:PORT-ARG-VALUES/xmlns:PORT-DEFINED-ARGUMENT-VALUE", self.nsmap):
|
|
878
875
|
option.addPortArgValue(self.readPortDefinedArgumentValue(argument_value_tag))
|
|
879
876
|
behavior.addPortAPIOption(option)
|
|
@@ -2643,18 +2640,23 @@ class ARXMLParser(AbstractARXMLParser):
|
|
|
2643
2640
|
self.readSystemMappings(element, system)
|
|
2644
2641
|
|
|
2645
2642
|
def readParameterInterfaceParameters(self, element: ET.Element, parent: ParameterInterface):
|
|
2646
|
-
for child_element in
|
|
2643
|
+
for child_element in self.findall(element, "PARAMETERS/PARAMETER-DATA-PROTOTYPE"):
|
|
2647
2644
|
short_name = self.getShortName(child_element)
|
|
2648
2645
|
prototype = parent.createParameter(short_name)
|
|
2649
2646
|
self.readParameterDataPrototype(child_element, prototype)
|
|
2650
2647
|
|
|
2651
2648
|
def readParameterInterface(self, element: ET.Element, parent: ARPackage):
|
|
2652
2649
|
short_name = self.getShortName(element)
|
|
2653
|
-
self.logger.debug("ParameterInterface %s" % short_name)
|
|
2650
|
+
self.logger.debug("Read ParameterInterface %s" % short_name)
|
|
2654
2651
|
pi_interface = parent.createParameterInterface(short_name)
|
|
2655
2652
|
self.readIdentifiable(element, pi_interface)
|
|
2656
2653
|
self.readParameterInterfaceParameters(element, pi_interface)
|
|
2657
2654
|
|
|
2655
|
+
def readGenericEthernetFrame(self, element: ET.Element, parent: ARPackage):
|
|
2656
|
+
short_name = self.getShortName(element)
|
|
2657
|
+
self.logger.debug("Read EthernetFrame %s" % short_name)
|
|
2658
|
+
frame = parent.createGenericEthernetFrame(short_name)
|
|
2659
|
+
self.readFrame(element, frame)
|
|
2658
2660
|
|
|
2659
2661
|
def readARPackageElements(self, element: ET.Element, parent: ARPackage):
|
|
2660
2662
|
for child_element in self.findall(element, "./ELEMENTS/*"):
|
|
@@ -2767,6 +2769,8 @@ class ARXMLParser(AbstractARXMLParser):
|
|
|
2767
2769
|
self.readPhysicalDimensions(child_element, parent)
|
|
2768
2770
|
elif tag_name == "PARAMETER-INTERFACE":
|
|
2769
2771
|
self.readParameterInterface(child_element, parent)
|
|
2772
|
+
elif tag_name == "ETHERNET-FRAME":
|
|
2773
|
+
self.readGenericEthernetFrame(child_element, parent)
|
|
2770
2774
|
else:
|
|
2771
2775
|
self._raiseError("Unsupported element type of ARPackage <%s>" % tag_name)
|
|
2772
2776
|
|
armodel/parser/file_parser.py
CHANGED
|
@@ -20,7 +20,8 @@ class FileListParser:
|
|
|
20
20
|
try:
|
|
21
21
|
with open(file) as f_in:
|
|
22
22
|
for line in f_in:
|
|
23
|
-
|
|
23
|
+
if not line.startswith('#'):
|
|
24
|
+
self.file_list.append(line.strip())
|
|
24
25
|
except:
|
|
25
26
|
self.logger.error("No such file or directory: %s" % os.path.realpath(file))
|
|
26
27
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.Components import CompositionSwComponentType
|
|
1
2
|
from ..models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ARPackage import ARPackage
|
|
2
3
|
from .excel_report import ExcelReporter
|
|
3
|
-
from ..models import AUTOSAR
|
|
4
|
+
from ..models import AUTOSAR
|
|
4
5
|
from ..models import PPortInCompositionInstanceRef, RPortInCompositionInstanceRef
|
|
5
6
|
from typing import List
|
|
6
7
|
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
1
|
from ....models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARFloat, ARLiteral, ARNumerical
|
|
3
2
|
from ....models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARBoolean
|
|
4
3
|
|
|
5
|
-
|
|
6
4
|
class TestARObject:
|
|
7
5
|
|
|
8
6
|
def test_ARNumerical(self):
|
|
@@ -14,14 +14,14 @@ from ....models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Iden
|
|
|
14
14
|
from ....models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
15
15
|
|
|
16
16
|
from ....models.M2.AUTOSARTemplates.CommonStructure.ImplementationDataTypes import ImplementationDataType
|
|
17
|
-
from ....models.M2.AUTOSARTemplates.SWComponentTemplate.Components import SwComponentType
|
|
17
|
+
from ....models.M2.AUTOSARTemplates.SWComponentTemplate.Components import ApplicationSwComponentType, AtomicSwComponentType, EcuAbstractionSwComponentType, SwComponentType
|
|
18
18
|
from ....models.M2.AUTOSARTemplates.AutosarTopLevelStructure import AUTOSAR
|
|
19
19
|
from ....models.M2.AUTOSARTemplates.SWComponentTemplate.Datatype.Datatypes import DataTypeMappingSet
|
|
20
20
|
from ....models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import ARElement
|
|
21
21
|
from ....models.M2.MSR.AsamHdo.ComputationMethod import CompuMethod
|
|
22
|
-
from ....models.M2.AUTOSARTemplates.SWComponentTemplate.
|
|
23
|
-
from ....models.
|
|
24
|
-
from ....models.M2.AUTOSARTemplates.SWComponentTemplate.
|
|
22
|
+
from ....models.M2.AUTOSARTemplates.SWComponentTemplate.PortInterface import ClientServerInterface, DataInterface, PortInterface, SenderReceiverInterface
|
|
23
|
+
from ....models.M2.AUTOSARTemplates.SWComponentTemplate.Components import ServiceSwComponentType
|
|
24
|
+
from ....models.M2.AUTOSARTemplates.SWComponentTemplate.Components import CompositionSwComponentType
|
|
25
25
|
|
|
26
26
|
class TestAUTOSAR:
|
|
27
27
|
|
|
@@ -46,7 +46,7 @@ class Test_M2_AUTOSARTemplates_SWComponentTemplate_Datatype_DataPrototypes:
|
|
|
46
46
|
assert(isinstance(prototype, MultilanguageReferrable))
|
|
47
47
|
assert(isinstance(prototype, Referrable))
|
|
48
48
|
|
|
49
|
-
assert(prototype.
|
|
49
|
+
assert(prototype.parent == ar_root)
|
|
50
50
|
assert(prototype.short_name == "prototype")
|
|
51
51
|
assert(prototype.typeTRef is None)
|
|
52
52
|
|
|
@@ -40,7 +40,7 @@ class Test_M2_AUTOSARTemplates_CommonStructure_Implementation:
|
|
|
40
40
|
assert(isinstance(prototype, Referrable))
|
|
41
41
|
assert(isinstance(prototype, SymbolProps))
|
|
42
42
|
|
|
43
|
-
assert(prototype.
|
|
43
|
+
assert(prototype.parent == ar_root)
|
|
44
44
|
assert(prototype.short_name == "SymbolProps")
|
|
45
45
|
assert(prototype.symbol == None)
|
|
46
46
|
|
|
@@ -66,7 +66,7 @@ class Test_M2_MSR_AsamHdo_BaseTypes:
|
|
|
66
66
|
assert(isinstance(base_type, Referrable))
|
|
67
67
|
assert(isinstance(base_type, SwBaseType))
|
|
68
68
|
|
|
69
|
-
assert(base_type.
|
|
69
|
+
assert(base_type.parent == ar_root)
|
|
70
70
|
assert(base_type.short_name == "SwBaseType")
|
|
71
71
|
assert(isinstance(base_type.baseTypeDefinition, BaseTypeDirectDefinition))
|
|
72
72
|
|
|
@@ -111,7 +111,7 @@ class Test_M2_AUTOSARTemplates_SWComponentTemplate_Datatype_Datatypes:
|
|
|
111
111
|
assert(isinstance(data_type, Referrable))
|
|
112
112
|
assert(isinstance(data_type, ApplicationPrimitiveDataType))
|
|
113
113
|
|
|
114
|
-
assert(data_type.
|
|
114
|
+
assert(data_type.parent == ar_root)
|
|
115
115
|
assert(data_type.short_name == "ApplicationPrimitiveDataType")
|
|
116
116
|
assert(data_type.swDataDefProps == None)
|
|
117
117
|
|
|
@@ -142,7 +142,7 @@ class Test_M2_AUTOSARTemplates_SWComponentTemplate_Datatype_Datatypes:
|
|
|
142
142
|
assert(isinstance(data_type, Referrable))
|
|
143
143
|
assert(isinstance(data_type, ApplicationArrayDataType))
|
|
144
144
|
|
|
145
|
-
assert(data_type.
|
|
145
|
+
assert(data_type.parent == ar_root)
|
|
146
146
|
assert(data_type.short_name == "ApplicationArrayDataType")
|
|
147
147
|
assert(data_type.dynamic_array_size_profile == None)
|
|
148
148
|
assert(data_type.element == None)
|
|
@@ -167,7 +167,7 @@ class Test_M2_AUTOSARTemplates_SWComponentTemplate_Datatype_Datatypes:
|
|
|
167
167
|
assert(isinstance(data_type, Referrable))
|
|
168
168
|
assert(isinstance(data_type, ApplicationRecordDataType))
|
|
169
169
|
|
|
170
|
-
assert(data_type.
|
|
170
|
+
assert(data_type.parent == ar_root)
|
|
171
171
|
assert(data_type.short_name == "ApplicationRecordDataType")
|
|
172
172
|
|
|
173
173
|
element = data_type.createApplicationRecordElement("element")
|
|
@@ -199,7 +199,7 @@ class Test_M2_AUTOSARTemplates_SWComponentTemplate_Datatype_Datatypes:
|
|
|
199
199
|
assert(isinstance(data_type_mapping_set, Referrable))
|
|
200
200
|
assert(isinstance(data_type_mapping_set, DataTypeMappingSet))
|
|
201
201
|
|
|
202
|
-
assert(data_type_mapping_set.
|
|
202
|
+
assert(data_type_mapping_set.parent == ar_root)
|
|
203
203
|
assert(data_type_mapping_set.short_name == "DataTypeMappingSet")
|
|
204
204
|
assert(len(data_type_mapping_set._dataTypeMaps) == 0)
|
|
205
205
|
|
|
@@ -238,7 +238,7 @@ class Test_M2_AUTOSARTemplates_CommonStructure_ImplementationDataTypes:
|
|
|
238
238
|
assert(isinstance(data_type, Referrable))
|
|
239
239
|
assert(isinstance(data_type, ImplementationDataType))
|
|
240
240
|
|
|
241
|
-
assert(data_type.
|
|
241
|
+
assert(data_type.parent == ar_root)
|
|
242
242
|
assert(data_type.short_name == "ImplementationDataType")
|
|
243
243
|
assert(data_type.subElements == [])
|
|
244
244
|
assert(data_type.symbolProps == None)
|
|
@@ -15,7 +15,7 @@ from ....models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Prim
|
|
|
15
15
|
from ....models.M2.AUTOSARTemplates.SWComponentTemplate.Datatype.DataPrototypes import AtpPrototype, AutosarDataPrototype, DataPrototype, VariableDataPrototype
|
|
16
16
|
from ....models.M2.AUTOSARTemplates.GenericStructure.AbstractStructure import AtpType
|
|
17
17
|
from ....models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import ARElement
|
|
18
|
-
from ....models.M2.AUTOSARTemplates.SWComponentTemplate.
|
|
18
|
+
from ....models.M2.AUTOSARTemplates.SWComponentTemplate.PortInterface import ApplicationError, ArgumentDataPrototype, ClientServerInterface, ClientServerOperation, DataInterface, NvDataInterface, ParameterInterface, PortInterface, SenderReceiverInterface
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
class Test_M2_AUTOSARTemplates_SWComponentTemplate_PortInterface:
|
|
@@ -50,7 +50,7 @@ class Test_M2_AUTOSARTemplates_SWComponentTemplate_PortInterface:
|
|
|
50
50
|
assert(isinstance(data_if, Referrable))
|
|
51
51
|
assert(isinstance(data_if, NvDataInterface))
|
|
52
52
|
|
|
53
|
-
assert(data_if.
|
|
53
|
+
assert(data_if.parent == ar_root)
|
|
54
54
|
assert(data_if.short_name == "NvDataInterface")
|
|
55
55
|
|
|
56
56
|
def test_ParameterInterface(self):
|
|
@@ -73,7 +73,7 @@ class Test_M2_AUTOSARTemplates_SWComponentTemplate_PortInterface:
|
|
|
73
73
|
assert(isinstance(data_if, Referrable))
|
|
74
74
|
assert(isinstance(data_if, ParameterInterface))
|
|
75
75
|
|
|
76
|
-
assert(data_if.
|
|
76
|
+
assert(data_if.parent == ar_root)
|
|
77
77
|
assert(data_if.short_name == "ParameterInterface")
|
|
78
78
|
|
|
79
79
|
def test_SenderReceiverInterface(self):
|
|
@@ -97,7 +97,7 @@ class Test_M2_AUTOSARTemplates_SWComponentTemplate_PortInterface:
|
|
|
97
97
|
assert(isinstance(sr_if, SenderReceiverInterface))
|
|
98
98
|
|
|
99
99
|
assert(sr_if.short_name == "sr_if")
|
|
100
|
-
assert(sr_if.
|
|
100
|
+
assert(sr_if.parent == ar_root)
|
|
101
101
|
assert(len(sr_if.getDataElements()) == 0)
|
|
102
102
|
|
|
103
103
|
element = sr_if.createDataElement("element")
|
|
@@ -127,7 +127,7 @@ class Test_M2_AUTOSARTemplates_SWComponentTemplate_PortInterface:
|
|
|
127
127
|
assert(isinstance(prototype, Referrable))
|
|
128
128
|
assert(isinstance(prototype, ArgumentDataPrototype))
|
|
129
129
|
|
|
130
|
-
assert(prototype.
|
|
130
|
+
assert(prototype.parent == ar_root)
|
|
131
131
|
assert(prototype.short_name == "ArgumentDataPrototype")
|
|
132
132
|
assert(prototype.direction == "")
|
|
133
133
|
assert(prototype.server_argument_impl_policy == "")
|
|
@@ -143,7 +143,7 @@ class Test_M2_AUTOSARTemplates_SWComponentTemplate_PortInterface:
|
|
|
143
143
|
assert(isinstance(app_error, Referrable))
|
|
144
144
|
assert(isinstance(app_error, ApplicationError))
|
|
145
145
|
|
|
146
|
-
assert(app_error.
|
|
146
|
+
assert(app_error.parent == ar_root)
|
|
147
147
|
assert(app_error.short_name == "ApplicationError")
|
|
148
148
|
|
|
149
149
|
def test_ClientServerOperation(self):
|