armodel 1.7.8__py3-none-any.whl → 1.7.9__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/models/M2/AUTOSARTemplates/AutosarTopLevelStructure.py +21 -0
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswBehavior.py +102 -12
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswInterfaces.py +80 -9
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswOverview.py +17 -10
- armodel/models/M2/AUTOSARTemplates/CommonStructure/Implementation.py +10 -8
- armodel/models/M2/AUTOSARTemplates/CommonStructure/InternalBehavior.py +7 -5
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ModeDeclaration.py +38 -3
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ServiceNeeds.py +91 -18
- armodel/models/M2/AUTOSARTemplates/CommonStructure/StandardizationTemplate/BlueprintDedicated/PortPrototypeBlueprint.py +73 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/StandardizationTemplate/BlueprintDedicated/__init__.py +0 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/StandardizationTemplate/Keyword.py +45 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/StandardizationTemplate/__init__.py +0 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/TriggerDeclaration.py +27 -0
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ARPackage.py +33 -4
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ElementCollection.py +73 -0
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/PrimitiveTypes.py +35 -14
- armodel/models/M2/AUTOSARTemplates/GenericStructure/LifeCycles.py +151 -1
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Components/__init__.py +4 -1
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/PortInterface/__init__.py +55 -12
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SoftwareComponentDocumentation.py +80 -0
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/RTEEvents.py +11 -1
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ServiceMapping.py +16 -2
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Ethernet/EthernetTopology.py +18 -6
- armodel/models/M2/MSR/DataDictionary/DataDefProperties.py +10 -1
- armodel/models/M2/MSR/Documentation/BlockElements/Figure.py +163 -0
- armodel/models/M2/MSR/Documentation/BlockElements/__init__.py +0 -0
- armodel/models/M2/MSR/Documentation/TextModel/BlockElements/ListElements.py +5 -3
- armodel/models/M2/MSR/Documentation/TextModel/BlockElements/PaginationAndView.py +22 -1
- armodel/models/M2/MSR/Documentation/TextModel/BlockElements/__init__.py +94 -9
- armodel/models/__init__.py +2 -0
- armodel/parser/abstract_arxml_parser.py +5 -2
- armodel/parser/arxml_parser.py +255 -38
- armodel/tests/test_armodel/parser/test_sw_components.py +266 -4
- armodel/writer/arxml_writer.py +310 -57
- {armodel-1.7.8.dist-info → armodel-1.7.9.dist-info}/METADATA +21 -1
- {armodel-1.7.8.dist-info → armodel-1.7.9.dist-info}/RECORD +40 -33
- {armodel-1.7.8.dist-info → armodel-1.7.9.dist-info}/LICENSE +0 -0
- {armodel-1.7.8.dist-info → armodel-1.7.9.dist-info}/WHEEL +0 -0
- {armodel-1.7.8.dist-info → armodel-1.7.9.dist-info}/entry_points.txt +0 -0
- {armodel-1.7.8.dist-info → armodel-1.7.9.dist-info}/top_level.txt +0 -0
armodel/parser/arxml_parser.py
CHANGED
|
@@ -2,6 +2,8 @@ from typing import List
|
|
|
2
2
|
import xml.etree.ElementTree as ET
|
|
3
3
|
import os
|
|
4
4
|
|
|
5
|
+
from armodel.models.M2.MSR.Documentation.TextModel.BlockElements.PaginationAndView import DocumentViewSelectable, Paginateable
|
|
6
|
+
|
|
5
7
|
from ..models.M2.MSR.AsamHdo.AdminData import AdminData
|
|
6
8
|
from ..models.M2.MSR.AsamHdo.BaseTypes import BaseTypeDirectDefinition, SwBaseType
|
|
7
9
|
from ..models.M2.MSR.AsamHdo.Constraints.GlobalConstraints import DataConstrRule, InternalConstrs, PhysConstrs, DataConstr
|
|
@@ -21,20 +23,22 @@ from ..models.M2.MSR.DataDictionary.RecordLayout import SwRecordLayoutGroup
|
|
|
21
23
|
from ..models.M2.MSR.DataDictionary.CalibrationParameter import SwCalprmAxisSet
|
|
22
24
|
from ..models.M2.MSR.DataDictionary.ServiceProcessTask import SwServiceArg
|
|
23
25
|
from ..models.M2.MSR.Documentation.Annotation import Annotation, GeneralAnnotation
|
|
26
|
+
from ..models.M2.MSR.Documentation.BlockElements.Figure import Graphic, LGraphic, MlFigure
|
|
24
27
|
from ..models.M2.MSR.Documentation.TextModel.BlockElements import DocumentationBlock
|
|
25
|
-
from ..models.M2.MSR.Documentation.TextModel.BlockElements.ListElements import
|
|
28
|
+
from ..models.M2.MSR.Documentation.TextModel.BlockElements.ListElements import ARList
|
|
26
29
|
from ..models.M2.MSR.Documentation.TextModel.LanguageDataModel import LLongName, LOverviewParagraph, LParagraph, LanguageSpecific
|
|
27
30
|
from ..models.M2.MSR.Documentation.TextModel.MultilanguageData import MultiLanguageOverviewParagraph, MultiLanguageParagraph, MultiLanguagePlainText
|
|
28
31
|
from ..models.M2.MSR.Documentation.TextModel.MultilanguageData import MultilanguageLongName
|
|
29
32
|
|
|
30
33
|
from ..models.M2.AUTOSARTemplates.AutosarTopLevelStructure import AUTOSAR
|
|
31
|
-
from ..models.M2.AUTOSARTemplates.BswModuleTemplate.BswBehavior import BswApiOptions,
|
|
32
|
-
from ..models.M2.AUTOSARTemplates.BswModuleTemplate.BswBehavior import
|
|
34
|
+
from ..models.M2.AUTOSARTemplates.BswModuleTemplate.BswBehavior import BswApiOptions, BswAsynchronousServerCallPoint, BswBackgroundEvent
|
|
35
|
+
from ..models.M2.AUTOSARTemplates.BswModuleTemplate.BswBehavior import BswCalledEntity, BswDataReceivedEvent, BswModuleCallPoint
|
|
36
|
+
from ..models.M2.AUTOSARTemplates.BswModuleTemplate.BswBehavior import BswInternalTriggeringPoint, BswOperationInvokedEvent
|
|
33
37
|
from ..models.M2.AUTOSARTemplates.BswModuleTemplate.BswBehavior import BswDataReceptionPolicy, BswExternalTriggerOccurredEvent, BswInternalBehavior
|
|
34
38
|
from ..models.M2.AUTOSARTemplates.BswModuleTemplate.BswBehavior import BswInternalTriggerOccurredEvent, BswInterruptEntity, BswModeSwitchEvent
|
|
35
39
|
from ..models.M2.AUTOSARTemplates.BswModuleTemplate.BswBehavior import BswModuleEntity, BswQueuedDataReceptionPolicy, BswSchedulableEntity
|
|
36
40
|
from ..models.M2.AUTOSARTemplates.BswModuleTemplate.BswBehavior import BswScheduleEvent, BswModeSenderPolicy, BswTimingEvent, BswVariableAccess
|
|
37
|
-
from ..models.M2.AUTOSARTemplates.BswModuleTemplate.BswInterfaces import BswModuleEntry
|
|
41
|
+
from ..models.M2.AUTOSARTemplates.BswModuleTemplate.BswInterfaces import BswModuleClientServerEntry, BswModuleEntry
|
|
38
42
|
from ..models.M2.AUTOSARTemplates.BswModuleTemplate.BswImplementation import BswImplementation
|
|
39
43
|
from ..models.M2.AUTOSARTemplates.BswModuleTemplate.BswOverview import BswModuleDescription
|
|
40
44
|
from ..models.M2.AUTOSARTemplates.CommonStructure import ApplicationValueSpecification, ArrayValueSpecification, ConstantReference
|
|
@@ -50,10 +54,13 @@ from ..models.M2.AUTOSARTemplates.CommonStructure.ResourceConsumption.MemorySect
|
|
|
50
54
|
from ..models.M2.AUTOSARTemplates.CommonStructure.ResourceConsumption.StackUsage import RoughEstimateStackUsage, StackUsage
|
|
51
55
|
from ..models.M2.AUTOSARTemplates.CommonStructure.SwcBswMapping import SwcBswMapping, SwcBswRunnableMapping
|
|
52
56
|
from ..models.M2.AUTOSARTemplates.CommonStructure.ServiceNeeds import CryptoServiceNeeds, DiagEventDebounceMonitorInternal
|
|
57
|
+
from ..models.M2.AUTOSARTemplates.CommonStructure.ServiceNeeds import DiagnosticCapabilityElement, DtcStatusChangeNotificationNeeds
|
|
53
58
|
from ..models.M2.AUTOSARTemplates.CommonStructure.ServiceNeeds import DiagnosticCommunicationManagerNeeds, DiagnosticEventInfoNeeds
|
|
54
59
|
from ..models.M2.AUTOSARTemplates.CommonStructure.ServiceNeeds import DiagnosticEventNeeds, DiagnosticRoutineNeeds, DiagnosticValueNeeds
|
|
55
60
|
from ..models.M2.AUTOSARTemplates.CommonStructure.ServiceNeeds import EcuStateMgrUserNeeds, NvBlockNeeds, RoleBasedDataAssignment
|
|
56
61
|
from ..models.M2.AUTOSARTemplates.CommonStructure.ServiceNeeds import RoleBasedDataTypeAssignment, ServiceDependency
|
|
62
|
+
from ..models.M2.AUTOSARTemplates.CommonStructure.StandardizationTemplate.BlueprintDedicated.PortPrototypeBlueprint import PortPrototypeBlueprint
|
|
63
|
+
from ..models.M2.AUTOSARTemplates.CommonStructure.StandardizationTemplate.Keyword import Keyword, KeywordSet
|
|
57
64
|
from ..models.M2.AUTOSARTemplates.CommonStructure.Implementation import Implementation
|
|
58
65
|
from ..models.M2.AUTOSARTemplates.CommonStructure.ImplementationDataTypes import ImplementationDataType
|
|
59
66
|
from ..models.M2.AUTOSARTemplates.CommonStructure.Timing.TimingConstraint.ExecutionOrderConstraint import ExecutionOrderConstraint
|
|
@@ -66,12 +73,13 @@ from ..models.M2.AUTOSARTemplates.ECUCDescriptionTemplate import EcucReferenceVa
|
|
|
66
73
|
from ..models.M2.AUTOSARTemplates.EcuResourceTemplate import HwDescriptionEntity, HwElement, HwPinGroup
|
|
67
74
|
from ..models.M2.AUTOSARTemplates.EcuResourceTemplate.HwElementCategory import HwAttributeDef, HwCategory, HwType
|
|
68
75
|
from ..models.M2.AUTOSARTemplates.GenericStructure.AbstractStructure import AnyInstanceRef
|
|
76
|
+
from ..models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ElementCollection import Collection
|
|
69
77
|
from ..models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import ARElement, Describable, Identifiable
|
|
70
78
|
from ..models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Referrable, MultilanguageReferrable
|
|
71
79
|
from ..models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.EngineeringObject import AutosarEngineeringObject, EngineeringObject
|
|
72
80
|
from ..models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ARPackage import ARPackage, ReferenceBase
|
|
73
81
|
from ..models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import RefType, ARLiteral
|
|
74
|
-
from ..models.M2.AUTOSARTemplates.GenericStructure.LifeCycles import LifeCycleInfoSet
|
|
82
|
+
from ..models.M2.AUTOSARTemplates.GenericStructure.LifeCycles import LifeCycleInfo, LifeCycleInfoSet, LifeCyclePeriod
|
|
75
83
|
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.Datatype.Datatypes import ApplicationPrimitiveDataType, ApplicationRecordDataType
|
|
76
84
|
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.Datatype.Datatypes import ApplicationArrayDataType, ApplicationCompositeDataType
|
|
77
85
|
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.Datatype.Datatypes import ApplicationDataType, AutosarDataType, DataTypeMap, DataTypeMappingSet
|
|
@@ -103,7 +111,8 @@ from ..models.M2.AUTOSARTemplates.SWComponentTemplate.Composition import Assembl
|
|
|
103
111
|
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.Datatype.DataPrototypes import ApplicationCompositeElementDataPrototype
|
|
104
112
|
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.Datatype.DataPrototypes import ApplicationRecordElement, AutosarDataPrototype
|
|
105
113
|
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.Datatype.DataPrototypes import DataPrototype, ParameterDataPrototype, VariableDataPrototype
|
|
106
|
-
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.PortInterface import ArgumentDataPrototype, ClientServerInterface,
|
|
114
|
+
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.PortInterface import ArgumentDataPrototype, ClientServerInterface, ClientServerInterfaceMapping
|
|
115
|
+
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.PortInterface import ClientServerOperation, ClientServerOperationMapping
|
|
107
116
|
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.PortInterface import DataPrototypeMapping, InvalidationPolicy, ModeSwitchInterface
|
|
108
117
|
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.PortInterface import ParameterInterface, PortInterface, PortInterfaceMappingSet
|
|
109
118
|
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.PortInterface import SenderReceiverInterface, TriggerInterface, DataInterface
|
|
@@ -580,20 +589,23 @@ class ARXMLParser(AbstractARXMLParser):
|
|
|
580
589
|
.setWritingFrequency(self.getChildElementOptionalPositiveInteger(element, "WRITING-FREQUENCY")) \
|
|
581
590
|
.setWritingPriority(self.getChildElementOptionalLiteral(element, "WRITING-PRIORITY"))
|
|
582
591
|
|
|
583
|
-
def
|
|
584
|
-
self.logger.debug("Read DiagnosticCommunicationManagerNeeds <%s>" % needs.getShortName())
|
|
592
|
+
def readDiagnosticCapabilityElement(self, element: ET.Element, needs: DiagnosticCapabilityElement):
|
|
585
593
|
self.readIdentifiable(element, needs)
|
|
594
|
+
|
|
595
|
+
def readDiagnosticCommunicationManagerNeeds(self, element: ET.Element, needs: DiagnosticCommunicationManagerNeeds):
|
|
596
|
+
self.logger.debug("Read DiagnosticCommunicationManagerNeeds <%s>" % needs.getShortName())
|
|
597
|
+
self.readDiagnosticCapabilityElement(element, needs)
|
|
586
598
|
needs.setServiceRequestCallbackType(self.getChildElementOptionalLiteral(element, "SERVICE-REQUEST-CALLBACK-TYPE"))
|
|
587
599
|
|
|
588
600
|
def readDiagnosticRoutineNeeds(self, element: ET.Element, needs: DiagnosticRoutineNeeds):
|
|
589
601
|
self.logger.debug("Read DiagnosticRoutineNeeds %s" % needs.getShortName())
|
|
590
|
-
self.
|
|
602
|
+
self.readDiagnosticCapabilityElement(element, needs)
|
|
591
603
|
needs.setDiagRoutineType(self.getChildElementOptionalLiteral(element, "DIAG-ROUTINE-TYPE")) \
|
|
592
604
|
.setRidNumber(self.getChildElementOptionalIntegerValue(element, "RID-NUMBER"))
|
|
593
605
|
|
|
594
606
|
def readDiagnosticValueNeeds(self, element: ET.Element, needs: DiagnosticValueNeeds):
|
|
595
607
|
self.logger.debug("Read DiagnosticValueNeeds %s" % needs.getShortName())
|
|
596
|
-
self.
|
|
608
|
+
self.readDiagnosticCapabilityElement(element, needs)
|
|
597
609
|
needs.setDataLength(self.getChildElementOptionalPositiveInteger(element, "DATA-LENGTH")) \
|
|
598
610
|
.setDiagnosticValueAccess(self.getChildElementOptionalLiteral(element, "DIAGNOSTIC-VALUE-ACCESS")) \
|
|
599
611
|
.setDidNumber(self.getChildElementOptionalIntegerValue(element, "DID-NUMBER")) \
|
|
@@ -601,7 +613,7 @@ class ARXMLParser(AbstractARXMLParser):
|
|
|
601
613
|
.setProcessingStyle(self.getChildElementOptionalLiteral(element, "PROCESSING-STYLE"))
|
|
602
614
|
|
|
603
615
|
def readDiagEventDebounceMonitorInternal(self, element: ET.Element, algorithm: DiagEventDebounceMonitorInternal):
|
|
604
|
-
self.
|
|
616
|
+
self.readDiagnosticCapabilityElement(element, algorithm)
|
|
605
617
|
|
|
606
618
|
def readDiagEventDebounceAlgorithm(self, element: ET.Element, needs: DiagnosticEventNeeds):
|
|
607
619
|
for child_element in self.findall(element, "DIAG-EVENT-DEBOUNCE-ALGORITHM/*"):
|
|
@@ -614,14 +626,15 @@ class ARXMLParser(AbstractARXMLParser):
|
|
|
614
626
|
|
|
615
627
|
def readDiagnosticEventNeeds(self, element: ET.Element, needs: DiagnosticEventNeeds):
|
|
616
628
|
self.logger.debug("Read DiagnosticEventNeeds <%s>" % needs.getShortName())
|
|
617
|
-
self.
|
|
629
|
+
self.readDiagnosticCapabilityElement(element, needs)
|
|
618
630
|
self.readDiagEventDebounceAlgorithm(element, needs)
|
|
619
631
|
needs.setDtcKind(self.getChildElementOptionalLiteral(element, "DTC-KIND")) \
|
|
620
632
|
.setUdsDtcNumber(self.getChildElementOptionalIntegerValue(element, "UDS-DTC-NUMBER"))
|
|
621
633
|
|
|
622
634
|
def readDiagnosticEventInfoNeeds(self, element: ET.Element, needs: DiagnosticEventInfoNeeds):
|
|
623
635
|
self.logger.debug("Read DiagnosticEventInfoNeeds <%s>" % needs.getShortName())
|
|
624
|
-
self.
|
|
636
|
+
self.readDiagnosticCapabilityElement(element, needs)
|
|
637
|
+
needs.setDtcKind(self.getChildElementOptionalLiteral(element, "DTC-KIND"))
|
|
625
638
|
needs.setUdsDtcNumber(self.getChildElementOptionalPositiveInteger(element, "UDS-DTC-NUMBER"))
|
|
626
639
|
|
|
627
640
|
def readCryptoServiceNeeds(self, element: ET.Element, needs: CryptoServiceNeeds):
|
|
@@ -630,9 +643,14 @@ class ARXMLParser(AbstractARXMLParser):
|
|
|
630
643
|
needs.setMaximumKeyLength(self.getChildElementOptionalPositiveInteger(element, "MAXIMUM-KEY-LENGTH"))
|
|
631
644
|
|
|
632
645
|
def readEcuStateMgrUserNeeds(self, element: ET.Element, needs: EcuStateMgrUserNeeds):
|
|
633
|
-
self.logger.debug("
|
|
646
|
+
self.logger.debug("Read EcuStateMgrUserNeeds %s" % needs.getShortName())
|
|
634
647
|
self.readIdentifiable(element, needs)
|
|
635
648
|
|
|
649
|
+
def readDtcStatusChangeNotificationNeeds(self, element: ET.Element, needs: DtcStatusChangeNotificationNeeds):
|
|
650
|
+
self.logger.debug("Read DtcStatusChangeNotificationNeeds %s" % needs.getShortName())
|
|
651
|
+
self.readDiagnosticCapabilityElement(element, needs)
|
|
652
|
+
needs.setDtcFormatType(self.getChildElementOptionalLiteral(element, "DTC-FORMAT-TYPE"))
|
|
653
|
+
|
|
636
654
|
def readSwcServiceDependencyServiceNeeds(self, element: ET.Element, parent: SwcServiceDependency):
|
|
637
655
|
for child_element in self.findall(element, "SERVICE-NEEDS/*"):
|
|
638
656
|
tag_name = self.getTagName(child_element)
|
|
@@ -641,7 +659,7 @@ class ARXMLParser(AbstractARXMLParser):
|
|
|
641
659
|
self.readNvBlockNeeds(child_element, needs)
|
|
642
660
|
elif tag_name == "DIAGNOSTIC-COMMUNICATION-MANAGER-NEEDS":
|
|
643
661
|
needs = parent.createDiagnosticCommunicationManagerNeeds(self.getShortName(child_element))
|
|
644
|
-
self.
|
|
662
|
+
self.readDiagnosticCommunicationManagerNeeds(child_element, needs)
|
|
645
663
|
elif tag_name == "DIAGNOSTIC-ROUTINE-NEEDS":
|
|
646
664
|
needs = parent.createDiagnosticRoutineNeeds(self.getShortName(child_element))
|
|
647
665
|
self.readDiagnosticRoutineNeeds(child_element, needs)
|
|
@@ -660,6 +678,9 @@ class ARXMLParser(AbstractARXMLParser):
|
|
|
660
678
|
elif tag_name == "ECU-STATE-MGR-USER-NEEDS":
|
|
661
679
|
needs = parent.createEcuStateMgrUserNeeds(self.getShortName(child_element))
|
|
662
680
|
self.readEcuStateMgrUserNeeds(child_element, needs)
|
|
681
|
+
elif tag_name == "DTC-STATUS-CHANGE-NOTIFICATION-NEEDS":
|
|
682
|
+
needs = parent.createDtcStatusChangeNotificationNeeds(self.getShortName(child_element))
|
|
683
|
+
self.readDtcStatusChangeNotificationNeeds(child_element, needs)
|
|
663
684
|
else:
|
|
664
685
|
self.notImplemented("Unsupported service needs <%s>" % tag_name)
|
|
665
686
|
|
|
@@ -778,9 +799,31 @@ class ARXMLParser(AbstractARXMLParser):
|
|
|
778
799
|
def readBswModuleEntityIssuedTriggerRefs(self, element: ET.Element, entity: BswModuleEntity):
|
|
779
800
|
for ref in self.getChildElementRefTypeList(element, "ISSUED-TRIGGERS/TRIGGER-REF-CONDITIONAL/TRIGGER-REF"):
|
|
780
801
|
entity.addIssuedTriggerRef(ref)
|
|
802
|
+
|
|
803
|
+
def readBswModuleEntityActivationPointRefs(self, element: ET.Element, entity: BswModuleEntity):
|
|
804
|
+
for ref in self.getChildElementRefTypeList(element, "ACTIVATION-POINTS/BSW-INTERNAL-TRIGGERING-POINT-REF-CONDITIONAL/BSW-INTERNAL-TRIGGERING-POINT-REF"): # noqa E501
|
|
805
|
+
entity.addActivationPointRef(ref)
|
|
806
|
+
|
|
807
|
+
def readBswModuleCallPoint(self, element: ET.Element, point: BswModuleCallPoint):
|
|
808
|
+
self.readReferrable(element, point)
|
|
809
|
+
|
|
810
|
+
def readBswAsynchronousServerCallPoint(self, element: ET.Element, point: BswAsynchronousServerCallPoint):
|
|
811
|
+
self.readBswModuleCallPoint(element, point)
|
|
812
|
+
point.setCalledEntryRef(self.getChildElementOptionalRefType(element, "CALLED-ENTRY-REF"))
|
|
813
|
+
|
|
814
|
+
def readBswModuleEntityCallPoints(self, element: ET.Element, entity: BswModuleEntity):
|
|
815
|
+
for child_element in self.findall(element, "CALL-POINTS/*"):
|
|
816
|
+
tag_name = self.getTagName(child_element)
|
|
817
|
+
if tag_name == "BSW-ASYNCHRONOUS-SERVER-CALL-POINT":
|
|
818
|
+
point = entity.createBswAsynchronousServerCallPoint(self.getShortName(child_element))
|
|
819
|
+
self.readBswAsynchronousServerCallPoint(child_element, point)
|
|
820
|
+
else:
|
|
821
|
+
self.notImplemented("Unsupported Call Point <%s>" % tag_name)
|
|
781
822
|
|
|
782
823
|
def readBswModuleEntity(self, element: ET.Element, entity: BswModuleEntity):
|
|
783
824
|
self.readExecutableEntity(element, entity)
|
|
825
|
+
self.readBswModuleEntityActivationPointRefs(element, entity)
|
|
826
|
+
self.readBswModuleEntityCallPoints(element, entity)
|
|
784
827
|
self.readBswModuleEntityDataReceiverPoints(element, entity)
|
|
785
828
|
self.readBswModuleEntityDataSendPoints(element, entity)
|
|
786
829
|
entity.setImplementedEntryRef(self.getChildElementRefType(entity.getShortName(), element, "IMPLEMENTED-ENTRY-REF"))
|
|
@@ -876,11 +919,24 @@ class ARXMLParser(AbstractARXMLParser):
|
|
|
876
919
|
else:
|
|
877
920
|
self.notImplemented("Unsupported Reception Policies <%s>" % tag_name)
|
|
878
921
|
|
|
922
|
+
def readBswInternalTriggeringPoint(self, element: ET.Element, point: BswInternalTriggeringPoint):
|
|
923
|
+
self.readIdentifiable(element, point)
|
|
924
|
+
|
|
925
|
+
def readBswInternalBehaviorInternalTriggeringPoints(self, element: ET.Element, behavior: BswInternalBehavior):
|
|
926
|
+
for child_element in self.findall(element, "INTERNAL-TRIGGERING-POINTS/*"):
|
|
927
|
+
tag_name = self.getTagName(child_element)
|
|
928
|
+
if tag_name == "BSW-INTERNAL-TRIGGERING-POINT":
|
|
929
|
+
point = behavior.createBswInternalTriggeringPoint(self.getShortName(child_element))
|
|
930
|
+
self.readBswInternalTriggeringPoint(child_element, point)
|
|
931
|
+
else:
|
|
932
|
+
self.notImplemented("Unsupported Internal Triggering Points <%s>" % tag_name)
|
|
933
|
+
|
|
879
934
|
def readBswInternalBehavior(self, element: ET.Element, behavior: BswInternalBehavior):
|
|
880
935
|
self.logger.debug("Read BswInternalBehavior <%s>" % behavior.full_name)
|
|
881
936
|
|
|
882
937
|
# read the internal behavior
|
|
883
938
|
self.readInternalBehavior(element, behavior)
|
|
939
|
+
self.readBswInternalBehaviorInternalTriggeringPoints(element, behavior)
|
|
884
940
|
self.readBswInternalBehaviorEntities(element, behavior)
|
|
885
941
|
self.readBswInternalBehaviorEvents(element, behavior)
|
|
886
942
|
self.readBswInternalBehaviorModeSenderPolicy(element, behavior)
|
|
@@ -936,6 +992,30 @@ class ARXMLParser(AbstractARXMLParser):
|
|
|
936
992
|
else:
|
|
937
993
|
self.notImplemented("Unsupported Required Data <%s>" % tag_name)
|
|
938
994
|
|
|
995
|
+
def readBswModuleClientServerEntry(self, element: ET.Element, entry: BswModuleClientServerEntry):
|
|
996
|
+
self.readReferrable(element, entry)
|
|
997
|
+
entry.setEncapsulatedEntryRef(self.getChildElementOptionalRefType(element, "ENCAPSULATED-ENTRY-REF")) \
|
|
998
|
+
.setIsReentrant(self.getChildElementOptionalBooleanValue(element, "IS-REENTRANT")) \
|
|
999
|
+
.setIsSynchronous(self.getChildElementOptionalBooleanValue(element, "IS-SYNCHRONOUS"))
|
|
1000
|
+
|
|
1001
|
+
def readBswModuleDescriptionProvidedClientServerEntries(self, element: ET.Element, desc: BswModuleDescription):
|
|
1002
|
+
for child_element in self.findall(element, "PROVIDED-CLIENT-SERVER-ENTRYS/*"):
|
|
1003
|
+
tag_name = self.getTagName(child_element)
|
|
1004
|
+
if tag_name == "BSW-MODULE-CLIENT-SERVER-ENTRY":
|
|
1005
|
+
entry = desc.createProvidedClientServerEntry(self.getShortName(child_element))
|
|
1006
|
+
self.readBswModuleClientServerEntry(child_element, entry)
|
|
1007
|
+
else:
|
|
1008
|
+
self.notImplemented("Unsupported Provided Client Server Entry <%s>" % tag_name)
|
|
1009
|
+
|
|
1010
|
+
def readBswModuleDescriptionRequiredClientServerEntries(self, element: ET.Element, desc: BswModuleDescription):
|
|
1011
|
+
for child_element in self.findall(element, "REQUIRED-CLIENT-SERVER-ENTRYS/*"):
|
|
1012
|
+
tag_name = self.getTagName(child_element)
|
|
1013
|
+
if tag_name == "BSW-MODULE-CLIENT-SERVER-ENTRY":
|
|
1014
|
+
entry = desc.createRequiredClientServerEntry(self.getShortName(child_element))
|
|
1015
|
+
self.readBswModuleClientServerEntry(child_element, entry)
|
|
1016
|
+
else:
|
|
1017
|
+
self.notImplemented("Unsupported Required Client Server Entry <%s>" % tag_name)
|
|
1018
|
+
|
|
939
1019
|
def readBswModuleDescription(self, element: ET.Element, desc: BswModuleDescription):
|
|
940
1020
|
self.logger.debug("Read BswModuleDescription <%s>" % desc.getShortName())
|
|
941
1021
|
|
|
@@ -944,11 +1024,12 @@ class ARXMLParser(AbstractARXMLParser):
|
|
|
944
1024
|
self.readBswModuleDescriptionImplementedEntryRefs(element, desc)
|
|
945
1025
|
self.readBswModuleDescriptionProvidedModeGroups(element, desc)
|
|
946
1026
|
self.readBswModuleDescriptionRequiredModeGroups(element, desc)
|
|
947
|
-
self.
|
|
948
|
-
self.
|
|
1027
|
+
self.readBswModuleDescriptionProvidedClientServerEntries(element, desc)
|
|
1028
|
+
self.readBswModuleDescriptionRequiredClientServerEntries(element, desc)
|
|
949
1029
|
self.readBswModuleDescriptionProvidedDatas(element, desc)
|
|
950
1030
|
self.readBswModuleDescriptionRequiredDatas(element, desc)
|
|
951
1031
|
self.readBswModuleDescriptionBswInternalBehaviors(element, desc)
|
|
1032
|
+
self.readBswModuleDescriptionRequiredTriggers(element, desc)
|
|
952
1033
|
|
|
953
1034
|
def readSwServiceArg(self, element: ET.Element, arg: SwServiceArg):
|
|
954
1035
|
self.readIdentifiable(element, arg)
|
|
@@ -994,7 +1075,7 @@ class ARXMLParser(AbstractARXMLParser):
|
|
|
994
1075
|
if tag_name == "AUTOSAR-ENGINEERING-OBJECT":
|
|
995
1076
|
code_desc.addArtifactDescriptor(self.getAutosarEngineeringObject(child_element))
|
|
996
1077
|
else:
|
|
997
|
-
self.
|
|
1078
|
+
self.notImplemented("Unsupported Artifact Descriptor <%s>" % tag_name)
|
|
998
1079
|
|
|
999
1080
|
def readCodeDescriptor(self, element: ET.Element, impl: Implementation):
|
|
1000
1081
|
for child_element in self.findall(element, "CODE-DESCRIPTORS/CODE"):
|
|
@@ -1486,13 +1567,13 @@ class ARXMLParser(AbstractARXMLParser):
|
|
|
1486
1567
|
results.append(l1)
|
|
1487
1568
|
return results
|
|
1488
1569
|
|
|
1489
|
-
def getListElements(self, element: ET.Element, key: str) -> List[
|
|
1570
|
+
def getListElements(self, element: ET.Element, key: str) -> List[ARList]:
|
|
1490
1571
|
'''
|
|
1491
1572
|
Read the DocumentationBlock List
|
|
1492
1573
|
'''
|
|
1493
1574
|
result = []
|
|
1494
1575
|
for child_element in self.findall(element, key):
|
|
1495
|
-
list =
|
|
1576
|
+
list = ARList()
|
|
1496
1577
|
if 'TYPE' in child_element.attrib:
|
|
1497
1578
|
list.setType(child_element.attrib['TYPE'])
|
|
1498
1579
|
for block in self.getDocumentationBlockList(child_element, "ITEM"):
|
|
@@ -1500,6 +1581,41 @@ class ARXMLParser(AbstractARXMLParser):
|
|
|
1500
1581
|
result.append(list)
|
|
1501
1582
|
return result
|
|
1502
1583
|
|
|
1584
|
+
def getGraphic(self, element: ET.Element, key: str) -> Graphic:
|
|
1585
|
+
graphic = None
|
|
1586
|
+
child_element = self.find(element, key)
|
|
1587
|
+
if child_element is not None:
|
|
1588
|
+
graphic = Graphic()
|
|
1589
|
+
if "FILENAME" in child_element.attrib:
|
|
1590
|
+
graphic.setFilename(child_element.attrib["FILENAME"])
|
|
1591
|
+
return graphic
|
|
1592
|
+
|
|
1593
|
+
def readMlFigureLGraphics(self, element: ET.Element, figure: MlFigure):
|
|
1594
|
+
for child_element in self.findall(element, "L-GRAPHIC"):
|
|
1595
|
+
graphic = LGraphic()
|
|
1596
|
+
if "L" in child_element.attrib:
|
|
1597
|
+
graphic.setL(child_element.attrib["L"])
|
|
1598
|
+
graphic.setGraphic(self.getGraphic(child_element, "GRAPHIC"))
|
|
1599
|
+
figure.addLGraphics(graphic)
|
|
1600
|
+
|
|
1601
|
+
def readDocumentViewSelectable(self, element: ET.Element, selectable: DocumentViewSelectable):
|
|
1602
|
+
self.readARObjectAttributes(element, selectable)
|
|
1603
|
+
|
|
1604
|
+
def readPaginateable(self, element: ET.Element, paginateable: Paginateable):
|
|
1605
|
+
self.readDocumentViewSelectable(element, paginateable)
|
|
1606
|
+
|
|
1607
|
+
def readMlFigure(self, element: ET.Element, figure: MlFigure):
|
|
1608
|
+
self.readPaginateable(element, figure)
|
|
1609
|
+
self.readMlFigureLGraphics(element, figure)
|
|
1610
|
+
|
|
1611
|
+
def getMlFigures(self, element: ET.Element, key: str) -> List[MlFigure]:
|
|
1612
|
+
result = []
|
|
1613
|
+
for child_element in self.findall(element, key):
|
|
1614
|
+
figure = MlFigure()
|
|
1615
|
+
self.readMlFigure(child_element, figure)
|
|
1616
|
+
result.append(figure)
|
|
1617
|
+
return result
|
|
1618
|
+
|
|
1503
1619
|
def getMultiLanguagePlainText(self, element: ET.Element, key: str) -> MultiLanguagePlainText:
|
|
1504
1620
|
paragraph = None
|
|
1505
1621
|
child_element = self.find(element, key)
|
|
@@ -1509,13 +1625,15 @@ class ARXMLParser(AbstractARXMLParser):
|
|
|
1509
1625
|
for l10 in self.getLPlainTexts(child_element, "L-10"):
|
|
1510
1626
|
paragraph.addL10(l10)
|
|
1511
1627
|
return paragraph
|
|
1512
|
-
|
|
1628
|
+
|
|
1513
1629
|
def readDocumentationBlock(self, element: ET.Element, block: DocumentationBlock):
|
|
1514
1630
|
self.readARObjectAttributes(element, block)
|
|
1515
1631
|
for paragraph in self.getMultiLanguageParagraphs(element, "P"):
|
|
1516
1632
|
block.addP(paragraph)
|
|
1517
1633
|
for list in self.getListElements(element, "LIST"):
|
|
1518
1634
|
block.addList(list)
|
|
1635
|
+
for figure in self.getMlFigures(element, "FIGURE"):
|
|
1636
|
+
block.addFigure(figure)
|
|
1519
1637
|
|
|
1520
1638
|
def getDocumentationBlock(self, element: ET.Element, key: str) -> DocumentationBlock:
|
|
1521
1639
|
block = None
|
|
@@ -4069,10 +4187,55 @@ class ARXMLParser(AbstractARXMLParser):
|
|
|
4069
4187
|
|
|
4070
4188
|
def readDataTransformationSet(self, element: ET.Element, dtf_set: DataTransformationSet):
|
|
4071
4189
|
self.logger.debug("Read DataTransformationSet <%s>" % dtf_set.getShortName())
|
|
4072
|
-
self.
|
|
4190
|
+
self.readARElement(element, dtf_set)
|
|
4073
4191
|
self.readDataTransformationSetDataTransformations(element, dtf_set)
|
|
4074
4192
|
self.readDataTransformationSetTransformationTechnologies(element, dtf_set)
|
|
4075
4193
|
|
|
4194
|
+
def readCollectionElementRefs(self, element: ET.Element, collection: Collection):
|
|
4195
|
+
for ref in self.getChildElementRefTypeList(element, "ELEMENT-REFS/ELEMENT-REF"):
|
|
4196
|
+
collection.addElementRef(ref)
|
|
4197
|
+
|
|
4198
|
+
def readCollectionSourceElementRefs(self, element: ET.Element, collection: Collection):
|
|
4199
|
+
for ref in self.getChildElementRefTypeList(element, "SOURCE-ELEMENT-REFS/SOURCE-ELEMENT-REF"):
|
|
4200
|
+
collection.addSourceElementRef(ref)
|
|
4201
|
+
|
|
4202
|
+
def readCollection(self, element: ET.Element, collection: Collection):
|
|
4203
|
+
self.logger.debug("Read Collection <%s>" % collection.getShortName())
|
|
4204
|
+
self.readARElement(element, collection)
|
|
4205
|
+
collection.setAutoCollect(self.getChildElementOptionalLiteral(element, "AUTO-COLLECT")) \
|
|
4206
|
+
.setElementRole(self.getChildElementOptionalLiteral(element, "ELEMENT-ROLE"))
|
|
4207
|
+
self.readCollectionElementRefs(element, collection)
|
|
4208
|
+
self.readCollectionSourceElementRefs(element, collection)
|
|
4209
|
+
|
|
4210
|
+
def readKeywordClassifications(self, element: ET.Element, keyword: Keyword):
|
|
4211
|
+
for literal in self.getChildElementLiteralValueList(element, "CLASSIFICATIONS/CLASSIFICATION"):
|
|
4212
|
+
keyword.addClassification(literal)
|
|
4213
|
+
|
|
4214
|
+
def readKeyword(self, element: ET.Element, keyword: Keyword):
|
|
4215
|
+
# self.logger.debug("Read Keyword <%s>" % keyword.getShortName())
|
|
4216
|
+
self.readIdentifiable(element, keyword)
|
|
4217
|
+
keyword.setAbbrName(self.getChildElementOptionalLiteral(element, "ABBR-NAME"))
|
|
4218
|
+
self.readKeywordClassifications(element, keyword)
|
|
4219
|
+
|
|
4220
|
+
def readKeywordSetKeywords(self, element: ET.Element, keyword_set: KeywordSet):
|
|
4221
|
+
for child_element in self.findall(element, "KEYWORDS/*"):
|
|
4222
|
+
tag_name = self.getTagName(child_element)
|
|
4223
|
+
if tag_name == "KEYWORD":
|
|
4224
|
+
tech = keyword_set.createKeyword(self.getShortName(child_element))
|
|
4225
|
+
self.readKeyword(child_element, tech)
|
|
4226
|
+
else:
|
|
4227
|
+
self.notImplemented("Unsupported Keyword <%s>" % tag_name)
|
|
4228
|
+
|
|
4229
|
+
def readKeywordSet(self, element: ET.Element, keyword_set: KeywordSet):
|
|
4230
|
+
self.logger.debug("Read KeywordSet <%s>" % keyword_set.getShortName())
|
|
4231
|
+
self.readARElement(element, keyword_set)
|
|
4232
|
+
self.readKeywordSetKeywords(element, keyword_set)
|
|
4233
|
+
|
|
4234
|
+
def readPortPrototypeBlueprint(self, element: ET.Element, blueprint: PortPrototypeBlueprint):
|
|
4235
|
+
self.logger.debug("Read PortPrototypeBlueprint <%s>" % blueprint.getShortName())
|
|
4236
|
+
self.readARElement(element, blueprint)
|
|
4237
|
+
blueprint.setInterfaceRef(self.getChildElementOptionalRefType(element, "INTERFACE-REF"))
|
|
4238
|
+
|
|
4076
4239
|
def readCommunicationController(self, element: ET.Element, controller: CommunicationController):
|
|
4077
4240
|
controller.setWakeUpByControllerSupported(self.getChildElementOptionalBooleanValue(element, "WAKE-UP-BY-CONTROLLER-SUPPORTED"))
|
|
4078
4241
|
|
|
@@ -4525,20 +4688,10 @@ class ARXMLParser(AbstractARXMLParser):
|
|
|
4525
4688
|
dimension.setLengthExp(self.getChildElementOptionalNumericalValue(element, "LENGTH-EXP")) \
|
|
4526
4689
|
.setLuminousIntensityExp(self.getChildElementOptionalNumericalValue(element, "LUMINOUS-INTENSITY-EXP")) \
|
|
4527
4690
|
.setMassExp(self.getChildElementOptionalNumericalValue(element, "MASS-EXP")) \
|
|
4691
|
+
.setMolarAmountExp(self.getChildElementOptionalNumericalValue(element, "MOLAR-AMOUNT-EXP")) \
|
|
4528
4692
|
.setTemperatureExp(self.getChildElementOptionalNumericalValue(element, "TEMPERATURE-EXP")) \
|
|
4529
4693
|
.setTimeExp(self.getChildElementOptionalNumericalValue(element, "TIME-EXP")) \
|
|
4530
|
-
.setCurrentExp(self.getChildElementOptionalNumericalValue(element, "CURRENT-EXP"))
|
|
4531
|
-
|
|
4532
|
-
'''
|
|
4533
|
-
def getIPduMappings(self, element: ET.Element) -> List[IPduMapping]:
|
|
4534
|
-
mappings = []
|
|
4535
|
-
for child_element in self.findall(element, tag_name):
|
|
4536
|
-
mapping = IPduMapping()
|
|
4537
|
-
mapping.sourceIPduRef = self.getChildElementOptionalRefType(child_element, "SOURCE-IPDU-REF")
|
|
4538
|
-
mapping.targetIPduRef = self.getChildElementOptionalRefType(child_element, "TARGET-IPDU-REF")
|
|
4539
|
-
mappings.append(mapping)
|
|
4540
|
-
return mappings
|
|
4541
|
-
'''
|
|
4694
|
+
.setCurrentExp(self.getChildElementOptionalNumericalValue(element, "CURRENT-EXP"))
|
|
4542
4695
|
|
|
4543
4696
|
def readISignalGroupISignalRef(self, element: ET.Element, group: ISignalGroup):
|
|
4544
4697
|
for ref_type in self.getChildElementRefTypeList(element, "I-SIGNAL-REFS/I-SIGNAL-REF"):
|
|
@@ -4856,9 +5009,42 @@ class ARXMLParser(AbstractARXMLParser):
|
|
|
4856
5009
|
self.logger.debug("Read GenericEthernetFrame <%s>" % frame.getShortName())
|
|
4857
5010
|
self.readFrame(element, frame)
|
|
4858
5011
|
|
|
5012
|
+
def getLifeCyclePeriod(self, element: ET.Element, key: str) -> LifeCyclePeriod:
|
|
5013
|
+
child_element = self.find(element, key)
|
|
5014
|
+
period = None
|
|
5015
|
+
if child_element is not None:
|
|
5016
|
+
period = LifeCyclePeriod()
|
|
5017
|
+
period.setArReleaseVersion(self.getChildElementOptionalRevisionLabelString(child_element, "AR-RELEASE-VERSION"))
|
|
5018
|
+
return period
|
|
5019
|
+
|
|
5020
|
+
def readLifeCycleInfoUseInsteadRefs(self, element: ET.Element, info: LifeCycleInfo):
|
|
5021
|
+
for ref in self.getChildElementRefTypeList(element, "USE-INSTEAD-REFS/USE-INSTEAD-REF"):
|
|
5022
|
+
info.addUseInsteadRef(ref)
|
|
5023
|
+
|
|
5024
|
+
def readLifeCycleInfo(self, element: ET.Element, info: LifeCycleInfo):
|
|
5025
|
+
self.readARObjectAttributes(element, info)
|
|
5026
|
+
info.setLcObjectRef(self.getChildElementOptionalRefType(element, "LC-OBJECT-REF")) \
|
|
5027
|
+
.setLcStateRef(self.getChildElementOptionalRefType(element, "LC-STATE-REF")) \
|
|
5028
|
+
.setPeriodBegin(self.getLifeCyclePeriod(element, "PERIOD-BEGIN")) \
|
|
5029
|
+
.setRemark(self.getDocumentationBlock(element, "REMARK"))
|
|
5030
|
+
self.readLifeCycleInfoUseInsteadRefs(element, info)
|
|
5031
|
+
|
|
5032
|
+
def readLifeCycleInfoSetLifeCycleInfos(self, element: ET.Element, info_set: LifeCycleInfoSet):
|
|
5033
|
+
for child_element in self.findall(element, "LIFE-CYCLE-INFOS/*"):
|
|
5034
|
+
tag_name = self.getTagName(child_element)
|
|
5035
|
+
if tag_name == "LIFE-CYCLE-INFO":
|
|
5036
|
+
info = LifeCycleInfo()
|
|
5037
|
+
self.readLifeCycleInfo(child_element, info)
|
|
5038
|
+
info_set.addLifeCycleInfo(info)
|
|
5039
|
+
else:
|
|
5040
|
+
self.notImplemented("Unsupported Life Cycle Info <%s>" % tag_name)
|
|
5041
|
+
|
|
4859
5042
|
def readLifeCycleInfoSet(self, element: ET.Element, info_set: LifeCycleInfoSet):
|
|
4860
5043
|
self.logger.debug("Read LifeCycleInfoSet <%s>" % info_set.getShortName())
|
|
4861
5044
|
self.readIdentifiable(element, info_set)
|
|
5045
|
+
info_set.setDefaultLcStateRef(self.getChildElementOptionalRefType(element, "DEFAULT-LC-STATE-REF"))
|
|
5046
|
+
self.readLifeCycleInfoSetLifeCycleInfos(element, info_set)
|
|
5047
|
+
info_set.setUsedLifeCycleStateDefinitionGroupRef(self.getChildElementOptionalRefType(element, "USED-LIFE-CYCLE-STATE-DEFINITION-GROUP-REF"))
|
|
4862
5048
|
|
|
4863
5049
|
def readFlatInstanceDescriptor(self, element: ET.Element, desc: FlatInstanceDescriptor):
|
|
4864
5050
|
self.logger.debug("Read LifeCycleInfoSet %s" % desc.getShortName())
|
|
@@ -4889,18 +5075,40 @@ class ARXMLParser(AbstractARXMLParser):
|
|
|
4889
5075
|
mappings.append(mapping)
|
|
4890
5076
|
return mappings
|
|
4891
5077
|
|
|
4892
|
-
def
|
|
4893
|
-
self.logger.debug("
|
|
5078
|
+
def readVariableAndParameterInterfaceMapping(self, element: ET.Element, mapping: VariableAndParameterInterfaceMapping):
|
|
5079
|
+
# self.logger.debug("Read VariableAndParameterInterfaceMapping %s" % mapping.getShortName())
|
|
4894
5080
|
self.readIdentifiable(element, mapping)
|
|
4895
5081
|
for item in self.getDataPrototypeMappings(element, "DATA-MAPPINGS"):
|
|
4896
5082
|
mapping.addDataMapping(item)
|
|
4897
5083
|
|
|
5084
|
+
def readClientServerOperationMapping(self, element: ET.Element, mapping: ClientServerOperationMapping):
|
|
5085
|
+
mapping.setFirstOperationRef(self.getChildElementOptionalRefType(element, "FIRST-OPERATION-REF")) \
|
|
5086
|
+
.setSecondOperationRef(self.getChildElementOptionalRefType(element, "SECOND-OPERATION-REF"))
|
|
5087
|
+
|
|
5088
|
+
def readClientServerInterfaceMappingOperationMappings(self, element: ET.Element, mapping: ClientServerInterfaceMapping):
|
|
5089
|
+
for child_element in self.findall(element, "OPERATION-MAPPINGS/*"):
|
|
5090
|
+
tag_name = self.getTagName(child_element)
|
|
5091
|
+
if tag_name == "CLIENT-SERVER-OPERATION-MAPPING":
|
|
5092
|
+
operation_mapping = ClientServerOperationMapping()
|
|
5093
|
+
self.readClientServerOperationMapping(child_element, operation_mapping)
|
|
5094
|
+
mapping.addOperationMapping(operation_mapping)
|
|
5095
|
+
else:
|
|
5096
|
+
self.notImplemented("Unsupported Operation Mapping <%s>" % tag_name)
|
|
5097
|
+
|
|
5098
|
+
def readClientServerInterfaceMapping(self, element: ET.Element, mapping: ClientServerInterfaceMapping):
|
|
5099
|
+
# self.logger.debug("Read ClientServerInterfaceMapping %s" % mapping.getShortName())
|
|
5100
|
+
self.readIdentifiable(element, mapping)
|
|
5101
|
+
self.readClientServerInterfaceMappingOperationMappings(element, mapping)
|
|
5102
|
+
|
|
4898
5103
|
def readPortInterfaceMappings(self, element: ET.Element, mapping_set: PortInterfaceMappingSet):
|
|
4899
5104
|
for child_element in self.findall(element, "PORT-INTERFACE-MAPPINGS/*"):
|
|
4900
5105
|
tag_name = self.getTagName(child_element)
|
|
4901
5106
|
if tag_name == "VARIABLE-AND-PARAMETER-INTERFACE-MAPPING":
|
|
4902
5107
|
mapping = mapping_set.createVariableAndParameterInterfaceMapping(self.getShortName(child_element))
|
|
4903
|
-
self.
|
|
5108
|
+
self.readVariableAndParameterInterfaceMapping(child_element, mapping)
|
|
5109
|
+
elif tag_name == "CLIENT-SERVER-INTERFACE-MAPPING":
|
|
5110
|
+
mapping = mapping_set.createClientServerInterfaceMapping(self.getShortName(child_element))
|
|
5111
|
+
self.readClientServerInterfaceMapping(child_element, mapping)
|
|
4904
5112
|
else:
|
|
4905
5113
|
self.notImplemented("Unsupported PortInterfaceMapping <%s>" % tag_name)
|
|
4906
5114
|
|
|
@@ -5137,8 +5345,17 @@ class ARXMLParser(AbstractARXMLParser):
|
|
|
5137
5345
|
elif tag_name == "DATA-TRANSFORMATION-SET":
|
|
5138
5346
|
transformation_set = parent.createDataTransformationSet(self.getShortName(child_element))
|
|
5139
5347
|
self.readDataTransformationSet(child_element, transformation_set)
|
|
5348
|
+
elif tag_name == "COLLECTION":
|
|
5349
|
+
collection = parent.createCollection(self.getShortName(child_element))
|
|
5350
|
+
self.readCollection(child_element, collection)
|
|
5351
|
+
elif tag_name == "KEYWORD-SET":
|
|
5352
|
+
keyword_set = parent.createKeywordSet(self.getShortName(child_element))
|
|
5353
|
+
self.readKeywordSet(child_element, keyword_set)
|
|
5354
|
+
elif tag_name == "PORT-PROTOTYPE-BLUEPRINT":
|
|
5355
|
+
keyword_set = parent.createPortPrototypeBlueprint(self.getShortName(child_element))
|
|
5356
|
+
self.readPortPrototypeBlueprint(child_element, keyword_set)
|
|
5140
5357
|
else:
|
|
5141
|
-
self.notImplemented("Unsupported
|
|
5358
|
+
self.notImplemented("Unsupported Element type of ARPackage <%s>" % tag_name)
|
|
5142
5359
|
|
|
5143
5360
|
def readReferenceBases(self, element: ET.Element, parent: ARPackage):
|
|
5144
5361
|
for child_element in self.findall(element, "REFERENCE-BASES/REFERENCE-BASE"):
|