armodel 1.6.2__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.
Files changed (170) hide show
  1. armodel/cli/arxml_dump_cli.py +13 -10
  2. armodel/cli/arxml_format_cli.py +1 -2
  3. armodel/cli/connector2xlsx_cli.py +2 -3
  4. armodel/cli/connector_update_cli.py +2 -5
  5. armodel/cli/memory_section_cli.py +2 -2
  6. armodel/cli/swc_list_cli.py +2 -3
  7. armodel/cli/system_signal_cli.py +2 -2
  8. armodel/lib/sw_component.py +3 -3
  9. armodel/lib/system_signal.py +3 -5
  10. armodel/models/{m2/autosar_templates/autosar_top_level_structure.py → M2/AUTOSARTemplates/AutosarTopLevelStructure.py} +5 -7
  11. armodel/models/{bsw_module_template.py → M2/AUTOSARTemplates/BswModuleTemplate/BswBehavior.py} +113 -140
  12. armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswImplementation.py +60 -0
  13. armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswInterfaces.py +52 -0
  14. armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswOverview.py +77 -0
  15. armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/__init__.py +4 -0
  16. armodel/models/M2/AUTOSARTemplates/CommonStructure/Implementation.py +238 -0
  17. armodel/models/{m2/autosar_templates/common_structure/implementation_data_types.py → M2/AUTOSARTemplates/CommonStructure/ImplementationDataTypes.py} +7 -6
  18. armodel/models/M2/AUTOSARTemplates/CommonStructure/InternalBehavior.py +119 -0
  19. armodel/models/M2/AUTOSARTemplates/CommonStructure/ModeDeclaration.py +96 -0
  20. armodel/models/M2/AUTOSARTemplates/CommonStructure/ResourceConsumption/MemorySectionUsage.py +69 -0
  21. armodel/models/M2/AUTOSARTemplates/CommonStructure/ResourceConsumption/__init__.py +20 -0
  22. armodel/models/{service_needs.py → M2/AUTOSARTemplates/CommonStructure/ServiceNeeds.py} +13 -9
  23. armodel/models/M2/AUTOSARTemplates/CommonStructure/SwcBswMapping.py +35 -0
  24. armodel/models/M2/AUTOSARTemplates/CommonStructure/SwcInternalBehavior/ModeDeclarationGroup.py +24 -0
  25. armodel/models/M2/AUTOSARTemplates/CommonStructure/Timing/TimingConstraint/ExecutionOrderConstraint.py +45 -0
  26. armodel/models/M2/AUTOSARTemplates/CommonStructure/Timing/TimingConstraint/TimingConstraint.py +24 -0
  27. armodel/models/M2/AUTOSARTemplates/CommonStructure/Timing/TimingConstraint/TimingExtensions.py +33 -0
  28. armodel/models/M2/AUTOSARTemplates/CommonStructure/TriggerDeclaration.py +9 -0
  29. armodel/models/{m2/autosar_templates/common_structure → M2/AUTOSARTemplates/CommonStructure}/__init__.py +4 -3
  30. armodel/models/{m2/autosar_templates/ecuc_description_template.py → M2/AUTOSARTemplates/ECUCDescriptionTemplate.py} +6 -7
  31. armodel/models/{m2/autosar_templates/generic_structure/abstract_structure.py → M2/AUTOSARTemplates/GenericStructure/AbstractStructure.py} +25 -5
  32. armodel/models/{m2/autosar_templates/generic_structure/ar_package.py → M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ARPackage.py} +41 -29
  33. armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ArObject.py +16 -0
  34. armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ElementCollection.py +1 -0
  35. armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/EngineeringObject.py +52 -0
  36. armodel/models/{general_structure.py → M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/Identifiable.py} +42 -159
  37. armodel/models/{ar_object.py → M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/PrimitiveTypes.py} +179 -71
  38. armodel/models/M2/AUTOSARTemplates/GenericStructure/__init__.py +1 -0
  39. armodel/models/{m2/autosar_templates/sw_component_template/communication.py → M2/AUTOSARTemplates/SWComponentTemplate/Communication.py} +22 -5
  40. armodel/models/{m2/autosar_templates/sw_component_template/components/instance_refs.py → M2/AUTOSARTemplates/SWComponentTemplate/Components/InstanceRefs.py} +2 -4
  41. armodel/models/{m2/autosar_templates/sw_component_template/components → M2/AUTOSARTemplates/SWComponentTemplate/Components}/__init__.py +114 -10
  42. armodel/models/{m2/autosar_templates/sw_component_template/composition/instance_refs.py → M2/AUTOSARTemplates/SWComponentTemplate/Composition/InstanceRefs.py} +2 -5
  43. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Composition/__init__.py +96 -0
  44. armodel/models/{m2/autosar_templates/sw_component_template/data_type/data_prototypes.py → M2/AUTOSARTemplates/SWComponentTemplate/Datatype/DataPrototypes.py} +24 -8
  45. armodel/models/{datatype.py → M2/AUTOSARTemplates/SWComponentTemplate/Datatype/Datatypes.py} +16 -73
  46. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/EndToEndProtection.py +177 -0
  47. armodel/models/{m2/autosar_templates/sw_component_template/port_interface/instance_refs.py → M2/AUTOSARTemplates/SWComponentTemplate/PortInterface/InstanceRefs.py} +2 -2
  48. armodel/models/{m2/autosar_templates/sw_component_template/port_interface → M2/AUTOSARTemplates/SWComponentTemplate/PortInterface}/__init__.py +10 -6
  49. armodel/models/{rpt_scenario.py → M2/AUTOSARTemplates/SWComponentTemplate/RPTScenario.py} +4 -6
  50. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcImplementation.py +34 -0
  51. armodel/models/{m2/autosar_templates/sw_component_template/swc_internal_behavior/access_count.py → M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/AccessCount.py} +2 -2
  52. armodel/models/{m2/autosar_templates/sw_component_template/swc_internal_behavior/data_elements.py → M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/DataElements.py} +7 -5
  53. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/IncludedDataTypes.py +24 -0
  54. armodel/models/{m2/autosar_templates/sw_component_template/swc_internal_behavior/instance_refs_usage.py → M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/InstanceRefsUsage.py} +3 -3
  55. armodel/models/{m2/autosar_templates/sw_component_template/swc_internal_behavior/mode_declaration_group.py → M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ModeDeclarationGroup.py} +4 -4
  56. armodel/models/{per_instance_memory.py → M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/PerInstanceMemory.py} +5 -6
  57. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/PortAPIOptions.py +86 -0
  58. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/RTEEvents.py +174 -0
  59. armodel/models/{m2/autosar_templates/sw_component_template/swc_internal_behavior/server_call.py → M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ServerCall.py} +3 -4
  60. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ServiceMapping.py +57 -0
  61. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/Trigger.py +8 -0
  62. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/__init__.py +358 -0
  63. armodel/models/{m2/autosar_templates/system_template/data_mapping.py → M2/AUTOSARTemplates/SystemTemplate/DataMapping.py} +2 -3
  64. armodel/models/{fibex/can_communication.py → M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Can/CanCommunication.py} +3 -3
  65. armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Ethernet/EthernetFrame.py +14 -0
  66. armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Ethernet/ServiceInstances.py +116 -0
  67. armodel/models/{fibex/lin_communication.py → M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Lin/LinCommunication.py} +5 -2
  68. armodel/models/{fibex/fibex_4_multiplatform.py → M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Multiplatform.py} +5 -4
  69. armodel/models/{fibex/fibex_core/core_communication.py → M2/AUTOSARTemplates/SystemTemplate/Fibex/FibexCore/CoreCommunication.py} +4 -6
  70. armodel/models/{fibex/fibex_core/core_topology.py → M2/AUTOSARTemplates/SystemTemplate/Fibex/FibexCore/CoreTopology.py} +6 -7
  71. armodel/models/{m2/autosar_templates/system_template/instance_refs.py → M2/AUTOSARTemplates/SystemTemplate/InstanceRefs.py} +2 -2
  72. armodel/models/{m2/autosar_templates/system_template/network_management.py → M2/AUTOSARTemplates/SystemTemplate/NetworkManagement.py} +5 -6
  73. armodel/models/M2/AUTOSARTemplates/SystemTemplate/TransportProtocols.py +6 -0
  74. armodel/models/{m2/autosar_templates/system_template → M2/AUTOSARTemplates/SystemTemplate}/__init__.py +3 -4
  75. armodel/models/M2/MSR/AsamHdo/AdminData.py +18 -0
  76. armodel/models/M2/MSR/AsamHdo/BaseTypes.py +77 -0
  77. armodel/models/{m2_msr.py → M2/MSR/AsamHdo/ComputationMethod.py} +43 -28
  78. armodel/models/{global_constraints.py → M2/MSR/AsamHdo/Constraints/GlobalConstraints.py} +6 -4
  79. armodel/models/M2/MSR/AsamHdo/SpecialData.py +60 -0
  80. armodel/models/{m2/msr/asam_hdo/units.py → M2/MSR/AsamHdo/Units.py} +3 -3
  81. armodel/models/M2/MSR/CalibrationData/CalibrationValue.py +26 -0
  82. armodel/models/{m2/msr/data_dictionary/auxillary_objects.py → M2/MSR/DataDictionary/AuxillaryObjects.py} +3 -4
  83. armodel/models/M2/MSR/DataDictionary/Axis.py +145 -0
  84. armodel/models/M2/MSR/DataDictionary/CalibrationParameter.py +37 -0
  85. armodel/models/{m2/msr/data_dictionary/data_def_properties.py → M2/MSR/DataDictionary/DataDefProperties.py} +19 -10
  86. armodel/models/{record_layout.py → M2/MSR/DataDictionary/RecordLayout.py} +26 -25
  87. armodel/models/{annotation.py → M2/MSR/Documentation/Annotation.py} +8 -10
  88. armodel/models/{m2/msr/documentation/block_elements.py → M2/MSR/Documentation/BlockElements.py} +2 -2
  89. armodel/models/M2/MSR/Documentation/TextModel/LanguageDataModel.py +16 -0
  90. armodel/models/{multilanguage_data.py → M2/MSR/Documentation/TextModel/MultilanguageData.py} +20 -32
  91. armodel/models/M2/MSR/Documentation/TextModel/__init__.py +0 -0
  92. armodel/models/M2/MSR/Documentation/__init__.py +3 -0
  93. armodel/models/M2/MSR/__init__.py +1 -0
  94. armodel/models/M2/__init__.py +0 -0
  95. armodel/models/__init__.py +50 -24
  96. armodel/parser/abstract_arxml_parser.py +8 -4
  97. armodel/parser/arxml_parser.py +117 -90
  98. armodel/parser/connector_xlsx_parser.py +5 -3
  99. armodel/parser/file_parser.py +2 -1
  100. armodel/report/connector_xls_report.py +3 -2
  101. armodel/tests/test_armodel/models/test_ar_object.py +2 -3
  102. armodel/tests/test_armodel/models/test_ar_package.py +21 -9
  103. armodel/tests/test_armodel/models/test_ar_ref.py +7 -5
  104. armodel/tests/test_armodel/models/test_bsw_module_template.py +5 -1
  105. armodel/tests/test_armodel/models/test_common_structure.py +11 -5
  106. armodel/tests/test_armodel/models/test_data_dictionary.py +2 -2
  107. armodel/tests/test_armodel/models/test_data_prototype.py +8 -4
  108. armodel/tests/test_armodel/models/test_datatype.py +28 -14
  109. armodel/tests/test_armodel/models/test_general_structure.py +12 -2
  110. armodel/tests/test_armodel/models/test_implementation.py +3 -2
  111. armodel/tests/test_armodel/models/test_m2_msr.py +4 -2
  112. armodel/tests/test_armodel/models/test_port_interface.py +21 -11
  113. armodel/tests/test_armodel/models/test_port_prototype.py +1 -1
  114. armodel/tests/test_armodel/parser/test_parse_bswmd.py +13 -13
  115. armodel/tests/test_armodel/parser/test_sw_components.py +2 -2
  116. armodel/tests/test_armodel/parser/test_system.py +30 -0
  117. armodel/writer/abstract_arxml_writer.py +5 -2
  118. armodel/writer/arxml_writer.py +136 -91
  119. {armodel-1.6.2.dist-info → armodel-1.6.4.dist-info}/METADATA +16 -1
  120. armodel-1.6.4.dist-info/RECORD +156 -0
  121. armodel/lib/data_analyzer.py +0 -34
  122. armodel/models/ar_package.py +0 -641
  123. armodel/models/ar_ref.py +0 -25
  124. armodel/models/calibration.py +0 -119
  125. armodel/models/common_structure.py +0 -272
  126. armodel/models/communication.py +0 -17
  127. armodel/models/data_def_properties.py +0 -16
  128. armodel/models/data_dictionary.py +0 -59
  129. armodel/models/data_prototype.py +0 -103
  130. armodel/models/end_to_end_protection.py +0 -67
  131. armodel/models/fibex/fibex_core.py +0 -341
  132. armodel/models/fibex/lin_topology.py +0 -7
  133. armodel/models/implementation.py +0 -135
  134. armodel/models/internal_behavior.py +0 -63
  135. armodel/models/m2/autosar_templates/common_structure/implementation.py +0 -21
  136. armodel/models/m2/autosar_templates/sw_component_template/composition/__init__.py +0 -154
  137. armodel/models/m2/autosar_templates/sw_component_template/port_interface.py +0 -236
  138. armodel/models/m2/autosar_templates/sw_component_template/swc_internal_behavior/__init__.py +0 -203
  139. armodel/models/m2/autosar_templates/sw_component_template/swc_internal_behavior/trigger.py +0 -10
  140. armodel/models/m2/autosar_templates/system_template/transport_protocols.py +0 -7
  141. armodel/models/mode_declaration.py +0 -8
  142. armodel/models/port_interface.py +0 -165
  143. armodel/models/port_prototype.py +0 -6
  144. armodel/models/service_mapping.py +0 -11
  145. armodel/models/sw_component.py +0 -385
  146. armodel/models/system_template/network_management.py +0 -7
  147. armodel/models/system_template/transport_protocols.py +0 -7
  148. armodel/models/timing.py +0 -91
  149. armodel/models/unit.py +0 -14
  150. armodel-1.6.2.dist-info/RECORD +0 -142
  151. /armodel/models/{fibex → M2/AUTOSARTemplates/CommonStructure/SwcInternalBehavior}/__init__.py +0 -0
  152. /armodel/models/{fibex/fibex_4_can → M2/AUTOSARTemplates/CommonStructure/Timing/TimingConstraint}/__init__.py +0 -0
  153. /armodel/models/{fibex/fibex_4_lin → M2/AUTOSARTemplates/CommonStructure/Timing}/__init__.py +0 -0
  154. /armodel/models/{fibex/fibex_core → M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses}/__init__.py +0 -0
  155. /armodel/models/{m2 → M2/AUTOSARTemplates/SWComponentTemplate/Datatype}/__init__.py +0 -0
  156. /armodel/models/{m2/autosar_templates → M2/AUTOSARTemplates/SWComponentTemplate}/__init__.py +0 -0
  157. /armodel/models/{m2/autosar_templates/generic_structure → M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Can}/__init__.py +0 -0
  158. /armodel/models/{m2/autosar_templates/sw_component_template → M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Ethernet}/__init__.py +0 -0
  159. /armodel/models/{m2/autosar_templates/sw_component_template/data_type → M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Lin}/__init__.py +0 -0
  160. /armodel/models/{m2/msr → M2/AUTOSARTemplates/SystemTemplate/Fibex/FibexCore}/__init__.py +0 -0
  161. /armodel/models/{m2/msr/asam_hdo → M2/AUTOSARTemplates/SystemTemplate/Fibex}/__init__.py +0 -0
  162. /armodel/models/{m2/msr/data_dictionary → M2/AUTOSARTemplates}/__init__.py +0 -0
  163. /armodel/models/{m2/msr/documentation → M2/MSR/AsamHdo/Constraints}/__init__.py +0 -0
  164. /armodel/models/{system_template → M2/MSR/AsamHdo}/__init__.py +0 -0
  165. /armodel/models/{ecuc_parameter_def_template.py → M2/MSR/CalibrationData/__init__.py} +0 -0
  166. /armodel/models/{m2/autosar_templates/common_structure/constants.py → M2/MSR/DataDictionary/__init__.py} +0 -0
  167. {armodel-1.6.2.dist-info → armodel-1.6.4.dist-info}/LICENSE +0 -0
  168. {armodel-1.6.2.dist-info → armodel-1.6.4.dist-info}/WHEEL +0 -0
  169. {armodel-1.6.2.dist-info → armodel-1.6.4.dist-info}/entry_points.txt +0 -0
  170. {armodel-1.6.2.dist-info → armodel-1.6.4.dist-info}/top_level.txt +0 -0
@@ -1,641 +0,0 @@
1
- from typing import Dict, List
2
-
3
- from .fibex.fibex_core.core_topology import EcuInstance, CanCluster, LinCluster
4
- from .fibex.fibex_core.core_communication import ISignalGroup, ISignalIPdu, ISignalIPduGroup, SecuredIPdu, SystemSignal, DcmIPdu, ISignal, NPdu, NmPdu, SystemSignalGroup
5
- from .fibex.can_communication import CanFrame
6
- from .fibex.fibex_4_multiplatform import Gateway
7
- from .fibex.lin_communication import LinUnconditionalFrame
8
-
9
- from .m2.msr.asam_hdo.units import PhysicalDimension, Unit
10
- from .m2.msr.data_dictionary.auxillary_objects import SwAddrMethod
11
- from .m2.autosar_templates.common_structure import ConstantSpecification
12
- from .m2.autosar_templates.common_structure.implementation_data_types import ImplementationDataType
13
- from .m2.autosar_templates.ecuc_description_template import EcucModuleConfigurationValues, EcucValueCollection
14
- from .m2.autosar_templates.system_template import System
15
- from .m2.autosar_templates.system_template.transport_protocols import CanTpConfig
16
- from .m2.autosar_templates.system_template.network_management import NmConfig
17
- from .m2.autosar_templates.sw_component_template.composition import CompositionSwComponentType
18
- from .m2.autosar_templates.sw_component_template.port_interface import ClientServerInterface, ModeSwitchInterface, ParameterInterface, SenderReceiverInterface, TriggerInterface
19
- from .m2.autosar_templates.sw_component_template.components import SwComponentType
20
-
21
- from .timing import SwcTiming
22
- from .record_layout import SwRecordLayout
23
- from .end_to_end_protection import EndToEndProtectionSet
24
- from .general_structure import Identifiable, ARObject, Referrable, CollectableElement, SwcBswMapping
25
-
26
- from .sw_component import EcuAbstractionSwComponentType, AtomicSwComponentType, ApplicationSwComponentType
27
- from .sw_component import ServiceSwComponentType, SensorActuatorSwComponentType, ComplexDeviceDriverSwComponentType
28
- from .datatype import ApplicationArrayDataType, ApplicationDataType, DataTypeMappingSet, DataTypeMap, SwBaseType, ApplicationPrimitiveDataType, ApplicationRecordDataType
29
- from .m2_msr import CompuMethod
30
- from .common_structure import ModeDeclarationGroup
31
- from .implementation import BswImplementation, SwcImplementation, Implementation
32
- from .bsw_module_template import BswModuleDescription, BswModuleEntry
33
- from .global_constraints import DataConstr
34
-
35
- class ARPackage(Identifiable, CollectableElement):
36
- def __init__(self, parent: ARObject, short_name: str):
37
- Identifiable.__init__(self, parent, short_name)
38
- CollectableElement.__init__(self)
39
-
40
- self._ar_packages = {} # type: Dict[str, ARPackage]
41
-
42
- def getARPackages(self): # type: (...) -> List[ARPackage]
43
- return list(sorted(self._ar_packages.values(), key= lambda a: a.short_name))
44
- #return list(filter(lambda e: isinstance(e, ARPackage), self.elements.values()))
45
-
46
- def createARPackage(self, short_name: str):
47
- '''
48
- if (short_name not in self.elements):
49
- ar_package = ARPackage(self, short_name)
50
- self.elements[short_name] = ar_package
51
- return self.elements[short_name]
52
- '''
53
- if short_name not in self._ar_packages:
54
- ar_package = ARPackage(self, short_name)
55
- self._ar_packages[short_name] = ar_package
56
- return self._ar_packages[short_name]
57
-
58
- def getElement(self, short_name: str) -> Referrable:
59
- if (short_name in self._ar_packages):
60
- return self._ar_packages[short_name]
61
- return CollectableElement.getElement(self, short_name)
62
-
63
- def createEcuAbstractionSwComponentType(self, short_name: str) -> EcuAbstractionSwComponentType:
64
- if (short_name not in self.elements):
65
- sw_component = EcuAbstractionSwComponentType(self, short_name)
66
- self.addElement(sw_component)
67
- return self.getElement(short_name)
68
-
69
- def createApplicationSwComponentType(self, short_name: str) -> ApplicationSwComponentType:
70
- if short_name not in self.elements:
71
- sw_component = ApplicationSwComponentType(self, short_name)
72
- self.addElement(sw_component)
73
- return self.getElement(short_name)
74
-
75
- def createComplexDeviceDriverSwComponentType(self, short_name: str) -> ComplexDeviceDriverSwComponentType:
76
- if short_name not in self.elements:
77
- sw_component = ComplexDeviceDriverSwComponentType(self, short_name)
78
- self.addElement(sw_component)
79
- return self.getElement(short_name)
80
-
81
- def createServiceSwComponentType(self, short_name: str) -> ServiceSwComponentType:
82
- if (short_name not in self.elements):
83
- sw_component = ServiceSwComponentType(self, short_name)
84
- self.addElement(sw_component)
85
- return self.getElement(short_name)
86
-
87
- def createSensorActuatorSwComponentType(self, short_name: str) -> SensorActuatorSwComponentType:
88
- if (short_name not in self.elements):
89
- sw_component = SensorActuatorSwComponentType(self, short_name)
90
- self.addElement(sw_component)
91
- return self.getElement(short_name)
92
-
93
- def createCompositionSwComponentType(self, short_name: str) -> CompositionSwComponentType:
94
- if (short_name not in self.elements):
95
- sw_component = CompositionSwComponentType(self, short_name)
96
- self.addElement(sw_component)
97
- return self.getElement(short_name)
98
-
99
- def createSenderReceiverInterface(self, short_name: str) -> SenderReceiverInterface:
100
- if (short_name not in self.elements):
101
- sr_interface = SenderReceiverInterface(self, short_name)
102
- self.addElement(sr_interface)
103
- return self.getElement(short_name)
104
-
105
- def createParameterInterface(self, short_name: str) -> ParameterInterface:
106
- if (short_name not in self.elements):
107
- sr_interface = ParameterInterface(self, short_name)
108
- self.addElement(sr_interface)
109
- return self.getElement(short_name)
110
-
111
- def createClientServerInterface(self, short_name: str) -> ClientServerInterface:
112
- if (short_name not in self.elements):
113
- cs_interface = ClientServerInterface(self, short_name)
114
- self.addElement(cs_interface)
115
- return self.getElement(short_name)
116
-
117
- def createApplicationPrimitiveDataType(self, short_name: str) -> ApplicationPrimitiveDataType:
118
- if (short_name not in self.elements):
119
- data_type = ApplicationPrimitiveDataType(self, short_name)
120
- self.addElement(data_type)
121
- return self.getElement(short_name)
122
-
123
- def createApplicationRecordDataType(self, short_name: str) -> ApplicationPrimitiveDataType:
124
- if (short_name not in self.elements):
125
- data_type = ApplicationRecordDataType(self, short_name)
126
- self.addElement(data_type)
127
- return self.getElement(short_name)
128
-
129
- def createImplementationDataType(self, short_name: str) -> ImplementationDataType:
130
- if (short_name not in self.elements):
131
- data_type = ImplementationDataType(self, short_name)
132
- self.addElement(data_type)
133
- return self.getElement(short_name)
134
-
135
- def createSwBaseType(self, short_name: str) -> SwBaseType:
136
- if (short_name not in self.elements):
137
- base_type = SwBaseType(self, short_name)
138
- self.addElement(base_type)
139
- return self.getElement(short_name)
140
-
141
- def createDataTypeMappingSet(self, short_name: str) -> DataTypeMappingSet:
142
- if (short_name not in self.elements):
143
- mapping_set = DataTypeMappingSet(self, short_name)
144
- self.addElement(mapping_set)
145
- return self.getElement(short_name)
146
-
147
- def createCompuMethod(self, short_name: str) -> CompuMethod:
148
- if (short_name not in self.elements):
149
- compu_method = CompuMethod(self, short_name)
150
- self.addElement(compu_method)
151
- return self.getElement(short_name)
152
-
153
- def createBswModuleDescription(self, short_name: str) -> BswModuleDescription:
154
- if (short_name not in self.elements):
155
- desc = BswModuleDescription(self, short_name)
156
- self.addElement(desc)
157
- return self.getElement(short_name)
158
-
159
- def createBswModuleEntry(self, short_name: str) -> BswModuleEntry:
160
- if (short_name not in self.elements):
161
- entry = BswModuleEntry(self, short_name)
162
- self.addElement(entry)
163
- return self.getElement(short_name)
164
-
165
- def createBswImplementation(self, short_name: str) -> BswImplementation:
166
- if (short_name not in self.elements):
167
- impl = BswImplementation(self, short_name)
168
- self.addElement(impl)
169
- return self.getElement(short_name)
170
-
171
- def createSwcImplementation(self, short_name: str) -> SwcImplementation:
172
- if (short_name not in self.elements):
173
- impl = SwcImplementation(self, short_name)
174
- self.addElement(impl)
175
- return self.getElement(short_name)
176
-
177
- def createSwcBswMapping(self, short_name: str) -> SwcBswMapping:
178
- if (short_name not in self.elements):
179
- mapping = SwcBswMapping(self, short_name)
180
- self.addElement(mapping)
181
- return self.getElement(short_name)
182
-
183
- def createConstantSpecification(self, short_name: str) -> ConstantSpecification:
184
- if (short_name not in self.elements):
185
- spec = ConstantSpecification(self, short_name)
186
- self.addElement(spec)
187
- return self.getElement(short_name)
188
-
189
- def createDataConstr(self, short_name: str) -> DataConstr:
190
- if (short_name not in self.elements):
191
- constr = DataConstr(self, short_name)
192
- self.addElement(constr)
193
- return self.getElement(short_name)
194
-
195
- def createUnit(self, short_name: str) -> Unit:
196
- if (short_name not in self.elements):
197
- unit = Unit(self, short_name)
198
- self.addElement(unit)
199
- return self.getElement(short_name)
200
-
201
- def createEndToEndProtectionSet(self, short_name: str) -> EndToEndProtectionSet:
202
- if (short_name not in self.elements):
203
- e2d_set = EndToEndProtectionSet(self, short_name)
204
- self.addElement(e2d_set)
205
- return self.getElement(short_name)
206
-
207
- def createApplicationArrayDataType(self, short_name: str) -> ApplicationArrayDataType:
208
- if (short_name not in self.elements):
209
- data_type = ApplicationArrayDataType(self, short_name)
210
- self.addElement(data_type)
211
- return self.getElement(short_name)
212
-
213
- def createSwRecordLayout(self, short_name: str) -> SwRecordLayout:
214
- if (short_name not in self.elements):
215
- layout = SwRecordLayout(self, short_name)
216
- self.addElement(layout)
217
- return self.getElement(short_name)
218
-
219
- def createSwAddrMethod(self, short_name: str) -> SwAddrMethod:
220
- if (short_name not in self.elements):
221
- method = SwAddrMethod(self, short_name)
222
- self.addElement(method)
223
- return self.getElement(short_name)
224
-
225
- def createTriggerInterface(self, short_name: str) -> TriggerInterface:
226
- if (short_name not in self.elements):
227
- trigger_interface = TriggerInterface(self, short_name)
228
- self.addElement(trigger_interface)
229
- return trigger_interface
230
-
231
- def createModeDeclarationGroup(self, short_name: str) -> ModeDeclarationGroup:
232
- if (short_name not in self.elements):
233
- group = ModeDeclarationGroup(self, short_name)
234
- self.addElement(group)
235
- return self.getElement(short_name)
236
-
237
- def createModeSwitchInterface(self, short_name: str) -> ModeSwitchInterface:
238
- if (short_name not in self.elements):
239
- switch_interface = ModeSwitchInterface(self, short_name)
240
- self.addElement(switch_interface)
241
- return self.getElement(short_name)
242
-
243
- def createSwcTiming(self, short_name: str) -> SwcTiming:
244
- if (short_name not in self.elements):
245
- timing = SwcTiming(self, short_name)
246
- self.addElement(timing)
247
- return self.getElement(short_name)
248
-
249
- def createLinCluster(self, short_name: str) -> LinCluster:
250
- if (short_name not in self.elements):
251
- cluster = LinCluster(self, short_name)
252
- self.addElement(cluster)
253
- return self.getElement(short_name)
254
-
255
- def createCanCluster(self, short_name: str) -> CanCluster:
256
- if (short_name not in self.elements):
257
- cluster = CanCluster(self, short_name)
258
- self.addElement(cluster)
259
- return self.getElement(short_name)
260
-
261
- def createLinUnconditionalFrame(self, short_name: str) -> LinUnconditionalFrame:
262
- if (short_name not in self.elements):
263
- frame = LinUnconditionalFrame(self, short_name)
264
- self.addElement(frame)
265
- return self.getElement(short_name)
266
-
267
- def createNmPdu(self, short_name: str) -> NmPdu:
268
- if (short_name not in self.elements):
269
- element = NmPdu(self, short_name)
270
- self.addElement(element)
271
- return self.getElement(short_name)
272
-
273
- def createNPdu(self, short_name: str) -> NPdu:
274
- if (short_name not in self.elements):
275
- element = NPdu(self, short_name)
276
- self.addElement(element)
277
- return self.getElement(short_name)
278
-
279
- def createDcmIPdu(self, short_name: str) -> DcmIPdu:
280
- if (short_name not in self.elements):
281
- element = DcmIPdu(self, short_name)
282
- self.addElement(element)
283
- return self.getElement(short_name)
284
-
285
- def createSecuredIPdu(self, short_name: str) -> SecuredIPdu:
286
- if (short_name not in self.elements):
287
- element = SecuredIPdu(self, short_name)
288
- self.addElement(element)
289
- return self.getElement(short_name)
290
-
291
- def createNmConfig(self, short_name: str) -> NmConfig:
292
- if (short_name not in self.elements):
293
- element = NmConfig(self, short_name)
294
- self.addElement(element)
295
- return self.getElement(short_name)
296
-
297
- def createCanTpConfig(self, short_name: str) -> CanTpConfig:
298
- if (short_name not in self.elements):
299
- element = CanTpConfig(self, short_name)
300
- self.addElement(element)
301
- return self.getElement(short_name)
302
-
303
- def createCanFrame(self, short_name: str) -> CanFrame:
304
- if (short_name not in self.elements):
305
- element = CanFrame(self, short_name)
306
- self.addElement(element)
307
- return self.getElement(short_name)
308
-
309
- def createEcuInstance(self, short_name: str) -> EcuInstance:
310
- if (short_name not in self.elements):
311
- element = EcuInstance(self, short_name)
312
- self.addElement(element)
313
- return self.getElement(short_name)
314
-
315
- def createGateway(self, short_name: str) -> Gateway:
316
- if (short_name not in self.elements):
317
- element = Gateway(self, short_name)
318
- self.addElement(element)
319
- return self.getElement(short_name)
320
-
321
- def createISignal(self, short_name: str) -> ISignal:
322
- if (short_name not in self.elements):
323
- element = ISignal(self, short_name)
324
- self.addElement(element)
325
- return self.getElement(short_name)
326
-
327
- def createSystemSignal(self, short_name: str) -> SystemSignal:
328
- if (short_name not in self.elements):
329
- element = SystemSignal(self, short_name)
330
- self.addElement(element)
331
- return self.getElement(short_name)
332
-
333
- def createSystemSignalGroup(self, short_name: str) -> SystemSignalGroup:
334
- if (short_name not in self.elements):
335
- element = SystemSignalGroup(self, short_name)
336
- self.addElement(element)
337
- return self.getElement(short_name)
338
-
339
- def createISignalIPdu(self, short_name: str) -> ISignalIPdu:
340
- if (short_name not in self.elements):
341
- element = ISignalIPdu(self, short_name)
342
- self.addElement(element)
343
- return self.getElement(short_name)
344
-
345
- def createEcucValueCollection(self, short_name: str) -> EcucValueCollection:
346
- if (short_name not in self.elements):
347
- element = EcucValueCollection(self, short_name)
348
- self.addElement(element)
349
- return self.getElement(short_name)
350
-
351
- def createEcucModuleConfigurationValues(self, short_name: str) -> EcucModuleConfigurationValues:
352
- if (short_name not in self.elements):
353
- element = EcucModuleConfigurationValues(self, short_name)
354
- self.addElement(element)
355
- return self.getElement(short_name)
356
-
357
- def createPhysicalDimension(self, short_name: str) -> PhysicalDimension:
358
- if (short_name not in self.elements):
359
- element = PhysicalDimension(self, short_name)
360
- self.addElement(element)
361
- return self.getElement(short_name)
362
-
363
- def createISignalGroup(self, short_name: str) -> ISignalGroup:
364
- if (short_name not in self.elements):
365
- element = ISignalGroup(self, short_name)
366
- self.addElement(element)
367
- return self.getElement(short_name)
368
-
369
- def createISignalIPduGroup(self, short_name: str) -> ISignalIPduGroup:
370
- if (short_name not in self.elements):
371
- element = ISignalIPduGroup(self, short_name)
372
- self.addElement(element)
373
- return self.getElement(short_name)
374
-
375
- def createSystem(self, short_name: str) -> System:
376
- if (short_name not in self.elements):
377
- element = System(self, short_name)
378
- self.addElement(element)
379
- return self.getElement(short_name)
380
-
381
- def getApplicationPrimitiveDataTypes(self) -> List[ApplicationPrimitiveDataType]:
382
- return list(sorted(filter(lambda a: isinstance(a, ApplicationPrimitiveDataType), self.elements.values()), key= lambda o:o.short_name))
383
-
384
- def getApplicationDataType(self) -> List[ApplicationDataType]:
385
- return list(sorted(filter(lambda a: isinstance(a, ApplicationDataType), self.elements.values()), key= lambda o:o.short_name))
386
-
387
- def getImplementationDataTypes(self) -> List[ImplementationDataType]:
388
- return list(sorted(filter(lambda a: isinstance(a, ImplementationDataType), self.elements.values()), key= lambda o:o.short_name))
389
-
390
- def getSwBaseTypes(self) -> List[SwBaseType]:
391
- return list(filter(lambda a: isinstance(a, SwBaseType), self.elements.values()))
392
-
393
- def getSwComponentTypes(self) -> List[SwComponentType]:
394
- return list(filter(lambda a : isinstance(a, SwComponentType), self.elements.values()))
395
-
396
- def getSensorActuatorSwComponentType(self) -> List[SensorActuatorSwComponentType]:
397
- return list(filter(lambda a : isinstance(a, SensorActuatorSwComponentType), self.elements.values()))
398
-
399
- def getAtomicSwComponentTypes(self) -> List[AtomicSwComponentType]:
400
- return list(filter(lambda a : isinstance(a, AtomicSwComponentType), self.elements.values()))
401
-
402
- def getCompositionSwComponentTypes(self) -> List[CompositionSwComponentType]:
403
- return list(filter(lambda a : isinstance(a, CompositionSwComponentType), self.elements.values()))
404
-
405
- def getComplexDeviceDriverSwComponentTypes(self) -> List[ComplexDeviceDriverSwComponentType]:
406
- return list(sorted(filter(lambda a : isinstance(a, ComplexDeviceDriverSwComponentType), self.elements.values()), key = lambda a: a.short_name))
407
-
408
- def getSenderReceiverInterfaces(self) -> List[SenderReceiverInterface]:
409
- return list(sorted(filter(lambda a : isinstance(a, SenderReceiverInterface), self.elements.values()), key = lambda a: a.short_name))
410
-
411
- def getParameterInterfaces(self) -> List[ParameterInterface]:
412
- return list(sorted(filter(lambda a : isinstance(a, ParameterInterface), self.elements.values()), key = lambda a: a.short_name))
413
-
414
- def getClientServerInterfaces(self) -> List[ClientServerInterface]:
415
- return list(sorted(filter(lambda a : isinstance(a, ClientServerInterface), self.elements.values()), key = lambda a: a.short_name))
416
-
417
- def getDataTypeMappingSets(self) -> List[DataTypeMappingSet]:
418
- return list(sorted(filter(lambda a : isinstance(a, DataTypeMappingSet), self.elements.values()), key = lambda a: a.short_name))
419
-
420
- def getCompuMethods(self) -> List[CompuMethod]:
421
- return list(filter(lambda a: isinstance(a, CompuMethod), self.elements.values()))
422
-
423
- def getBswModuleDescriptions(self) -> List[BswModuleDescription]:
424
- return list(filter(lambda a: isinstance(a, BswModuleDescription), self.elements.values()))
425
-
426
- def getBswModuleEntries(self) -> List[BswModuleEntry]:
427
- return list(filter(lambda a: isinstance(a, BswModuleEntry), self.elements.values()))
428
-
429
- def getBswImplementations(self) -> List[BswImplementation]:
430
- return list(filter(lambda a: isinstance(a, BswImplementation), self.elements.values()))
431
-
432
- def getSwcImplementations(self) -> List[SwcImplementation]:
433
- return list(filter(lambda a: isinstance(a, SwcImplementation), self.elements.values()))
434
-
435
- def getImplementations(self) -> List[Implementation]:
436
- return list(filter(lambda a: isinstance(a, Implementation), self.elements.values()))
437
-
438
- def getSwcBswMappings(self) -> List[SwcBswMapping]:
439
- return list(filter(lambda a: isinstance(a, SwcBswMapping), self.elements.values()))
440
-
441
- def getConstantSpecifications(self) -> List[ConstantSpecification]:
442
- return list(filter(lambda a: isinstance(a, ConstantSpecification), self.elements.values()))
443
-
444
- def getDataConstrs(self) -> List[DataConstr]:
445
- return list(filter(lambda a: isinstance(a, DataConstr), self.elements.values()))
446
-
447
- def getUnits(self) -> List[Unit]:
448
- return list(filter(lambda a: isinstance(a, Unit), self.elements.values()))
449
-
450
- def getApplicationArrayDataTypes(self) -> List[ApplicationArrayDataType]:
451
- return list(sorted(filter(lambda a : isinstance(a, ApplicationArrayDataType), self.elements.values()), key = lambda a: a.short_name))
452
-
453
- def getSwRecordLayouts(self) -> List[SwRecordLayout]:
454
- return list(sorted(filter(lambda a : isinstance(a, SwRecordLayout), self.elements.values()), key = lambda a: a.short_name))
455
-
456
- def getSwAddrMethods(self) -> List[SwAddrMethod]:
457
- return list(sorted(filter(lambda a : isinstance(a, SwAddrMethod), self.elements.values()), key = lambda a: a.short_name))
458
-
459
- def getTriggerInterfaces(self) -> List[TriggerInterface]:
460
- return list(sorted(filter(lambda a : isinstance(a, TriggerInterface), self.elements.values()), key = lambda a: a.short_name))
461
-
462
- def getModeDeclarationGroups(self) -> List[ModeDeclarationGroup]:
463
- return list(sorted(filter(lambda a : isinstance(a, ModeDeclarationGroup), self.elements.values()), key = lambda a: a.short_name))
464
-
465
- def getModeSwitchInterfaces(self) -> List[ModeSwitchInterface]:
466
- return list(sorted(filter(lambda a : isinstance(a, ModeSwitchInterface), self.elements.values()), key = lambda a: a.short_name))
467
-
468
- def getSwcTimings(self) -> List[SwcTiming]:
469
- return list(sorted(filter(lambda a : isinstance(a, SwcTiming), self.elements.values()), key = lambda a: a.short_name))
470
-
471
- def getLinClusters(self) -> List[LinCluster]:
472
- return list(sorted(filter(lambda a : isinstance(a, LinCluster), self.elements.values()), key = lambda a: a.short_name))
473
-
474
- def getCanClusters(self) -> List[CanCluster]:
475
- return list(sorted(filter(lambda a : isinstance(a, CanCluster), self.elements.values()), key = lambda a: a.short_name))
476
-
477
- def getLinUnconditionalFrames(self) -> List[LinUnconditionalFrame]:
478
- return list(sorted(filter(lambda a : isinstance(a, LinUnconditionalFrame), self.elements.values()), key = lambda a: a.short_name))
479
-
480
- def getNmPdus(self) -> List[NmPdu]:
481
- return list(sorted(filter(lambda a : isinstance(a, NmPdu), self.elements.values()), key = lambda a: a.short_name))
482
-
483
- def getNPdus(self) -> List[NPdu]:
484
- return list(sorted(filter(lambda a : isinstance(a, NPdu), self.elements.values()), key = lambda a: a.short_name))
485
-
486
- def getDcmIPdus(self) -> List[DcmIPdu]:
487
- return list(sorted(filter(lambda a : isinstance(a, DcmIPdu), self.elements.values()), key = lambda a: a.short_name))
488
-
489
- def getSecuredIPdus(self) -> List[SecuredIPdu]:
490
- return list(sorted(filter(lambda a : isinstance(a, SecuredIPdu), self.elements.values()), key = lambda a: a.short_name))
491
-
492
- def getNmConfigs(self) -> List[NmConfig]:
493
- return list(sorted(filter(lambda a : isinstance(a, NmConfig), self.elements.values()), key = lambda a: a.short_name))
494
-
495
- def getCanTpConfigs(self) -> List[CanTpConfig]:
496
- return list(sorted(filter(lambda a : isinstance(a, CanTpConfig), self.elements.values()), key = lambda a: a.short_name))
497
-
498
- def getCanFrames(self) -> List[CanFrame]:
499
- return list(sorted(filter(lambda a : isinstance(a, CanFrame), self.elements.values()), key = lambda a: a.short_name))
500
-
501
- def getEcuInstances(self) -> List[EcuInstance]:
502
- return list(sorted(filter(lambda a : isinstance(a, EcuInstance), self.elements.values()), key = lambda a: a.short_name))
503
-
504
- def getGateways(self) -> List[Gateway]:
505
- return list(sorted(filter(lambda a : isinstance(a, Gateway), self.elements.values()), key = lambda a: a.short_name))
506
-
507
- def getISignals(self) -> List[ISignal]:
508
- return list(sorted(filter(lambda a : isinstance(a, ISignal), self.elements.values()), key = lambda a: a.short_name))
509
-
510
- def getEcucValueCollections(self) -> List[EcucValueCollection]:
511
- return list(sorted(filter(lambda a : isinstance(a, EcucValueCollection), self.elements.values()), key = lambda a: a.short_name))
512
-
513
- def getEcucModuleConfigurationValues(self) -> List[EcucModuleConfigurationValues]:
514
- return list(sorted(filter(lambda a : isinstance(a, EcucModuleConfigurationValues), self.elements.values()), key = lambda a: a.short_name))
515
-
516
- def getEcucModuleConfigurationValues(self) -> List[PhysicalDimension]:
517
- return list(sorted(filter(lambda a : isinstance(a, PhysicalDimension), self.elements.values()), key = lambda a: a.short_name))
518
-
519
- def getISignalGroups(self) -> List[ISignalGroup]:
520
- return list(sorted(filter(lambda a : isinstance(a, ISignalGroup), self.elements.values()), key = lambda a: a.short_name))
521
-
522
- def getSystemSignals(self) -> List[SystemSignal]:
523
- return list(sorted(filter(lambda a : isinstance(a, SystemSignal), self.elements.values()), key = lambda a: a.short_name))
524
-
525
- def getSystemSignalGroups(self) -> List[SystemSignalGroup]:
526
- return list(sorted(filter(lambda a : isinstance(a, SystemSignalGroup), self.elements.values()), key = lambda a: a.short_name))
527
-
528
- def getISignalIPdus(self) -> List[ISignalIPdu]:
529
- return list(sorted(filter(lambda a : isinstance(a, ISignalIPdu), self.elements.values()), key = lambda a: a.short_name))
530
-
531
- def getSystems(self) -> List[System]:
532
- return list(sorted(filter(lambda a : isinstance(a, System), self.elements.values()), key = lambda a: a.short_name))
533
-
534
- class AbstractAUTOSAR(CollectableElement):
535
- def __init__(self):
536
- super().__init__()
537
-
538
- CollectableElement.__init__(self)
539
-
540
- self.schema_location = ""
541
- self._appl_impl_type_maps = {}
542
- self._impl_appl_type_maps = {}
543
-
544
-
545
- self._ar_packages = {} # type: Dict[str, ARPackage]
546
- self.short_name_mappings = {} # type: Dict[str, str]
547
-
548
- def reload(self):
549
- pass
550
-
551
- @property
552
- def full_name(self):
553
- return ""
554
-
555
- def clear(self):
556
- self._ar_packages = {}
557
- self.elements = {}
558
-
559
- def getElement(self, short_name: str) -> Referrable:
560
- if (short_name in self._ar_packages):
561
- return self._ar_packages[short_name]
562
- return CollectableElement.getElement(self, short_name)
563
-
564
- def getARPackages(self) -> List[ARPackage]:
565
- #return list(filter(lambda e: isinstance(e, ARPackage), self.elements.values()))
566
- return list(sorted(self._ar_packages.values(), key= lambda a: a.short_name))
567
-
568
- def createARPackage(self, short_name: str) -> ARPackage:
569
- if (short_name not in self._ar_packages):
570
- ar_package = ARPackage(self, short_name)
571
- self._ar_packages[short_name] = ar_package
572
- return self._ar_packages[short_name]
573
-
574
- def find(self, referred_name: str) -> Referrable:
575
- short_name_list = referred_name.split("/")
576
- element = AUTOSAR.getInstance()
577
- for short_name in short_name_list:
578
- if (short_name == ""):
579
- continue
580
- element = element.getElement(short_name)
581
- if (element == None):
582
- return element
583
- # raise ValueError("The %s of reference <%s> does not exist." % (short_name, referred_name))
584
- return element
585
-
586
- def findByShortName(self, short_name: str) -> Referrable:
587
- pass
588
-
589
- def getDataType(self, data_type: ImplementationDataType) -> ImplementationDataType:
590
- if (isinstance(data_type, ImplementationDataType) or isinstance(data_type, SwBaseType)):
591
- if (data_type.category == ImplementationDataType.CATEGORY_TYPE_REFERENCE):
592
- referred_type = self.find(data_type.swDataDefProps.implementationDataTypeRef.value)
593
- return self.getDataType(referred_type)
594
- if (data_type.category == ImplementationDataType.CATEGORY_DATA_REFERENCE):
595
- if (data_type.swDataDefProps.swPointerTargetProps.target_category == "VALUE"):
596
- referred_type = self.find(data_type.swDataDefProps.swPointerTargetProps.sw_data_def_props.baseTypeRef.value)
597
- return self.getDataType(referred_type)
598
- return data_type
599
- else:
600
- raise ValueError("%s is not ImplementationDataType." % data_type)
601
-
602
- def addDataTypeMap(self, data_type_map: DataTypeMap):
603
- if (data_type_map.application_data_type_ref is None) or (data_type_map.implementation_data_type_ref is None):
604
- return
605
- self._appl_impl_type_maps[data_type_map.application_data_type_ref.value] = data_type_map.implementation_data_type_ref.value
606
- self._impl_appl_type_maps[data_type_map.implementation_data_type_ref.value] = data_type_map.application_data_type_ref.value
607
-
608
- def convertToImplementationDataType(self, appl_data_type: str) -> ImplementationDataType:
609
- if (appl_data_type not in self._appl_impl_type_maps.keys()):
610
- raise IndexError("Invalid application data type <%s>" % appl_data_type)
611
-
612
- return self.find(self._appl_impl_type_maps[appl_data_type])
613
-
614
- def convertToApplicationDataType(self, impl_data_type: str) -> ApplicationDataType:
615
- if (impl_data_type not in self._impl_appl_type_maps.keys()):
616
- raise IndexError("Invalid Implementation data type <%s>" % impl_data_type)
617
-
618
- return self.find(self._impl_appl_type_maps[impl_data_type])
619
-
620
-
621
- class AUTOSAR (AbstractAUTOSAR):
622
- __instance = None
623
-
624
- @staticmethod
625
- def getInstance():
626
- if (AUTOSAR.__instance == None):
627
- AUTOSAR()
628
- return AUTOSAR.__instance
629
-
630
- def __init__(self):
631
- if (AUTOSAR.__instance != None):
632
- raise Exception("The AUTOSAR is singleton!")
633
-
634
- AUTOSAR.__instance = self
635
-
636
- super().__init__()
637
-
638
- class AUTOSARDoc(AbstractAUTOSAR):
639
- def __init__(self):
640
- super().__init__()
641
-
armodel/models/ar_ref.py DELETED
@@ -1,25 +0,0 @@
1
- from .ar_object import ARObject
2
-
3
- class RefType(ARObject):
4
- def __init__(self):
5
- self.dest = ""
6
- self.value = ""
7
-
8
- def getDest(self):
9
- return self.dest
10
-
11
- def setDest(self, value):
12
- self.dest = value
13
- return self
14
-
15
- def getValue(self):
16
- return self.value
17
-
18
- def setValue(self, value):
19
- self.value = value
20
- return self
21
-
22
- class TRefType(RefType):
23
- def __init__(self):
24
- super().__init__()
25
-