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/writer/arxml_writer.py
CHANGED
|
@@ -17,21 +17,25 @@ from ..models.M2.MSR.DataDictionary.DataDefProperties import SwDataDefProps, SwP
|
|
|
17
17
|
from ..models.M2.MSR.DataDictionary.RecordLayout import SwRecordLayout, SwRecordLayoutGroup, SwRecordLayoutV
|
|
18
18
|
from ..models.M2.MSR.DataDictionary.ServiceProcessTask import SwServiceArg
|
|
19
19
|
from ..models.M2.MSR.Documentation.Annotation import Annotation
|
|
20
|
+
from ..models.M2.MSR.Documentation.BlockElements.Figure import Graphic, MlFigure
|
|
21
|
+
from ..models.M2.MSR.Documentation.TextModel.BlockElements.PaginationAndView import DocumentViewSelectable, Paginateable
|
|
20
22
|
from ..models.M2.MSR.Documentation.TextModel.BlockElements import DocumentationBlock
|
|
21
|
-
from ..models.M2.MSR.Documentation.TextModel.BlockElements.ListElements import
|
|
23
|
+
from ..models.M2.MSR.Documentation.TextModel.BlockElements.ListElements import ARList
|
|
22
24
|
from ..models.M2.MSR.Documentation.TextModel.LanguageDataModel import LLongName, LPlainText, LanguageSpecific
|
|
23
25
|
from ..models.M2.MSR.Documentation.TextModel.MultilanguageData import MultiLanguageOverviewParagraph, MultiLanguageParagraph, MultiLanguagePlainText
|
|
24
26
|
from ..models.M2.MSR.Documentation.TextModel.MultilanguageData import MultilanguageLongName
|
|
25
27
|
|
|
26
28
|
from ..models.M2.AUTOSARTemplates.AutosarTopLevelStructure import AUTOSAR
|
|
27
|
-
from ..models.M2.AUTOSARTemplates.BswModuleTemplate.BswBehavior import BswApiOptions,
|
|
29
|
+
from ..models.M2.AUTOSARTemplates.BswModuleTemplate.BswBehavior import BswApiOptions, BswAsynchronousServerCallPoint, BswBackgroundEvent
|
|
30
|
+
from ..models.M2.AUTOSARTemplates.BswModuleTemplate.BswBehavior import BswCalledEntity, BswDataReceivedEvent, BswModuleCallPoint
|
|
31
|
+
from ..models.M2.AUTOSARTemplates.BswModuleTemplate.BswBehavior import BswInternalTriggerOccurredEvent, BswOperationInvokedEvent
|
|
28
32
|
from ..models.M2.AUTOSARTemplates.BswModuleTemplate.BswBehavior import BswDataReceptionPolicy, BswEvent, BswExternalTriggerOccurredEvent
|
|
29
33
|
from ..models.M2.AUTOSARTemplates.BswModuleTemplate.BswBehavior import BswInternalBehavior, BswInterruptEntity, BswModeSenderPolicy, BswModuleEntity
|
|
30
34
|
from ..models.M2.AUTOSARTemplates.BswModuleTemplate.BswBehavior import BswQueuedDataReceptionPolicy, BswSchedulableEntity, BswScheduleEvent
|
|
31
|
-
from ..models.M2.AUTOSARTemplates.BswModuleTemplate.BswBehavior import BswTimingEvent, BswVariableAccess
|
|
35
|
+
from ..models.M2.AUTOSARTemplates.BswModuleTemplate.BswBehavior import BswTimingEvent, BswVariableAccess, BswInternalTriggeringPoint
|
|
32
36
|
from ..models.M2.AUTOSARTemplates.BswModuleTemplate.BswOverview import BswModuleDescription
|
|
33
37
|
from ..models.M2.AUTOSARTemplates.BswModuleTemplate.BswImplementation import BswImplementation
|
|
34
|
-
from ..models.M2.AUTOSARTemplates.BswModuleTemplate.BswInterfaces import BswModuleEntry
|
|
38
|
+
from ..models.M2.AUTOSARTemplates.BswModuleTemplate.BswInterfaces import BswModuleClientServerEntry, BswModuleEntry
|
|
35
39
|
from ..models.M2.AUTOSARTemplates.CommonStructure import ApplicationValueSpecification, ArrayValueSpecification, ConstantReference
|
|
36
40
|
from ..models.M2.AUTOSARTemplates.CommonStructure import ConstantSpecification, NumericalValueSpecification, RecordValueSpecification
|
|
37
41
|
from ..models.M2.AUTOSARTemplates.CommonStructure import TextValueSpecification, ValueSpecification
|
|
@@ -46,10 +50,13 @@ from ..models.M2.AUTOSARTemplates.CommonStructure.ResourceConsumption import Res
|
|
|
46
50
|
from ..models.M2.AUTOSARTemplates.CommonStructure.ResourceConsumption.StackUsage import RoughEstimateStackUsage, StackUsage
|
|
47
51
|
from ..models.M2.AUTOSARTemplates.CommonStructure.SwcBswMapping import SwcBswMapping, SwcBswRunnableMapping
|
|
48
52
|
from ..models.M2.AUTOSARTemplates.CommonStructure.ServiceNeeds import CryptoServiceNeeds, DiagEventDebounceMonitorInternal
|
|
53
|
+
from ..models.M2.AUTOSARTemplates.CommonStructure.ServiceNeeds import DiagnosticCapabilityElement, DtcStatusChangeNotificationNeeds
|
|
49
54
|
from ..models.M2.AUTOSARTemplates.CommonStructure.ServiceNeeds import DiagnosticCommunicationManagerNeeds, DiagnosticEventInfoNeeds
|
|
50
55
|
from ..models.M2.AUTOSARTemplates.CommonStructure.ServiceNeeds import DiagnosticEventNeeds, DiagnosticRoutineNeeds, DiagnosticValueNeeds
|
|
51
56
|
from ..models.M2.AUTOSARTemplates.CommonStructure.ServiceNeeds import EcuStateMgrUserNeeds, NvBlockNeeds, RoleBasedDataAssignment
|
|
52
57
|
from ..models.M2.AUTOSARTemplates.CommonStructure.ServiceNeeds import RoleBasedDataTypeAssignment, ServiceDependency
|
|
58
|
+
from ..models.M2.AUTOSARTemplates.CommonStructure.StandardizationTemplate.Keyword import KeywordSet, Keyword
|
|
59
|
+
from ..models.M2.AUTOSARTemplates.CommonStructure.StandardizationTemplate.BlueprintDedicated.PortPrototypeBlueprint import PortPrototypeBlueprint
|
|
53
60
|
from ..models.M2.AUTOSARTemplates.CommonStructure.Timing.TimingConstraint.TimingExtensions import SwcTiming, TimingExtension
|
|
54
61
|
from ..models.M2.AUTOSARTemplates.CommonStructure.Timing.TimingConstraint.ExecutionOrderConstraint import EOCExecutableEntityRef
|
|
55
62
|
from ..models.M2.AUTOSARTemplates.CommonStructure.Timing.TimingConstraint.ExecutionOrderConstraint import ExecutionOrderConstraint
|
|
@@ -61,12 +68,13 @@ from ..models.M2.AUTOSARTemplates.ECUCDescriptionTemplate import EcucReferenceVa
|
|
|
61
68
|
from ..models.M2.AUTOSARTemplates.EcuResourceTemplate import HwDescriptionEntity, HwElement, HwPinGroup
|
|
62
69
|
from ..models.M2.AUTOSARTemplates.EcuResourceTemplate.HwElementCategory import HwAttributeDef, HwCategory, HwType
|
|
63
70
|
from ..models.M2.AUTOSARTemplates.GenericStructure.AbstractStructure import AnyInstanceRef
|
|
71
|
+
from ..models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ElementCollection import Collection
|
|
64
72
|
from ..models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ARPackage import ARPackage, ReferenceBase
|
|
65
73
|
from ..models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.EngineeringObject import AutosarEngineeringObject, EngineeringObject
|
|
66
74
|
from ..models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import ARElement, Describable, Identifiable
|
|
67
75
|
from ..models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Referrable, MultilanguageReferrable
|
|
68
76
|
from ..models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import RefType, ARLiteral, Limit
|
|
69
|
-
from ..models.M2.AUTOSARTemplates.GenericStructure.LifeCycles import LifeCycleInfoSet
|
|
77
|
+
from ..models.M2.AUTOSARTemplates.GenericStructure.LifeCycles import LifeCycleInfo, LifeCycleInfoSet, LifeCyclePeriod
|
|
70
78
|
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.Communication import CompositeNetworkRepresentation, ModeSwitchedAckRequest
|
|
71
79
|
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.Communication import TransmissionAcknowledgementRequest
|
|
72
80
|
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.Communication import ClientComSpec, ModeSwitchReceiverComSpec, ModeSwitchSenderComSpec
|
|
@@ -99,6 +107,7 @@ from ..models.M2.AUTOSARTemplates.SWComponentTemplate.EndToEndProtection import
|
|
|
99
107
|
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.EndToEndProtection import EndToEndProtectionVariablePrototype
|
|
100
108
|
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.EndToEndProtection import EndToEndProtectionSet
|
|
101
109
|
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.PortInterface import ApplicationError, ArgumentDataPrototype, ClientServerInterface
|
|
110
|
+
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.PortInterface import ClientServerInterfaceMapping, ClientServerOperationMapping
|
|
102
111
|
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.PortInterface import ClientServerOperation, DataInterface
|
|
103
112
|
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.PortInterface import DataPrototypeMapping, ModeSwitchInterface, ParameterInterface
|
|
104
113
|
from ..models.M2.AUTOSARTemplates.SWComponentTemplate.PortInterface import PortInterface, PortInterfaceMappingSet, SenderReceiverInterface
|
|
@@ -312,7 +321,7 @@ class ARXMLWriter(AbstractARXMLWriter):
|
|
|
312
321
|
self.setAnnotations(element, identifiable.getAnnotations())
|
|
313
322
|
self.setMultiLanguageOverviewParagraph(element, "DESC", identifiable.getDesc())
|
|
314
323
|
self.setChildElementOptionalLiteral(element, "CATEGORY", identifiable.getCategory())
|
|
315
|
-
self.
|
|
324
|
+
self.writeDocumentationBlock(element, "INTRODUCTION", identifiable.getIntroduction())
|
|
316
325
|
self.setAdminData(element, identifiable.getAdminData())
|
|
317
326
|
|
|
318
327
|
def writeARElement(self, parent: ET.Element, ar_element: ARElement):
|
|
@@ -735,27 +744,57 @@ class ARXMLWriter(AbstractARXMLWriter):
|
|
|
735
744
|
self.writeLParagraphs(child_element, paragraph)
|
|
736
745
|
return paragraphs
|
|
737
746
|
|
|
738
|
-
def setListElement(self, element: ET.Element, key: str, list:
|
|
747
|
+
def setListElement(self, element: ET.Element, key: str, list: ARList):
|
|
739
748
|
if list is not None:
|
|
740
749
|
child_element = ET.SubElement(element, key)
|
|
741
750
|
type = list.getType()
|
|
742
751
|
if type is not None:
|
|
743
752
|
child_element.attrib['TYPE'] = type
|
|
744
753
|
for item in list.getItems():
|
|
745
|
-
self.
|
|
754
|
+
self.writeDocumentationBlock(child_element, "ITEM", item)
|
|
746
755
|
|
|
747
|
-
def
|
|
756
|
+
def setGraphic(self, element: ET.Element, key: str, graphic: Graphic):
|
|
757
|
+
if graphic is not None:
|
|
758
|
+
child_element = ET.SubElement(element, key)
|
|
759
|
+
if graphic.getFilename() is not None:
|
|
760
|
+
child_element.attrib["FILENAME"] = graphic.getFilename()
|
|
761
|
+
|
|
762
|
+
def writeMlFigureLGraphics(self, element: ET.Element, figure: MlFigure):
|
|
763
|
+
graphics = figure.getLGraphics()
|
|
764
|
+
for graphic in graphics:
|
|
765
|
+
child_element = ET.SubElement(element, "L-GRAPHIC")
|
|
766
|
+
if graphic.getL() is not None:
|
|
767
|
+
child_element.attrib["L"] = graphic.getL()
|
|
768
|
+
self.setGraphic(child_element, "GRAPHIC", graphic.getGraphic())
|
|
769
|
+
|
|
770
|
+
def writeDocumentViewSelectable(self, element: ET.Element, selectable: DocumentViewSelectable):
|
|
771
|
+
self.writeARObjectAttributes(element, selectable)
|
|
772
|
+
|
|
773
|
+
def writePaginateable(self, element: ET.Element, paginateable: Paginateable):
|
|
774
|
+
self.writeDocumentViewSelectable(element, paginateable)
|
|
775
|
+
|
|
776
|
+
def writeMlFigure(self, element: ET.Element, figure: MlFigure):
|
|
777
|
+
self.writePaginateable(element, figure)
|
|
778
|
+
self.writeMlFigureLGraphics(element, figure)
|
|
779
|
+
|
|
780
|
+
def setMlFigures(self, element: ET.Element, key: str, figures: List[MlFigure]):
|
|
781
|
+
for figure in figures:
|
|
782
|
+
child_element = ET.SubElement(element, key)
|
|
783
|
+
self.writeMlFigure(child_element, figure)
|
|
784
|
+
|
|
785
|
+
def writeDocumentationBlock(self, element: ET.Element, key: str, block: DocumentationBlock):
|
|
748
786
|
if block is not None:
|
|
749
787
|
child_element = ET.SubElement(element, key)
|
|
750
788
|
self.writeARObjectAttributes(child_element, block)
|
|
751
789
|
self.setMultiLanguageParagraphs(child_element, "P", block.getPs())
|
|
752
790
|
for list in block.getLists():
|
|
753
791
|
self.setListElement(child_element, "LIST", list)
|
|
792
|
+
self.setMlFigures(child_element, "FIGURE", block.getFigures())
|
|
754
793
|
|
|
755
794
|
def writeGeneralAnnotation(self, element: ET.Element, annotation: Annotation):
|
|
756
795
|
self.setMultiLongName(element, "LABEL", annotation.getLabel())
|
|
757
796
|
self.setChildElementOptionalLiteral(element, "ANNOTATION-ORIGIN", annotation.getAnnotationOrigin())
|
|
758
|
-
self.
|
|
797
|
+
self.writeDocumentationBlock(element, "ANNOTATION-TEXT", annotation.getAnnotationText())
|
|
759
798
|
|
|
760
799
|
def setAnnotations(self, element: ET.Element, annotations: List[Annotation]):
|
|
761
800
|
if len(annotations) > 0:
|
|
@@ -813,11 +852,11 @@ class ARXMLWriter(AbstractARXMLWriter):
|
|
|
813
852
|
self.writeARObjectAttributes(conditional_tag, props.conditional)
|
|
814
853
|
self.setAnnotations(conditional_tag, props.getAnnotations())
|
|
815
854
|
self.setChildElementOptionalRefType(conditional_tag, "BASE-TYPE-REF", props.getBaseTypeRef())
|
|
855
|
+
self.setChildElementOptionalRefType(conditional_tag, "SW-ADDR-METHOD-REF", props.getSwAddrMethodRef())
|
|
816
856
|
self.setChildElementOptionalLiteral(conditional_tag, "SW-CALIBRATION-ACCESS", props.getSwCalibrationAccess())
|
|
817
857
|
self.setChildElementOptionalRefType(conditional_tag, "COMPU-METHOD-REF", props.getCompuMethodRef())
|
|
818
858
|
self.setValueSpecification(conditional_tag, "INVALID-VALUE", props.getInvalidValue())
|
|
819
859
|
self.setChildElementOptionalFloatValue(conditional_tag, "STEP-SIZE", props.getStepSize())
|
|
820
|
-
self.setChildElementOptionalRefType(conditional_tag, "SW-ADDR-METHOD-REF", props.getSwAddrMethodRef())
|
|
821
860
|
self.setChildElementOptionalRefType(conditional_tag, "DATA-CONSTR-REF", props.getDataConstrRef())
|
|
822
861
|
self.setChildElementOptionalRefType(conditional_tag, "IMPLEMENTATION-DATA-TYPE-REF", props.getImplementationDataTypeRef())
|
|
823
862
|
self.setSwCalprmAxisSet(conditional_tag, "SW-CALPRM-AXIS-SET", props.getSwCalprmAxisSet())
|
|
@@ -1538,7 +1577,7 @@ class ARXMLWriter(AbstractARXMLWriter):
|
|
|
1538
1577
|
else:
|
|
1539
1578
|
self.notImplemented("Unsupported Assigned Data <%s>" % type(data))
|
|
1540
1579
|
|
|
1541
|
-
def
|
|
1580
|
+
def writeNvBlockNeeds(self, element: ET.Element, needs: NvBlockNeeds):
|
|
1542
1581
|
child_element = ET.SubElement(element, "NV-BLOCK-NEEDS")
|
|
1543
1582
|
self.logger.debug("write NvBlockNeeds %s" % needs.getShortName())
|
|
1544
1583
|
self.writeIdentifiable(child_element, needs)
|
|
@@ -1562,23 +1601,26 @@ class ARXMLWriter(AbstractARXMLWriter):
|
|
|
1562
1601
|
self.setChildElementOptionalPositiveInteger(child_element, "WRITING-FREQUENCY", needs.getWritingFrequency())
|
|
1563
1602
|
self.setChildElementOptionalLiteral(child_element, "WRITING-PRIORITY", needs.getWritingPriority())
|
|
1564
1603
|
|
|
1565
|
-
def
|
|
1604
|
+
def writeDiagnosticCapabilityElement(self, element: ET.Element, needs: DiagnosticCapabilityElement):
|
|
1605
|
+
self.writeIdentifiable(element, needs)
|
|
1606
|
+
|
|
1607
|
+
def writeDiagnosticCommunicationManagerNeeds(self, element: ET.Element, needs: DiagnosticCommunicationManagerNeeds):
|
|
1566
1608
|
child_element = ET.SubElement(element, "DIAGNOSTIC-COMMUNICATION-MANAGER-NEEDS")
|
|
1567
1609
|
self.logger.debug("write DiagnosticCommunicationManagerNeeds %s" % needs.getShortName())
|
|
1568
|
-
self.
|
|
1610
|
+
self.writeDiagnosticCapabilityElement(child_element, needs)
|
|
1569
1611
|
self.setChildElementOptionalLiteral(child_element, "SERVICE-REQUEST-CALLBACK-TYPE", needs.getServiceRequestCallbackType())
|
|
1570
1612
|
|
|
1571
|
-
def
|
|
1613
|
+
def writeDiagnosticRoutineNeeds(self, element: ET.Element, needs: DiagnosticRoutineNeeds):
|
|
1572
1614
|
child_element = ET.SubElement(element, "DIAGNOSTIC-ROUTINE-NEEDS")
|
|
1573
1615
|
self.logger.debug("write DiagnosticRoutineNeeds %s" % needs.getShortName())
|
|
1574
|
-
self.
|
|
1616
|
+
self.writeDiagnosticCapabilityElement(child_element, needs)
|
|
1575
1617
|
self.setChildElementOptionalLiteral(child_element, "DIAG-ROUTINE-TYPE", needs.getDiagRoutineType())
|
|
1576
1618
|
self.setChildElementOptionalIntegerValue(child_element, "RID-NUMBER", needs.getRidNumber())
|
|
1577
1619
|
|
|
1578
|
-
def
|
|
1620
|
+
def writeDiagnosticValueNeeds(self, element: ET.Element, needs: DiagnosticValueNeeds):
|
|
1579
1621
|
child_element = ET.SubElement(element, "DIAGNOSTIC-VALUE-NEEDS")
|
|
1580
1622
|
self.logger.debug("write DiagnosticValueNeeds %s" % needs.getShortName())
|
|
1581
|
-
self.
|
|
1623
|
+
self.writeDiagnosticCapabilityElement(child_element, needs)
|
|
1582
1624
|
self.setChildElementOptionalPositiveInteger(child_element, "DATA-LENGTH", needs.getDataLength())
|
|
1583
1625
|
self.setChildElementOptionalLiteral(child_element, "DIAGNOSTIC-VALUE-ACCESS", needs.getDiagnosticValueAccess())
|
|
1584
1626
|
self.setChildElementOptionalIntegerValue(child_element, "DID-NUMBER", needs.getDidNumber())
|
|
@@ -1587,7 +1629,7 @@ class ARXMLWriter(AbstractARXMLWriter):
|
|
|
1587
1629
|
|
|
1588
1630
|
def setDiagEventDebounceMonitorInternal(self, element: ET.Element, algorithm: DiagEventDebounceMonitorInternal):
|
|
1589
1631
|
child_element = ET.SubElement(element, "DIAG-EVENT-DEBOUNCE-MONITOR-INTERNAL")
|
|
1590
|
-
self.
|
|
1632
|
+
self.writeDiagnosticCapabilityElement(child_element, algorithm)
|
|
1591
1633
|
|
|
1592
1634
|
def writeDiagEventDebounceAlgorithm(self, element: ET.Element, needs: DiagnosticEventNeeds):
|
|
1593
1635
|
algorithm = needs.getDiagEventDebounceAlgorithm()
|
|
@@ -1598,52 +1640,61 @@ class ARXMLWriter(AbstractARXMLWriter):
|
|
|
1598
1640
|
else:
|
|
1599
1641
|
self.notImplemented("Unsupported DiagEventDebounceAlgorithm <%s>" % type(algorithm))
|
|
1600
1642
|
|
|
1601
|
-
def
|
|
1643
|
+
def writeDiagnosticEventNeeds(self, element: ET.Element, needs: DiagnosticEventNeeds):
|
|
1644
|
+
# self.logger.debug("Write DiagnosticEventNeeds %s" % needs.getShortName())
|
|
1602
1645
|
child_element = ET.SubElement(element, "DIAGNOSTIC-EVENT-NEEDS")
|
|
1603
|
-
self.
|
|
1604
|
-
self.writeIdentifiable(child_element, needs)
|
|
1646
|
+
self.writeDiagnosticCapabilityElement(child_element, needs)
|
|
1605
1647
|
self.writeDiagEventDebounceAlgorithm(child_element, needs)
|
|
1606
1648
|
self.setChildElementOptionalLiteral(child_element, "DTC-KIND", needs.getDtcKind())
|
|
1607
1649
|
self.setChildElementOptionalIntegerValue(child_element, "UDS-DTC-NUMBER", needs.getUdsDtcNumber())
|
|
1608
1650
|
|
|
1609
|
-
def
|
|
1651
|
+
def writeDiagnosticEventInfoNeeds(self, element: ET.Element, needs: DiagnosticEventInfoNeeds):
|
|
1652
|
+
# self.logger.debug("Write DiagnosticEventNeeds %s" % needs.getShortName())
|
|
1610
1653
|
child_element = ET.SubElement(element, "DIAGNOSTIC-EVENT-INFO-NEEDS")
|
|
1611
|
-
self.
|
|
1612
|
-
self.
|
|
1654
|
+
self.writeDiagnosticCapabilityElement(child_element, needs)
|
|
1655
|
+
self.setChildElementOptionalLiteral(child_element, "DTC-KIND", needs.getDtcKind())
|
|
1613
1656
|
self.setChildElementOptionalPositiveInteger(child_element, "UDS-DTC-NUMBER", needs.getUdsDtcNumber())
|
|
1614
1657
|
|
|
1615
|
-
def
|
|
1658
|
+
def writeCryptoServiceNeeds(self, element: ET.Element, needs: CryptoServiceNeeds):
|
|
1659
|
+
# self.logger.debug("Write CryptoServiceNeeds %s" % needs.getShortName())
|
|
1616
1660
|
child_element = ET.SubElement(element, "CRYPTO-SERVICE-NEEDS")
|
|
1617
|
-
self.logger.debug("write CryptoServiceNeeds %s" % needs.getShortName())
|
|
1618
1661
|
self.writeIdentifiable(child_element, needs)
|
|
1619
1662
|
self.setChildElementOptionalPositiveInteger(child_element, "MAXIMUM-KEY-LENGTH", needs.getMaximumKeyLength())
|
|
1620
1663
|
|
|
1621
|
-
def
|
|
1664
|
+
def writeEcuStateMgrUserNeeds(self, element: ET.Element, needs: EcuStateMgrUserNeeds):
|
|
1665
|
+
# self.logger.debug("write EcuStateMgrUserNeeds %s" % needs.getShortName())
|
|
1622
1666
|
child_element = ET.SubElement(element, "ECU-STATE-MGR-USER-NEEDS")
|
|
1623
|
-
self.logger.debug("write EcuStateMgrUserNeeds %s" % needs.getShortName())
|
|
1624
1667
|
self.writeIdentifiable(child_element, needs)
|
|
1625
1668
|
|
|
1669
|
+
def writeDtcStatusChangeNotificationNeeds(self, element: ET.Element, needs: DtcStatusChangeNotificationNeeds):
|
|
1670
|
+
# self.logger.debug("Write DtcStatusChangeNotificationNeeds %s" % needs.getShortName())
|
|
1671
|
+
child_element = ET.SubElement(element, "DTC-STATUS-CHANGE-NOTIFICATION-NEEDS")
|
|
1672
|
+
self.writeDiagnosticCapabilityElement(child_element, needs)
|
|
1673
|
+
self.setChildElementOptionalLiteral(child_element, "DTC-FORMAT-TYPE", needs.getDtcFormatType())
|
|
1674
|
+
|
|
1626
1675
|
def writeSwcServiceDependencyServiceNeeds(self, element: ET.Element, parent: SwcServiceDependency):
|
|
1627
1676
|
needs = parent.getServiceNeeds()
|
|
1628
1677
|
if len(needs) > 0:
|
|
1629
1678
|
child_element = ET.SubElement(element, "SERVICE-NEEDS")
|
|
1630
1679
|
for need in needs:
|
|
1631
1680
|
if isinstance(need, NvBlockNeeds):
|
|
1632
|
-
self.
|
|
1681
|
+
self.writeNvBlockNeeds(child_element, need)
|
|
1633
1682
|
elif isinstance(need, DiagnosticCommunicationManagerNeeds):
|
|
1634
|
-
self.
|
|
1683
|
+
self.writeDiagnosticCommunicationManagerNeeds(child_element, need)
|
|
1635
1684
|
elif isinstance(need, DiagnosticRoutineNeeds):
|
|
1636
|
-
self.
|
|
1685
|
+
self.writeDiagnosticRoutineNeeds(child_element, need)
|
|
1637
1686
|
elif isinstance(need, DiagnosticValueNeeds):
|
|
1638
|
-
self.
|
|
1687
|
+
self.writeDiagnosticValueNeeds(child_element, need)
|
|
1639
1688
|
elif isinstance(need, DiagnosticEventNeeds):
|
|
1640
|
-
self.
|
|
1689
|
+
self.writeDiagnosticEventNeeds(child_element, need)
|
|
1641
1690
|
elif isinstance(need, DiagnosticEventInfoNeeds):
|
|
1642
|
-
self.
|
|
1691
|
+
self.writeDiagnosticEventInfoNeeds(child_element, need)
|
|
1643
1692
|
elif isinstance(need, CryptoServiceNeeds):
|
|
1644
|
-
self.
|
|
1693
|
+
self.writeCryptoServiceNeeds(child_element, need)
|
|
1645
1694
|
elif isinstance(need, EcuStateMgrUserNeeds):
|
|
1646
|
-
self.
|
|
1695
|
+
self.writeEcuStateMgrUserNeeds(child_element, need)
|
|
1696
|
+
elif isinstance(need, DtcStatusChangeNotificationNeeds):
|
|
1697
|
+
self.writeDtcStatusChangeNotificationNeeds(child_element, need)
|
|
1647
1698
|
else:
|
|
1648
1699
|
self.notImplemented("Unsupported service needs <%s>" % type(need))
|
|
1649
1700
|
|
|
@@ -1743,8 +1794,8 @@ class ARXMLWriter(AbstractARXMLWriter):
|
|
|
1743
1794
|
self.setChildElementOptionalLiteral(artifact_desc_tag, "SHORT-LABEL", artifact_desc.short_label)
|
|
1744
1795
|
self.setChildElementOptionalLiteral(artifact_desc_tag, "CATEGORY", artifact_desc.category)
|
|
1745
1796
|
|
|
1746
|
-
def
|
|
1747
|
-
self.logger.debug("
|
|
1797
|
+
def writeCode(self, element: ET.SubElement, code_desc: Code):
|
|
1798
|
+
# self.logger.debug("Write Code %s" % code_desc.getShortName())
|
|
1748
1799
|
child_element = ET.SubElement(element, "CODE")
|
|
1749
1800
|
self.writeIdentifiable(child_element, code_desc)
|
|
1750
1801
|
self.writeArtifactDescriptor(child_element, code_desc)
|
|
@@ -1755,7 +1806,7 @@ class ARXMLWriter(AbstractARXMLWriter):
|
|
|
1755
1806
|
child_element = ET.SubElement(element, "CODE-DESCRIPTORS")
|
|
1756
1807
|
for desc in descs:
|
|
1757
1808
|
if isinstance(desc, Code):
|
|
1758
|
-
self.
|
|
1809
|
+
self.writeCode(child_element, desc)
|
|
1759
1810
|
else:
|
|
1760
1811
|
self.notImplemented("Unsupported Code Descriptor <%s>" % type(desc))
|
|
1761
1812
|
|
|
@@ -2035,8 +2086,36 @@ class ARXMLWriter(AbstractARXMLWriter):
|
|
|
2035
2086
|
cond_tag = ET.SubElement(child_element, "TRIGGER-REF-CONDITIONAL")
|
|
2036
2087
|
self.setChildElementOptionalRefType(cond_tag, "TRIGGER-REF", ref)
|
|
2037
2088
|
|
|
2089
|
+
def writeBswModuleEntityActivationPointRefs(self, element: ET.Element, entity: BswModuleEntity):
|
|
2090
|
+
refs = entity.getActivationPointRefs()
|
|
2091
|
+
if len(refs) > 0:
|
|
2092
|
+
child_element = ET.SubElement(element, "ACTIVATION-POINTS")
|
|
2093
|
+
for ref in refs:
|
|
2094
|
+
cond_tag = ET.SubElement(child_element, "BSW-INTERNAL-TRIGGERING-POINT-REF-CONDITIONAL")
|
|
2095
|
+
self.setChildElementOptionalRefType(cond_tag, "BSW-INTERNAL-TRIGGERING-POINT-REF", ref)
|
|
2096
|
+
|
|
2097
|
+
def writeBswModuleCallPoint(self, element: ET.Element, point: BswModuleCallPoint):
|
|
2098
|
+
self.writeReferrable(element, point)
|
|
2099
|
+
|
|
2100
|
+
def writeBswAsynchronousServerCallPoint(self, element: ET.Element, point: BswAsynchronousServerCallPoint):
|
|
2101
|
+
child_element = ET.SubElement(element, "BSW-ASYNCHRONOUS-SERVER-CALL-POINT")
|
|
2102
|
+
self.writeBswModuleCallPoint(child_element, point)
|
|
2103
|
+
self.setChildElementOptionalRefType(child_element, "CALLED-ENTRY-REF", point.getCalledEntryRef())
|
|
2104
|
+
|
|
2105
|
+
def writeBswModuleEntityCallPoints(self, element: ET.Element, entity: BswModuleEntity):
|
|
2106
|
+
points = entity.getCallPoints()
|
|
2107
|
+
if len(points) > 0:
|
|
2108
|
+
child_element = ET.SubElement(element, "CALL-POINTS")
|
|
2109
|
+
for point in points:
|
|
2110
|
+
if isinstance(point, BswAsynchronousServerCallPoint):
|
|
2111
|
+
self.writeBswAsynchronousServerCallPoint(child_element, point)
|
|
2112
|
+
else:
|
|
2113
|
+
self.notImplemented("Unsupported Call Point <%s>" % type(point))
|
|
2114
|
+
|
|
2038
2115
|
def writeBswModuleEntity(self, element: ET.Element, entity: BswModuleEntity):
|
|
2039
2116
|
self.writeExecutableEntity(element, entity)
|
|
2117
|
+
self.writeBswModuleEntityActivationPointRefs(element, entity)
|
|
2118
|
+
self.writeBswModuleEntityCallPoints(element, entity)
|
|
2040
2119
|
self.writeBswModuleEntityDataSendPoints(element, entity)
|
|
2041
2120
|
self.writeBswModuleEntityDataReceivePoints(element, entity)
|
|
2042
2121
|
self.setChildElementOptionalRefType(element, "IMPLEMENTED-ENTRY-REF", entity.implementedEntryRef)
|
|
@@ -2060,7 +2139,7 @@ class ARXMLWriter(AbstractARXMLWriter):
|
|
|
2060
2139
|
self.setChildElementOptionalLiteral(child_element, "INTERRUPT-CATEGORY", entity.getInterruptCategory())
|
|
2061
2140
|
self.setChildElementOptionalLiteral(child_element, "INTERRUPT-SOURCE", entity.getInterruptSource())
|
|
2062
2141
|
|
|
2063
|
-
def
|
|
2142
|
+
def writeBswInternalBehaviorEntities(self, element: ET.Element, parent: BswInternalBehavior):
|
|
2064
2143
|
entities = parent.getBswModuleEntities()
|
|
2065
2144
|
if len(entities) > 0:
|
|
2066
2145
|
child_element = ET.SubElement(element, "ENTITYS")
|
|
@@ -2118,7 +2197,7 @@ class ARXMLWriter(AbstractARXMLWriter):
|
|
|
2118
2197
|
self.writeBswEvent(child_element, event)
|
|
2119
2198
|
self.setChildElementOptionalRefType(child_element, "ENTRY-REF", event.getEntryRef())
|
|
2120
2199
|
|
|
2121
|
-
def
|
|
2200
|
+
def writeBswInternalBehaviorEvents(self, element: ET.Element, parent: BswInternalBehavior):
|
|
2122
2201
|
events = parent.getBswEvents()
|
|
2123
2202
|
if len(events) > 0:
|
|
2124
2203
|
child_element = ET.SubElement(element, "EVENTS")
|
|
@@ -2183,11 +2262,26 @@ class ARXMLWriter(AbstractARXMLWriter):
|
|
|
2183
2262
|
else:
|
|
2184
2263
|
self.notImplemented("Unsupported Reception Policies <%s>" % type(policy))
|
|
2185
2264
|
|
|
2265
|
+
def writeBswInternalTriggeringPoint(self, element: ET.Element, point: BswInternalTriggeringPoint):
|
|
2266
|
+
child_element = ET.SubElement(element, "BSW-INTERNAL-TRIGGERING-POINT")
|
|
2267
|
+
self.writeIdentifiable(child_element, point)
|
|
2268
|
+
|
|
2269
|
+
def writeBswInternalBehaviorInternalTriggeringPoints(self, element: ET.Element, behavior: BswInternalBehavior):
|
|
2270
|
+
points = behavior.getInternalTriggeringPoints()
|
|
2271
|
+
if len(points) > 0:
|
|
2272
|
+
child_element = ET.SubElement(element, "INTERNAL-TRIGGERING-POINTS")
|
|
2273
|
+
for point in points:
|
|
2274
|
+
if isinstance(point, BswInternalTriggeringPoint):
|
|
2275
|
+
self.writeBswInternalTriggeringPoint(child_element, point)
|
|
2276
|
+
else:
|
|
2277
|
+
self.notImplemented("Unsupported Internal Triggering Points <%s>" % type(point))
|
|
2278
|
+
|
|
2186
2279
|
def writeBswInternalBehavior(self, element: ET.Element, behavior: BswInternalBehavior):
|
|
2187
2280
|
child_element = ET.SubElement(element, "BSW-INTERNAL-BEHAVIOR")
|
|
2188
2281
|
self.writeInternalBehavior(child_element, behavior)
|
|
2189
|
-
self.
|
|
2190
|
-
self.
|
|
2282
|
+
self.writeBswInternalBehaviorInternalTriggeringPoints(child_element, behavior)
|
|
2283
|
+
self.writeBswInternalBehaviorEntities(child_element, behavior)
|
|
2284
|
+
self.writeBswInternalBehaviorEvents(child_element, behavior)
|
|
2191
2285
|
self.writeBswInternalBehaviorModeSenderPolicy(child_element, behavior)
|
|
2192
2286
|
self.writeBswInternalBehaviorIncludedModeDeclarationGroupSets(child_element, behavior)
|
|
2193
2287
|
self.writeBswInternalBehaviorReceptionPolicies(child_element, behavior)
|
|
@@ -2245,7 +2339,35 @@ class ARXMLWriter(AbstractARXMLWriter):
|
|
|
2245
2339
|
self.writeVariableDataPrototype(child_element, data)
|
|
2246
2340
|
else:
|
|
2247
2341
|
self.notImplemented("Unsupported Required Data <%s>" % type(data))
|
|
2248
|
-
|
|
2342
|
+
|
|
2343
|
+
def writeBswModuleClientServerEntry(self, element: ET.Element, entry: BswModuleClientServerEntry):
|
|
2344
|
+
if entry is not None:
|
|
2345
|
+
child_element = ET.SubElement(element, "BSW-MODULE-CLIENT-SERVER-ENTRY")
|
|
2346
|
+
self.writeReferrable(child_element, entry)
|
|
2347
|
+
self.setChildElementOptionalRefType(child_element, "ENCAPSULATED-ENTRY-REF", entry.getEncapsulatedEntryRef())
|
|
2348
|
+
self.setChildElementOptionalBooleanValue(child_element, "IS-REENTRANT", entry.getIsReentrant())
|
|
2349
|
+
self.setChildElementOptionalBooleanValue(child_element, "IS-SYNCHRONOUS", entry.getIsSynchronous())
|
|
2350
|
+
|
|
2351
|
+
def writeBswModuleDescriptionProvidedClientServerEntries(self, element: ET.Element, desc: BswModuleDescription):
|
|
2352
|
+
entries = desc.getProvidedClientServerEntries()
|
|
2353
|
+
if len(entries) > 0:
|
|
2354
|
+
child_element = ET.SubElement(element, "PROVIDED-CLIENT-SERVER-ENTRYS")
|
|
2355
|
+
for entry in entries:
|
|
2356
|
+
if isinstance(entry, BswModuleClientServerEntry):
|
|
2357
|
+
self.writeBswModuleClientServerEntry(child_element, entry)
|
|
2358
|
+
else:
|
|
2359
|
+
self.notImplemented("Unsupported Provided Client Server Entry <%s>" % type(entry))
|
|
2360
|
+
|
|
2361
|
+
def writeBswModuleDescriptionRequiredClientServerEntries(self, element: ET.Element, desc: BswModuleDescription):
|
|
2362
|
+
entries = desc.getRequiredClientServerEntries()
|
|
2363
|
+
if len(entries) > 0:
|
|
2364
|
+
child_element = ET.SubElement(element, "REQUIRED-CLIENT-SERVER-ENTRYS")
|
|
2365
|
+
for entry in entries:
|
|
2366
|
+
if isinstance(entry, BswModuleClientServerEntry):
|
|
2367
|
+
self.writeBswModuleClientServerEntry(child_element, entry)
|
|
2368
|
+
else:
|
|
2369
|
+
self.notImplemented("Unsupported Provided Client Server Entry <%s>" % type(entry))
|
|
2370
|
+
|
|
2249
2371
|
def writeBswModuleDescription(self, element: ET.Element, desc: BswModuleDescription):
|
|
2250
2372
|
self.logger.debug("writeBswModuleDescription %s" % desc.getShortName())
|
|
2251
2373
|
child_element = ET.SubElement(element, "BSW-MODULE-DESCRIPTION")
|
|
@@ -2254,11 +2376,12 @@ class ARXMLWriter(AbstractARXMLWriter):
|
|
|
2254
2376
|
self.writeBswModuleDescriptionImplementedEntryRefs(child_element, desc)
|
|
2255
2377
|
self.writeBswModuleDescriptionProvidedModeGroups(child_element, desc)
|
|
2256
2378
|
self.writeBswModuleDescriptionRequiredModeGroups(child_element, desc)
|
|
2257
|
-
self.
|
|
2258
|
-
self.
|
|
2379
|
+
self.writeBswModuleDescriptionProvidedClientServerEntries(child_element, desc)
|
|
2380
|
+
self.writeBswModuleDescriptionRequiredClientServerEntries(child_element, desc)
|
|
2259
2381
|
self.writeBswModuleDescriptionProvidedDatas(child_element, desc)
|
|
2260
2382
|
self.writeBswModuleDescriptionRequiredDatas(child_element, desc)
|
|
2261
2383
|
self.writeBswModuleDescriptionInternalBehaviors(child_element, desc)
|
|
2384
|
+
self.writeBswModuleDescriptionReleasedTriggers(child_element, desc)
|
|
2262
2385
|
|
|
2263
2386
|
def setSwServiceArg(self, element: ET.Element, arg: SwServiceArg):
|
|
2264
2387
|
self.logger.debug("Set SwServiceArg <%s>" % arg.getShortName())
|
|
@@ -2315,8 +2438,8 @@ class ARXMLWriter(AbstractARXMLWriter):
|
|
|
2315
2438
|
self.setChildElementOptionalLiteral(element, "SHORT-LABEL", engineering_obj.short_label)
|
|
2316
2439
|
self.setChildElementOptionalLiteral(element, "CATEGORY", engineering_obj.category)
|
|
2317
2440
|
|
|
2318
|
-
def
|
|
2319
|
-
self.logger.debug("
|
|
2441
|
+
def writeAutosarEngineeringObject(self, element: ET.Element, obj: AutosarEngineeringObject):
|
|
2442
|
+
# self.logger.debug("write ArtifactDescriptor %s", obj.short_label)
|
|
2320
2443
|
child_element = ET.SubElement(element, "AUTOSAR-ENGINEERING-OBJECT")
|
|
2321
2444
|
self.writeEngineeringObject(child_element, obj)
|
|
2322
2445
|
|
|
@@ -2326,7 +2449,7 @@ class ARXMLWriter(AbstractARXMLWriter):
|
|
|
2326
2449
|
child_element = ET.SubElement(element, "ARTIFACT-DESCRIPTORS")
|
|
2327
2450
|
for artifact_desc in artifact_descs:
|
|
2328
2451
|
if isinstance(artifact_desc, AutosarEngineeringObject):
|
|
2329
|
-
self.
|
|
2452
|
+
self.writeAutosarEngineeringObject(child_element, artifact_desc)
|
|
2330
2453
|
else:
|
|
2331
2454
|
self.notImplemented("Unsupported Artifact descriptor <%s>" % type(artifact_desc))
|
|
2332
2455
|
|
|
@@ -3743,6 +3866,68 @@ class ARXMLWriter(AbstractARXMLWriter):
|
|
|
3743
3866
|
self.setChildElementOptionalIntegerValue(child_element, "WAKEUP-TX-ACTIVE", cluster.getWakeupTxActive())
|
|
3744
3867
|
self.setChildElementOptionalIntegerValue(child_element, "WAKEUP-TX-IDLE", cluster.getWakeupTxIdle())
|
|
3745
3868
|
|
|
3869
|
+
def writeCollectionElementRefs(self, element: ET.Element, collection: Collection):
|
|
3870
|
+
refs = collection.getElementRefs()
|
|
3871
|
+
if len(refs) > 0:
|
|
3872
|
+
child_element = ET.SubElement(element, "ELEMENT-REFS")
|
|
3873
|
+
for ref in refs:
|
|
3874
|
+
self.setChildElementOptionalRefType(child_element, "ELEMENT-REF", ref)
|
|
3875
|
+
|
|
3876
|
+
def writeCollectionSourceElementRefs(self, element: ET.Element, collection: Collection):
|
|
3877
|
+
refs = collection.getSourceElementRefs()
|
|
3878
|
+
if len(refs) > 0:
|
|
3879
|
+
child_element = ET.SubElement(element, "SOURCE-ELEMENT-REFS")
|
|
3880
|
+
for ref in refs:
|
|
3881
|
+
self.setChildElementOptionalRefType(child_element, "SOURCE-ELEMENT-REF", ref)
|
|
3882
|
+
|
|
3883
|
+
def writeCollection(self, element: ET.Element, collection: Collection):
|
|
3884
|
+
if collection is not None:
|
|
3885
|
+
child_element = ET.SubElement(element, "COLLECTION")
|
|
3886
|
+
self.writeARElement(child_element, collection)
|
|
3887
|
+
self.setChildElementOptionalLiteral(child_element, "AUTO-COLLECT", collection.getAutoCollect())
|
|
3888
|
+
self.setChildElementOptionalLiteral(child_element, "ELEMENT-ROLE", collection.getElementRole())
|
|
3889
|
+
self.writeCollectionElementRefs(child_element, collection)
|
|
3890
|
+
self.writeCollectionSourceElementRefs(child_element, collection)
|
|
3891
|
+
|
|
3892
|
+
def writeKeywordClassifications(self, element: ET.Element, keyword: Keyword):
|
|
3893
|
+
classifications = keyword.getClassifications()
|
|
3894
|
+
if len(classifications) > 0:
|
|
3895
|
+
child_element = ET.SubElement(element, "CLASSIFICATIONS")
|
|
3896
|
+
for classification in classifications:
|
|
3897
|
+
self.setChildElementOptionalLiteral(child_element, "CLASSIFICATION", classification)
|
|
3898
|
+
|
|
3899
|
+
def writeKeyword(self, element: ET.Element, keyword: Keyword):
|
|
3900
|
+
if keyword is not None:
|
|
3901
|
+
# self.logger.debug("Write Keyword <%s>" % keyword.getShortName())
|
|
3902
|
+
child_element = ET.SubElement(element, "KEYWORD")
|
|
3903
|
+
self.writeIdentifiable(child_element, keyword)
|
|
3904
|
+
self.setChildElementOptionalLiteral(child_element, "ABBR-NAME", keyword.getAbbrName())
|
|
3905
|
+
self.writeKeywordClassifications(child_element, keyword)
|
|
3906
|
+
|
|
3907
|
+
def writeKeywordSetKeywords(self, element: ET.Element, keyword_set: KeywordSet):
|
|
3908
|
+
keywords = keyword_set.getKeywords()
|
|
3909
|
+
if len(keywords) > 0:
|
|
3910
|
+
child_element = ET.SubElement(element, "KEYWORDS")
|
|
3911
|
+
for keyword in keywords:
|
|
3912
|
+
if isinstance(keyword, Keyword):
|
|
3913
|
+
self.writeKeyword(child_element, keyword)
|
|
3914
|
+
else:
|
|
3915
|
+
self.notImplemented("Unsupported Keyword <%s>" % type(keyword))
|
|
3916
|
+
|
|
3917
|
+
def writeKeywordSet(self, element: ET.Element, keyword_set: KeywordSet):
|
|
3918
|
+
if keyword_set is not None:
|
|
3919
|
+
self.logger.debug("Write KeywordSet <%s>" % keyword_set.getShortName())
|
|
3920
|
+
child_element = ET.SubElement(element, "KEYWORD-SET")
|
|
3921
|
+
self.writeARElement(child_element, keyword_set)
|
|
3922
|
+
self.writeKeywordSetKeywords(child_element, keyword_set)
|
|
3923
|
+
|
|
3924
|
+
def writePortPrototypeBlueprint(self, element: ET.Element, blueprint: PortPrototypeBlueprint):
|
|
3925
|
+
if blueprint is not None:
|
|
3926
|
+
self.logger.debug("Write PortPrototypeBlueprint <%s>" % blueprint.getShortName())
|
|
3927
|
+
child_element = ET.SubElement(element, "PORT-PROTOTYPE-BLUEPRINT")
|
|
3928
|
+
self.writeARElement(child_element, blueprint)
|
|
3929
|
+
self.setChildElementOptionalRefType(child_element, "INTERFACE-REF", blueprint.getInterfaceRef())
|
|
3930
|
+
|
|
3746
3931
|
def writeMacMulticastGroup(self, element: ET.Element, group: MacMulticastGroup):
|
|
3747
3932
|
if group is not None:
|
|
3748
3933
|
child_element = ET.SubElement(element, "MAC-MULTICAST-GROUP")
|
|
@@ -4231,6 +4416,7 @@ class ARXMLWriter(AbstractARXMLWriter):
|
|
|
4231
4416
|
self.setChildElementOptionalNumericalValue(child_element, "LENGTH-EXP", dimension.getLengthExp())
|
|
4232
4417
|
self.setChildElementOptionalNumericalValue(child_element, "LUMINOUS-INTENSITY-EXP", dimension.getLuminousIntensityExp())
|
|
4233
4418
|
self.setChildElementOptionalNumericalValue(child_element, "MASS-EXP", dimension.getMassExp())
|
|
4419
|
+
self.setChildElementOptionalNumericalValue(child_element, "MOLAR-AMOUNT-EXP", dimension.getMolarAmountExp())
|
|
4234
4420
|
self.setChildElementOptionalNumericalValue(child_element, "TEMPERATURE-EXP", dimension.getTemperatureExp())
|
|
4235
4421
|
self.setChildElementOptionalNumericalValue(child_element, "TIME-EXP", dimension.getTimeExp())
|
|
4236
4422
|
self.setChildElementOptionalNumericalValue(child_element, "CURRENT-EXP", dimension.getCurrentExp())
|
|
@@ -4269,19 +4455,43 @@ class ARXMLWriter(AbstractARXMLWriter):
|
|
|
4269
4455
|
for mapping in mappings:
|
|
4270
4456
|
self.setDataPrototypeMapping(child_element, mapping)
|
|
4271
4457
|
|
|
4272
|
-
def
|
|
4273
|
-
self.logger.debug("
|
|
4458
|
+
def writeVariableAndParameterInterfaceMapping(self, element: ET.Element, mapping: VariableAndParameterInterfaceMapping):
|
|
4459
|
+
# self.logger.debug("Write VariableAndParameterInterfaceMapping %s" % mapping.getShortName())
|
|
4274
4460
|
child_element = ET.SubElement(element, "VARIABLE-AND-PARAMETER-INTERFACE-MAPPING")
|
|
4275
4461
|
self.writeIdentifiable(child_element, mapping)
|
|
4276
4462
|
self.setDataPrototypeMappings(child_element, "DATA-MAPPINGS", mapping.getDataMappings())
|
|
4277
4463
|
|
|
4464
|
+
def writeClientServerOperationMapping(self, element: ET.Element, mapping: ClientServerOperationMapping):
|
|
4465
|
+
child_element = ET.SubElement(element, "CLIENT-SERVER-OPERATION-MAPPING")
|
|
4466
|
+
self.setChildElementOptionalRefType(child_element, "FIRST-OPERATION-REF", mapping.getFirstOperationRef())
|
|
4467
|
+
self.setChildElementOptionalRefType(child_element, "SECOND-OPERATION-REF", mapping.getSecondOperationRef())
|
|
4468
|
+
|
|
4469
|
+
def writeClientServerInterfaceMappingOperationMappings(self, element: ET.Element, mapping: ClientServerInterfaceMapping):
|
|
4470
|
+
operation_mappings = mapping.getOperationMappings()
|
|
4471
|
+
if len(operation_mappings) > 0:
|
|
4472
|
+
child_element = ET.SubElement(element, "OPERATION-MAPPINGS")
|
|
4473
|
+
for operation_mapping in operation_mappings:
|
|
4474
|
+
if isinstance(operation_mapping, ClientServerOperationMapping):
|
|
4475
|
+
self.writeClientServerOperationMapping(child_element, operation_mapping)
|
|
4476
|
+
else:
|
|
4477
|
+
self.notImplemented("Unsupported Operation Mapping <%s>" % type(operation_mapping))
|
|
4478
|
+
|
|
4479
|
+
def writeClientServerInterfaceMapping(self, element: ET.Element, mapping: ClientServerInterfaceMapping):
|
|
4480
|
+
# self.logger.debug("Read ClientServerInterfaceMapping %s" % mapping.getShortName())
|
|
4481
|
+
if mapping is not None:
|
|
4482
|
+
child_element = ET.SubElement(element, "CLIENT-SERVER-INTERFACE-MAPPING")
|
|
4483
|
+
self.writeIdentifiable(child_element, mapping)
|
|
4484
|
+
self.writeClientServerInterfaceMappingOperationMappings(child_element, mapping)
|
|
4485
|
+
|
|
4278
4486
|
def writePortInterfaceMappings(self, element: ET.Element, mapping_set: PortInterfaceMappingSet):
|
|
4279
4487
|
mappings = mapping_set.getPortInterfaceMappings()
|
|
4280
4488
|
if len(mappings) > 0:
|
|
4281
4489
|
child_element = ET.SubElement(element, "PORT-INTERFACE-MAPPINGS")
|
|
4282
4490
|
for mapping in mappings:
|
|
4283
4491
|
if isinstance(mapping, VariableAndParameterInterfaceMapping):
|
|
4284
|
-
self.
|
|
4492
|
+
self.writeVariableAndParameterInterfaceMapping(child_element, mapping)
|
|
4493
|
+
elif isinstance(mapping, ClientServerInterfaceMapping):
|
|
4494
|
+
self.writeClientServerInterfaceMapping(child_element, mapping)
|
|
4285
4495
|
else:
|
|
4286
4496
|
self.notImplemented("Unsupported PortInterfaceMapping <%s>" % type(mapping))
|
|
4287
4497
|
|
|
@@ -4530,10 +4740,47 @@ class ARXMLWriter(AbstractARXMLWriter):
|
|
|
4530
4740
|
child_element = ET.SubElement(element, "ETHERNET-FRAME")
|
|
4531
4741
|
self.writeFrame(child_element, frame)
|
|
4532
4742
|
|
|
4533
|
-
def
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
|
|
4743
|
+
def setLifeCyclePeriod(self, element: ET.Element, key: str, period: LifeCyclePeriod):
|
|
4744
|
+
if period is not None:
|
|
4745
|
+
child_element = ET.SubElement(element, key)
|
|
4746
|
+
self.setChildElementOptionalRevisionLabelString(child_element, "AR-RELEASE-VERSION", period.getArReleaseVersion())
|
|
4747
|
+
|
|
4748
|
+
def writeLifeCycleInfoUseInsteadRefs(self, element: ET.Element, info: LifeCycleInfo):
|
|
4749
|
+
refs = info.getUseInsteadRefs()
|
|
4750
|
+
if len(refs) > 0:
|
|
4751
|
+
child_element = ET.SubElement(element, "USE-INSTEAD-REFS")
|
|
4752
|
+
for ref in refs:
|
|
4753
|
+
self.setChildElementOptionalRefType(child_element, "USE-INSTEAD-REF", ref)
|
|
4754
|
+
|
|
4755
|
+
def writeLifeCycleInfo(self, element: ET.Element, info: LifeCycleInfo):
|
|
4756
|
+
if info is not None:
|
|
4757
|
+
child_element = ET.SubElement(element, "LIFE-CYCLE-INFO")
|
|
4758
|
+
self.writeARObjectAttributes(child_element, info)
|
|
4759
|
+
self.setChildElementOptionalRefType(child_element, "LC-OBJECT-REF", info.getLcObjectRef())
|
|
4760
|
+
self.setChildElementOptionalRefType(child_element, "LC-STATE-REF", info.getLcStateRef())
|
|
4761
|
+
self.setLifeCyclePeriod(child_element, "PERIOD-BEGIN", info.getPeriodBegin())
|
|
4762
|
+
self.writeDocumentationBlock(child_element, "REMARK", info.getRemark())
|
|
4763
|
+
self.writeLifeCycleInfoUseInsteadRefs(child_element, info)
|
|
4764
|
+
|
|
4765
|
+
def writeLifeCycleInfoSetLifeCycleInfos(self, element: ET.Element, info_set: LifeCycleInfoSet):
|
|
4766
|
+
infos = info_set.getLifeCycleInfos()
|
|
4767
|
+
if len(infos) > 0:
|
|
4768
|
+
child_element = ET.SubElement(element, "LIFE-CYCLE-INFOS")
|
|
4769
|
+
for info in infos:
|
|
4770
|
+
if isinstance(info, LifeCycleInfo):
|
|
4771
|
+
self.writeLifeCycleInfo(child_element, info)
|
|
4772
|
+
else:
|
|
4773
|
+
self.notImplemented("Unsupported Life Cycle Info <%s>" % type(info))
|
|
4774
|
+
|
|
4775
|
+
def writeLifeCycleInfoSet(self, element: ET.Element, info_set: LifeCycleInfoSet):
|
|
4776
|
+
if info_set is not None:
|
|
4777
|
+
self.logger.debug("Write LifeCycleInfoSet %s" % info_set.getShortName())
|
|
4778
|
+
child_element = ET.SubElement(element, "LIFE-CYCLE-INFO-SET")
|
|
4779
|
+
self.writeIdentifiable(child_element, info_set)
|
|
4780
|
+
self.setChildElementOptionalRefType(child_element, "DEFAULT-LC-STATE-REF", info_set.getDefaultLcStateRef())
|
|
4781
|
+
self.writeLifeCycleInfoSetLifeCycleInfos(child_element, info_set)
|
|
4782
|
+
self.setChildElementOptionalRefType(child_element, "USED-LIFE-CYCLE-STATE-DEFINITION-GROUP-REF",
|
|
4783
|
+
info_set.getUsedLifeCycleStateDefinitionGroupRef())
|
|
4537
4784
|
|
|
4538
4785
|
def writeDiagnosticConnectionFunctionalRequestRefs(self, element: ET.Element, connection: DiagnosticConnection):
|
|
4539
4786
|
refs = connection.getFunctionalRequestRefs()
|
|
@@ -5191,6 +5438,12 @@ class ARXMLWriter(AbstractARXMLWriter):
|
|
|
5191
5438
|
self.writeSystemSignalGroup(element, ar_element)
|
|
5192
5439
|
elif isinstance(ar_element, FlexrayCluster):
|
|
5193
5440
|
self.writeFlexrayCluster(element, ar_element)
|
|
5441
|
+
elif isinstance(ar_element, Collection):
|
|
5442
|
+
self.writeCollection(element, ar_element)
|
|
5443
|
+
elif isinstance(ar_element, KeywordSet):
|
|
5444
|
+
self.writeKeywordSet(element, ar_element)
|
|
5445
|
+
elif isinstance(ar_element, PortPrototypeBlueprint):
|
|
5446
|
+
self.writePortPrototypeBlueprint(element, ar_element)
|
|
5194
5447
|
else:
|
|
5195
5448
|
self.notImplemented("Unsupported Elements of ARPackage <%s>" % type(ar_element))
|
|
5196
5449
|
|