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,119 +0,0 @@
1
- from abc import ABCMeta
2
- from typing import List
3
-
4
- from .ar_object import ARFloat, ARNumerical, ARObject
5
- from .ar_ref import RefType
6
- from .data_def_properties import ValueList
7
-
8
- class SwValues(ARObject):
9
- def __init__(self):
10
- super().__init__()
11
-
12
- self._v = [] # type: List[ARNumerical]
13
- self.vt = None # type: float
14
-
15
- def addV(self, v: ARNumerical):
16
- self._v.append(v)
17
-
18
- def getVs(self) -> List[ARNumerical]:
19
- return self._v
20
-
21
- class SwValueCont(ARObject):
22
- def __init__(self):
23
- super().__init__()
24
-
25
- self.sw_arraysize = None # type: ValueList
26
- self.unit_ref = None # type: RefType
27
- self.sw_values_phys = None # type: SwValues
28
-
29
- class SwGenericAxisParam(ARObject):
30
- def __init__(self):
31
- super().__init__()
32
-
33
- self.swGenericAxisParamTypeRef = None # type: RefType
34
- self.vf = [] # type: List[ARFloat]
35
- class SwAxisGeneric(ARObject):
36
- def __init__(self):
37
- super().__init__()
38
-
39
- self.swAxisTypeRef = None # type: RefType
40
- self.swGenericAxisParam = [] # type: List[SwGenericAxisParam]
41
-
42
- class SwCalprmAxisTypeProps(ARObject, metaclass = ABCMeta):
43
- def __init__(self):
44
- if type(self) == SwCalprmAxisTypeProps:
45
- raise NotImplementedError("SwCalprmAxisTypeProps is an abstract class.")
46
-
47
- super().__init__()
48
-
49
- self.maxGradient = None # type: ARFloat
50
- self.monotony = None # type: MonotonyEnum
51
-
52
- class SwAxisIndividual(SwCalprmAxisTypeProps):
53
- def __init__(self):
54
- super().__init__()
55
-
56
- self.compuMethodRef = None # type: RefType
57
- self.dataConstrRef = None # type: RefType
58
- self.inputVariableTypeRef = None # type: RefType
59
- self.swAxisGeneric = None # type: SwAxisGeneric
60
- self.swMaxAxisPoints = None # type: ARNumerical
61
- self.swMinAxisPoints = None # type: ARNumerical
62
- self.swVariableRefs = [] # type: List
63
- self.unitRef = None # type: RefType
64
-
65
- def setInputVariableTypeRef(self, ref: RefType):
66
- self.inputVariableTypeRef = ref
67
- return self
68
-
69
- def setCompuMethodRef(self, ref: RefType):
70
- self.compuMethodRef = ref
71
- return self
72
-
73
- def setSwMaxAxisPoints(self, points: int):
74
- self.swMaxAxisPoints = points
75
- return self
76
-
77
- def setSwMinAxisPoints(self, points: int):
78
- self.swMinAxisPoints = points
79
- return self
80
-
81
- def setDataConstrRef(self, ref: RefType):
82
- self.dataConstrRef = ref
83
- return self
84
-
85
- class SwAxisGrouped(SwCalprmAxisTypeProps):
86
- def __init__(self):
87
- super().__init__()
88
-
89
- self.sharedAxisTypeRef = None # type: RefType
90
- self.swAxisIndex = None # type: ARNumerical
91
- self.swCalprmRef = None # type: SwCalprmRefProxy
92
-
93
- def setSharedAxisTypeRef(self, ref: RefType):
94
- self.sharedAxisTypeRef = ref
95
- return self
96
-
97
- class SwCalprmAxis(ARObject):
98
- def __init__(self):
99
- super().__init__()
100
-
101
- self.category = None # type: CalprmAxisCategoryEnum
102
- self.displayFormat = None # type: DisplayFormatString
103
- self.sw_axis_index = None # type: AxisIndexType
104
- self.swCalibrationAccess = None # type: SwCalibrationAccessEnum
105
- self.sw_calprm_axis_type_props = None # type: SwCalprmAxisTypeProps
106
-
107
- class SwCalprmAxisSet(ARObject):
108
- def __init__(self):
109
- super().__init__()
110
-
111
- self._swCalprmAxis = [] # type: List[SwCalprmAxis]
112
-
113
- def addSwCalprmAxis(self, axis: SwCalprmAxis):
114
- self._swCalprmAxis.append(axis)
115
-
116
- def getSwCalprmAxises(self) -> List[SwCalprmAxis]:
117
- return self._swCalprmAxis
118
-
119
-
@@ -1,272 +0,0 @@
1
- #from __future__ import annotations
2
-
3
- from abc import ABCMeta
4
- from typing import List
5
-
6
- from .ar_object import ARBoolean, ARFloat, ARLiteral, ARNumerical
7
- from .general_structure import ARObject, Identifiable
8
- from .m2.msr.data_dictionary.data_def_properties import SwDataDefProps
9
- from .ar_ref import RefType, TRefType
10
-
11
- import re
12
-
13
-
14
- class ExclusiveArea(Identifiable):
15
- def __init__(self, parent: ARObject, short_name: str):
16
- super().__init__(parent, short_name)
17
-
18
- class IncludedModeDeclarationGroupSet(ARObject):
19
- def __init__(self):
20
- super().__init__()
21
-
22
- self.mode_declaration_group_refs = [] # type: List[RefType]
23
- self.prefix = None # type: ARLiteral
24
-
25
- def addModeDeclarationGroupRef(self, ref: RefType):
26
- self.mode_declaration_group_refs.append(ref)
27
- return self
28
-
29
- def getModeDeclarationGroupRefs(self) -> List[RefType]:
30
- return self.mode_declaration_group_refs
31
-
32
- def setPrefix(self, prefix: str):
33
- self.prefix = prefix
34
- return self
35
-
36
- def getPrefix(self) -> ARLiteral:
37
- return self.prefix
38
-
39
- class ModeDeclaration(Identifiable):
40
- def __init__(self, parent: ARObject, short_name: str):
41
- super().__init__(parent, short_name)
42
-
43
- self.value = None # type: ARNumerical
44
-
45
- def setValue(self, value):
46
- self.value = value
47
- return self
48
-
49
- def getValue(self) -> ARNumerical:
50
- return self.value
51
-
52
- class ExecutableEntity(Identifiable, metaclass=ABCMeta):
53
- def __init__(self, parent: ARObject, short_name: str):
54
- if type(self) == ExecutableEntity:
55
- raise NotImplementedError("ExecutableEntity is an abstract class.")
56
-
57
- super().__init__(parent, short_name)
58
-
59
- self.activationReason = None # *
60
- self.minimumStartInterval = None # type: ARFloat
61
- self.reentrancyLevel = None #
62
- self.canEnterExclusiveAreaRefs = [] # type: List[RefType]
63
- self.swAddrMethodRef = None # type: RefType
64
-
65
- def getActivationReason(self):
66
- return self.activationReason
67
-
68
- def setActivationReason(self, value):
69
- self.activationReason = value
70
- return self
71
-
72
- def getMinimumStartInterval(self):
73
- return self.minimumStartInterval
74
-
75
- def setMinimumStartInterval(self, value):
76
- self.minimumStartInterval = value
77
- return self
78
-
79
- def getReentrancyLevel(self):
80
- return self.reentrancyLevel
81
-
82
- def setReentrancyLevel(self, value):
83
- self.reentrancyLevel = value
84
- return self
85
-
86
- def getSwAddrMethodRef(self):
87
- return self.swAddrMethodRef
88
-
89
- def setSwAddrMethodRef(self, value):
90
- self.swAddrMethodRef = value
91
- return self
92
-
93
- @property
94
- def minimumStartIntervalMs(self) -> int:
95
- if self.minimumStartInterval is not None:
96
- return int(self.minimumStartInterval.getValue() * 1000)
97
- return None
98
-
99
- def addCanEnterExclusiveAreaRef(self, ref: RefType):
100
- self.canEnterExclusiveAreaRefs.append(ref)
101
-
102
- def getCanEnterExclusiveAreaRefs(self):
103
- return self.canEnterExclusiveAreaRefs
104
-
105
- class ModeDeclarationGroupPrototype(Identifiable):
106
- """
107
- The ModeDeclarationGroupPrototype specifies a set of Modes (ModeDeclarationGroup) which is provided or required in the given context.
108
- """
109
-
110
- def __init__(self, parent: ARObject, short_name: str):
111
- super().__init__(parent, short_name)
112
-
113
- self._swCalibrationAccess = None # type: str
114
- self.typeTRef = None # type: TRefType
115
-
116
- @property
117
- def sw_calibration_access(self):
118
- return self._swCalibrationAccess
119
-
120
- @sw_calibration_access.setter
121
- def sw_calibration_access(self, value):
122
- if (value not in ("notAccessible", "readOnly", "readWrite")):
123
- raise ValueError("Invalid SwCalibrationAccess <%s> of ModeDeclarationGroupPrototype <%s>" % (value, self.short_name))
124
- self._swCalibrationAccess = value
125
-
126
- def getSwCalibrationAccess(self):
127
- return self.swCalibrationAccess
128
-
129
- def setSwCalibrationAccess(self, value):
130
- self.swCalibrationAccess = value
131
- return self
132
-
133
- def getTypeTRef(self):
134
- return self.typeTRef
135
-
136
- def setTypeTRef(self, value):
137
- self.typeTRef = value
138
- return self
139
-
140
- class MemorySection(Identifiable):
141
- def __init__(self, parent: ARObject, short_name: str):
142
- super().__init__(parent, short_name)
143
-
144
- self._alignment = None # type: ARLiteral
145
- self.size = None
146
- self.options = [] # type: List[ARLiteral]
147
- self.swAddrMethodRef = None # type: RefType
148
- self.symbol = None # type: ARLiteral
149
-
150
- def getAlignment(self):
151
- return self.alignment
152
-
153
- def setAlignment(self, value):
154
- self.alignment = value
155
- return self
156
-
157
- def getSize(self):
158
- return self.size
159
-
160
- def setSize(self, value):
161
- self.size = value
162
- return self
163
-
164
- def getSwAddrMethodRef(self):
165
- return self.swAddrMethodRef
166
-
167
- def setSwAddrMethodRef(self, value):
168
- self.swAddrMethodRef = value
169
- return self
170
-
171
- def getSymbol(self):
172
- return self.symbol
173
-
174
- def setSymbol(self, value):
175
- self.symbol = value
176
- return self
177
-
178
- @property
179
- def alignment(self) -> ARLiteral:
180
- return self._alignment
181
-
182
- @alignment.setter
183
- def alignment(self, value: ARLiteral):
184
- if value is not None and value.getValue() != "":
185
- match = False
186
- if value.getValue() in ("UNKNOWN", "UNSPECIFIED", "BOOLEAN", "PTR"):
187
- self._alignment = value
188
- match = True
189
- else:
190
- m = re.match(r'^\d+', value.value)
191
- if m:
192
- self._alignment = value
193
- match = True
194
-
195
- if not match:
196
- raise ValueError("Invalid alignment <%s> of memory section <%s>" % (value, self.getShortName()))
197
-
198
- def addOption(self, option: ARLiteral):
199
- self.options.append(option)
200
-
201
- def getOptions(self) -> List[ARLiteral]:
202
- return self.options
203
-
204
- class ResourceConsumption(Identifiable):
205
- def __init__(self, parent: ARObject, short_name: str):
206
- super().__init__(parent, short_name)
207
-
208
- def createMemorySection(self, short_name: str) -> MemorySection:
209
- if (short_name not in self.elements):
210
- entry = MemorySection(self, short_name)
211
- self.elements[short_name] = entry
212
- return self.elements[short_name]
213
-
214
- def getMemorySections(self) -> List[MemorySection]:
215
- return list(filter(lambda a : isinstance(a, MemorySection), self.elements.values()))
216
-
217
- def getMemorySection(self, short_name: str) -> MemorySection:
218
- return next(filter(lambda o: isinstance(o, MemorySection) and (o.short_name == short_name), self.elements.values()), None)
219
-
220
- class Trigger(Identifiable):
221
- def __init__(self, parent: ARObject, short_name: str):
222
- super().__init__(parent, short_name)
223
-
224
- self.swImplPolicy = None # type: str
225
- self.triggerPeriod = None # type: float
226
-
227
- class ModeRequestTypeMap(ARObject):
228
- def __init__(self):
229
- super().__init__()
230
-
231
- self.implementation_data_type_ref = None # type: RefType
232
- self.mode_group_ref = None # type: RefType
233
-
234
- class ModeDeclarationGroup(Identifiable):
235
- def __init__(self, parent: ARObject, short_name: str):
236
- super().__init__(parent, short_name)
237
-
238
- self._initial_mode_ref = None # type: RefType
239
- self._on_transition_value = None # type: ARNumerical
240
-
241
- def createModeDeclaration(self, short_name: str) -> ModeDeclaration:
242
- if (short_name not in self.elements):
243
- spec = ModeDeclaration(self, short_name)
244
- self.elements[short_name] = spec
245
- return self.elements[short_name]
246
-
247
- def getModeDeclarations(self) -> List[ModeDeclaration]:
248
- return list(sorted(filter(lambda a: isinstance(a, ModeDeclaration), self.elements.values()), key= lambda o:o.short_name))
249
-
250
- def setInitialModeRef(self, ref: RefType):
251
- self._initial_mode_ref = ref
252
- return self
253
-
254
- def getInitialModeRef(self) -> RefType:
255
- return self._initial_mode_ref
256
-
257
- def setOnTransitionValue(self, value):
258
- if isinstance(value, int):
259
- value = ARNumerical()
260
- value.setValue(value)
261
- self._on_transition_value = value
262
- return self
263
-
264
- def getOnTransitionValue(self) -> ARNumerical:
265
- return self._on_transition_value
266
-
267
- class ModeDeclarationGroupPrototype(Identifiable):
268
- def __init__(self, parent: ARObject, short_name: str):
269
- super().__init__(parent, short_name)
270
-
271
- self.swCalibrationAccess = None # type: str
272
- self.type_tref = None # type: TRefType
@@ -1,17 +0,0 @@
1
-
2
- from .m2.autosar_templates.sw_component_template.port_interface.instance_refs import ApplicationCompositeElementInPortInterfaceInstanceRef
3
- from .m2.msr.data_dictionary.data_def_properties import SwDataDefProps
4
- from .ar_object import ARObject
5
-
6
- class TransmissionAcknowledgementRequest(ARObject):
7
- def __init__(self):
8
- super().__init__()
9
-
10
- self.timeout = None # type: float
11
-
12
- class CompositeNetworkRepresentation(ARObject):
13
- def __init__(self):
14
- super().__init__()
15
-
16
- self.leaf_element_iref = None # type: ApplicationCompositeElementInPortInterfaceInstanceRef
17
- self.network_representation = None # type: SwDataDefProps
@@ -1,16 +0,0 @@
1
- from typing import List
2
- from .ar_object import ARFloat, ARLiteral, ARObject
3
-
4
-
5
- class ValueList(ARObject):
6
- def __init__(self):
7
- super().__init__()
8
-
9
- self.v = None # type: ARFloat
10
- self._vf = [] # type: List[ARLiteral]
11
-
12
- def addVf(self, vf: ARLiteral):
13
- self._vf.append(vf)
14
-
15
- def getVfs(self) -> List[ARLiteral]:
16
- return sorted(self._vf)
@@ -1,59 +0,0 @@
1
- from typing import List
2
-
3
- from .ar_object import ARFloat, ARLiteral
4
- from .calibration import SwCalprmAxisSet
5
- from .annotation import Annotation
6
- from .general_structure import ARObject, Identifiable
7
- from .ar_ref import RefType
8
-
9
-
10
-
11
- class SwDataDefPropsConditional(ARObject):
12
- def __init__(self):
13
- super().__init__()
14
-
15
- class SwDataDefProps(ARObject):
16
- def __init__(self):
17
- super().__init__()
18
-
19
- self._annotations = [] # type: List[Annotation]
20
- self.baseTypeRef = None # type: RefType
21
- self.compuMethodRef = None # type: RefType
22
- self.dataConstrRef = None # type: RefType
23
- self.implementationDataTypeRef = None # type: RefType
24
- self.swImplPolicy = None # type: str
25
- self.swCalibrationAccess = None # type: str
26
- self.swCalprmAxisSet = None # type: SwCalprmAxisSet
27
- self.sw_pointer_target_props = None # type: SwPointerTargetProps
28
- self.swRecordLayoutRef = None # type: RefType
29
- self.valueAxisDataTypeRef = None # type: RefType
30
- self.unitRef = None # type: RefType
31
- self.conditional = SwDataDefPropsConditional() # type: SwDataDefPropsConditional
32
-
33
- def addAnnotation(self, annotation: Annotation):
34
- self._annotations.append(annotation)
35
-
36
- def getAnnotations(self) -> List[Annotation]:
37
- return self._annotations
38
-
39
- def setUnitRef(self, ref: RefType):
40
- self.unitRef = ref
41
- return self
42
-
43
- class SwPointerTargetProps(ARObject):
44
- def __init__(self):
45
- super().__init__()
46
-
47
- self.function_pointer_signature = None # type: RefType
48
- self.sw_data_def_props = None # type: SwDataDefProps
49
- self.target_category = None
50
-
51
- class SwAddrMethod(Identifiable):
52
- def __init__(self, parent: ARObject, short_name: str):
53
- super().__init__(parent, short_name)
54
-
55
- self.memoryAllocationKeywordPolicy = None # type: MemoryAllocationKeywordPolicyType
56
- self.option = [] # type: str
57
- self.sectionInitializationPolicy = None # type: SectionInitializationPolicyType
58
- self.sectionType = None # type: MemorySectionType
59
-
@@ -1,103 +0,0 @@
1
- from abc import ABCMeta
2
-
3
- from .ar_object import ARNumerical
4
- from .ar_ref import RefType
5
- from .m2.msr.data_dictionary.data_def_properties import SwDataDefProps
6
- from .m2.autosar_templates.common_structure import ValueSpecification
7
- from .general_structure import AtpFeature, ARObject
8
-
9
- class AtpPrototype(AtpFeature, metaclass = ABCMeta):
10
- def __init__(self, parent:ARObject, short_name: str):
11
- if type(self) == AtpPrototype:
12
- raise NotImplementedError("AtpPrototype is an abstract class.")
13
-
14
- super().__init__(parent, short_name)
15
-
16
- class DataPrototype(AtpPrototype, metaclass = ABCMeta):
17
- def __init__(self, parent:ARObject, short_name: str):
18
- if type(self) == DataPrototype:
19
- raise NotImplementedError("DataPrototype is an abstract class.")
20
-
21
- super().__init__(parent, short_name)
22
-
23
- self.swDataDefProps = None # type: SwDataDefProps
24
-
25
- def getSwDataDefProps(self):
26
- return self.swDataDefProps
27
-
28
- def setSwDataDefProps(self, value):
29
- self.swDataDefProps = value
30
- return self
31
- class AutosarDataPrototype(DataPrototype, metaclass = ABCMeta):
32
- def __init__(self, parent:ARObject, short_name: str):
33
- if type(self) == AutosarDataPrototype:
34
- raise NotImplementedError("AutosarDataPrototype is an abstract class.")
35
-
36
- super().__init__(parent, short_name)
37
-
38
- self.typeTRef = None
39
-
40
- def getTypeTRef(self):
41
- return self.typeTRef
42
-
43
- def setTypeTRef(self, value):
44
- self.typeTRef = value
45
- return self
46
-
47
- class VariableDataPrototype(AutosarDataPrototype):
48
- def __init__(self, parent:ARObject, short_name: str):
49
- super().__init__(parent, short_name)
50
-
51
- self.initValue = None # type: ValueSpecification
52
-
53
- def getInitValue(self):
54
- return self.initValue
55
-
56
- def setInitValue(self, value):
57
- self.initValue = value
58
- return self
59
-
60
- class ApplicationCompositeElementDataPrototype(DataPrototype, metaclass = ABCMeta):
61
- def __init__(self, parent:ARObject, short_name: str):
62
- if type(self) == ApplicationCompositeElementDataPrototype:
63
- raise NotImplementedError("ApplicationCompositeElementDataPrototype is an abstract class.")
64
-
65
- super().__init__(parent, short_name)
66
-
67
- self.typeTRef = None # type: RefType
68
-
69
- def getTypeTRef(self):
70
- return self.typeTRef
71
-
72
- def setTypeTRef(self, value):
73
- self.typeTRef = value
74
- return self
75
-
76
-
77
- class ApplicationArrayElement(ApplicationCompositeElementDataPrototype):
78
- def __init__(self, parent:ARObject, short_name: str):
79
- super().__init__(parent, short_name)
80
-
81
- self.arraySizeHandling = None # type: str
82
- self.arraySizeSemantics = None # type: str
83
- self.indexDataTypeRef = None # type: RefType
84
- self.maxNumberOfElements = None # type: ARNumerical
85
-
86
- class ApplicationRecordElement(ApplicationCompositeElementDataPrototype):
87
- def __init__(self, parent:ARObject, short_name: str):
88
- super().__init__(parent, short_name)
89
-
90
- self.isOptional = None
91
-
92
- class ParameterDataPrototype(AutosarDataPrototype):
93
- def __init__(self, parent: ARObject, short_name: str):
94
- super().__init__(parent, short_name)
95
-
96
- self.initValue = None # type: ValueSpecification
97
-
98
- def getInitValue(self):
99
- return self.initValue
100
-
101
- def setInitValue(self, value):
102
- self.initValue = value
103
- return self
@@ -1,67 +0,0 @@
1
- from typing import List
2
-
3
- from .m2.autosar_templates.system_template.instance_refs import VariableDataPrototypeInSystemInstanceRef
4
- from .ar_object import ARNumerical, ARObject
5
- from .general_structure import Identifiable
6
-
7
-
8
- class EndToEndDescription(ARObject):
9
- def __init__(self):
10
- super().__init__()
11
-
12
- self.category = None # type: str
13
- self.counterOffset = None # type: int
14
- self.crcOffset = None # type: int
15
- self.dataIds = [] # type: List[ARNumerical]
16
- self.dataIdMode = None # type: int
17
- self.dataIdNibbleOffset = None # type: int
18
- self.dataLength = None # type: int
19
- self.maxDeltaCounterInit = None # type: int
20
- self.maxNoNewOrRepeatedData = None # type: int
21
- self.syncCounterInit = None # type: int
22
-
23
- def addDataId(self, id: ARNumerical):
24
- self.dataIds.append(id)
25
-
26
- def getDataIds(self) -> List[ARNumerical]:
27
- return sorted(self.dataIds, key = lambda a: a)
28
-
29
- class EndToEndProtectionVariablePrototype(ARObject):
30
- def __init__(self):
31
- super().__init__()
32
-
33
- self._receiverIRefs = [] # type: List[VariableDataPrototypeInSystemInstanceRef]
34
- self.senderIRef = None # type: VariableDataPrototypeInSystemInstanceRef
35
- self.shortLabel = None # type: str
36
-
37
- def addReceiverIref(self, iref: VariableDataPrototypeInSystemInstanceRef):
38
- self._receiverIRefs.append(iref)
39
-
40
- def getReceiverIrefs(self) -> List[VariableDataPrototypeInSystemInstanceRef]:
41
- return self._receiverIRefs
42
-
43
- class EndToEndProtection(Identifiable):
44
- def __init__(self, parent: ARObject, short_name: str):
45
- super().__init__(parent, short_name)
46
-
47
- self.endToEndProfile = None # type: EndToEndDescription
48
- self.endToEndProtectionVariablePrototype = [] # type: List[EndToEndProtectionVariablePrototype]
49
-
50
- def addEndToEndProtectionVariablePrototype(self, prototype: EndToEndProtectionVariablePrototype):
51
- self.endToEndProtectionVariablePrototype.append(prototype)
52
-
53
- def getEndToEndProtectionVariablePrototypes(self) -> List[EndToEndProtectionVariablePrototype]:
54
- return self.endToEndProtectionVariablePrototype
55
-
56
- class EndToEndProtectionSet(Identifiable):
57
- def __init__(self, parent: ARObject, short_name: str):
58
- super().__init__(parent, short_name)
59
-
60
- def createEndToEndProtection(self, short_name: str) -> EndToEndProtection:
61
- if (short_name not in self.elements):
62
- protection = EndToEndProtection(self, short_name)
63
- self.elements[short_name] = protection
64
- return self.elements[short_name]
65
-
66
- def getEndToEndProtections(self) -> List[EndToEndProtection]:
67
- return sorted(filter(lambda c: isinstance(c, EndToEndProtection), self.elements.values()), key= lambda e: e.short_name)