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
@@ -0,0 +1,77 @@
1
+ from abc import ABCMeta
2
+ from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
3
+ from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import ARElement
4
+ from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARNumerical
5
+
6
+ class BaseTypeDefinition(ARObject):
7
+ def __init__(self):
8
+ super().__init__()
9
+
10
+
11
+ class BaseTypeDirectDefinition(BaseTypeDefinition):
12
+ def __init__(self):
13
+ super().__init__()
14
+
15
+ self.baseTypeEncoding = None # type: BaseTypeEncodingString
16
+ self.baseTypeSize = None # type: ARNumerical
17
+ self.byteOrder = None # type: ByteOrderEnum
18
+ self.memAlignment = None # type: ARNumerical
19
+ self.nativeDeclaration = None
20
+
21
+ def getBaseTypeEncoding(self):
22
+ return self.baseTypeEncoding
23
+
24
+ def setBaseTypeEncoding(self, value):
25
+ self.baseTypeEncoding = value
26
+ return self
27
+
28
+ def getBaseTypeSize(self):
29
+ return self.baseTypeSize
30
+
31
+ def setBaseTypeSize(self, value):
32
+ self.baseTypeSize = value
33
+ return self
34
+
35
+ def getByteOrder(self):
36
+ return self.byteOrder
37
+
38
+ def setByteOrder(self, value):
39
+ self.byteOrder = value
40
+ return self
41
+
42
+ def getMemAlignment(self):
43
+ return self.memAlignment
44
+
45
+ def setMemAlignment(self, value):
46
+ self.memAlignment = value
47
+ return self
48
+
49
+ def getNativeDeclaration(self):
50
+ return self.nativeDeclaration
51
+
52
+ def setNativeDeclaration(self, value):
53
+ self.nativeDeclaration = value
54
+ return self
55
+
56
+
57
+
58
+ class BaseType(ARElement, metaclass=ABCMeta):
59
+ def __init__(self, parent: ARObject, short_name: str):
60
+ if type(self) == BaseType:
61
+ raise NotImplementedError("BaseType is an abstract class.")
62
+
63
+ super().__init__(parent, short_name)
64
+
65
+ self.baseTypeDefinition = BaseTypeDirectDefinition()
66
+
67
+ def getBaseTypeDefinition(self):
68
+ return self.baseTypeDefinition
69
+
70
+ def setBaseTypeDefinition(self, value):
71
+ self.baseTypeDefinition = value
72
+ return self
73
+
74
+
75
+ class SwBaseType(BaseType):
76
+ def __init__(self, parent: ARObject, short_name: str):
77
+ super().__init__(parent, short_name)
@@ -1,16 +1,31 @@
1
- from .ar_object import ARLiteral
2
- from .general_structure import ARObject, ARElement, Limit
3
- from .ar_ref import RefType
4
- from abc import ABCMeta
5
1
  from typing import List
2
+ from abc import ABCMeta
3
+ from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import ARElement
4
+ from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARLiteral
5
+ from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
6
+ from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import RefType
7
+ from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import Limit
6
8
 
7
9
  class CompuContent(ARObject, metaclass=ABCMeta):
8
10
  def __init__(self):
9
11
  if type(self) == CompuContent:
10
12
  raise NotImplementedError("CompuContent is an abstract class.")
11
-
13
+
12
14
  super().__init__()
13
15
 
16
+
17
+ class CompuConst(ARObject):
18
+ '''
19
+ This meta-class represents the fact that the value of a computation method scale is constant.
20
+ Base : ARObject
21
+ Aggregated by : Compu.compuDefaultValue, CompuScale.compuInverseValue, CompuScaleConstantContents.compuCons
22
+ '''
23
+ def __init__(self):
24
+ super().__init__()
25
+
26
+ self.compu_const_content_type = None # type: CompuConstContent
27
+
28
+
14
29
  class Compu(ARObject):
15
30
  def __init__(self):
16
31
  super().__init__()
@@ -21,6 +36,7 @@ class Compu(ARObject):
21
36
  '''optional'''
22
37
  self.compu_default_value = None # type: CompuConst
23
38
 
39
+
24
40
  class CompuConstContent(ARObject, metaclass=ABCMeta):
25
41
  '''
26
42
  This meta-class represents the fact that the constant value of the computation method can be numerical or textual.
@@ -31,9 +47,10 @@ class CompuConstContent(ARObject, metaclass=ABCMeta):
31
47
  def __init__(self):
32
48
  if type(self) == CompuConstContent:
33
49
  raise NotImplementedError("CompuConstContent is an abstract class.")
34
-
50
+
35
51
  super().__init__()
36
52
 
53
+
37
54
  class CompuConstTextContent(CompuConstContent):
38
55
  '''
39
56
  This meta-class represents the textual content of a scale.
@@ -45,6 +62,7 @@ class CompuConstTextContent(CompuConstContent):
45
62
 
46
63
  self.vt = None
47
64
 
65
+
48
66
  class CompuConstNumericContent(CompuConstContent):
49
67
 
50
68
  def __init__(self):
@@ -52,30 +70,35 @@ class CompuConstNumericContent(CompuConstContent):
52
70
 
53
71
  self.v = None
54
72
 
55
- class CompuConst(ARObject):
56
- '''
57
- This meta-class represents the fact that the value of a computation method scale is constant.
58
- Base : ARObject
59
- Aggregated by : Compu.compuDefaultValue, CompuScale.compuInverseValue, CompuScaleConstantContents.compuCons
60
- '''
61
- def __init__(self):
62
- super().__init__()
63
-
64
- self.compu_const_content_type = None # type: CompuConstContent
65
73
 
66
74
  class CompuScaleContents(ARObject, metaclass=ABCMeta):
67
75
  def __init__(self):
68
76
  if type(self) == CompuScaleContents:
69
77
  raise NotImplementedError("CompuScaleContents is an abstract class.")
70
-
78
+
71
79
  super().__init__()
72
80
 
81
+
73
82
  class CompuScaleConstantContents(CompuScaleContents):
74
83
  def __init__(self):
75
84
  super().__init__()
76
85
 
77
86
  self.compu_const = None # type: CompuConst
78
87
 
88
+
89
+ class CompuRationalCoeffs(ARObject):
90
+ '''
91
+ This meta-class represents the ability to express a rational function by specifying the coefficients of nominator and denominator.
92
+ Base : ARObject
93
+ Aggregated by : CompuScaleRationalFormula.compuRationalCoeffs
94
+ '''
95
+ def __init__(self):
96
+ super().__init__()
97
+
98
+ self.compu_denominator = None # type: CompuNominatorDenominator
99
+ self.compu_numerator = None # type: CompuNominatorDenominator
100
+
101
+
79
102
  class CompuScaleRationalFormula(CompuScaleContents):
80
103
  '''
81
104
  This meta-class represents the fact that the computation in this scale is represented as rational term.
@@ -85,6 +108,7 @@ class CompuScaleRationalFormula(CompuScaleContents):
85
108
 
86
109
  self.compu_rational_coeffs = None # type: CompuRationalCoeffs
87
110
 
111
+
88
112
  class CompuNominatorDenominator(ARObject):
89
113
  '''
90
114
  This class represents the ability to express a polynomial either as Nominator or as Denominator.
@@ -102,17 +126,6 @@ class CompuNominatorDenominator(ARObject):
102
126
  def get_vs(self) -> List[float]:
103
127
  return self.v
104
128
 
105
- class CompuRationalCoeffs(ARObject):
106
- '''
107
- This meta-class represents the ability to express a rational function by specifying the coefficients of nominator and denominator.
108
- Base : ARObject
109
- Aggregated by : CompuScaleRationalFormula.compuRationalCoeffs
110
- '''
111
- def __init__(self):
112
- super().__init__()
113
-
114
- self.compu_denominator = None # type: CompuNominatorDenominator
115
- self.compu_numerator = None # type: CompuNominatorDenominator
116
129
 
117
130
  class CompuScale(Compu):
118
131
  def __init__(self):
@@ -125,6 +138,7 @@ class CompuScale(Compu):
125
138
  self.compuScaleContents = None # type: CompuScaleContents
126
139
  self.short_label = None # type: ARLiteral
127
140
 
141
+
128
142
  class CompuScales(CompuContent):
129
143
  def __init__(self):
130
144
  super().__init__()
@@ -137,6 +151,7 @@ class CompuScales(CompuContent):
137
151
  def getCompuScales(self) -> List[CompuScale]:
138
152
  return self.compu_scales
139
153
 
154
+
140
155
  class CompuMethod(ARElement):
141
156
  CATEGORY_TEXTTABLE = "TEXTTABLE"
142
157
 
@@ -1,8 +1,7 @@
1
- from .ar_ref import RefType
2
- from .ar_object import ARNumerical, ARObject
3
- from .general_structure import Identifiable, Limit
4
-
5
1
  from typing import List
2
+ from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
3
+ from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Identifiable
4
+ from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARNumerical, Limit, RefType
6
5
 
7
6
  class InternalConstrs(ARObject):
8
7
  def __init__(self):
@@ -11,6 +10,7 @@ class InternalConstrs(ARObject):
11
10
  self.lower_limit = None # type: Limit
12
11
  self.upper_limit = None # type: Limit
13
12
 
13
+
14
14
  class PhysConstrs(ARObject):
15
15
  def __init__(self):
16
16
  super().__init__()
@@ -19,6 +19,7 @@ class PhysConstrs(ARObject):
19
19
  self.upper_limit = None # type: Limit
20
20
  self.unit_ref = None # type: RefType
21
21
 
22
+
22
23
  class DataConstrRule(ARObject):
23
24
  def __init__(self):
24
25
  super().__init__()
@@ -27,6 +28,7 @@ class DataConstrRule(ARObject):
27
28
  self.internalConstrs = None # type: InternalConstrs
28
29
  self.physConstrs = None # type: PhysConstrs
29
30
 
31
+
30
32
  class DataConstr(Identifiable):
31
33
  def __init__(self, parent: ARObject, short_name: str):
32
34
  super().__init__(parent, short_name)
@@ -0,0 +1,60 @@
1
+ from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
2
+ from typing import List
3
+
4
+ class Sd(ARObject):
5
+ def __init__(self):
6
+ super().__init__()
7
+
8
+ self.gid = ""
9
+ self.value = ""
10
+
11
+ def getGID(self):
12
+ return self.gid
13
+
14
+ def setGID(self, value):
15
+ self.gid = value
16
+ return self
17
+
18
+ def getValue(self):
19
+ return self.value
20
+
21
+ def setValue(self, value):
22
+ self.value = value
23
+ return self
24
+
25
+
26
+ class Sdg(ARObject):
27
+ def __init__(self):
28
+ super().__init__()
29
+
30
+ self.gid = ""
31
+ self.sd = [] # type: List[Sd]
32
+ self.sdgCaption = None
33
+ self.sdgContentsTypes = [] # type: List[Sdg]
34
+
35
+ def getGID(self):
36
+ return self.gid
37
+
38
+ def setGID(self, value):
39
+ self.gid = value
40
+ return self
41
+
42
+ def addSd(self, sd: Sd):
43
+ self.sd.append(sd)
44
+ return self
45
+
46
+ def getSds(self) -> List[Sd]:
47
+ return self.sd
48
+
49
+ def getSdgCaption(self):
50
+ return self.sdgCaption
51
+
52
+ def setSdgCaption(self, value):
53
+ self.sdgCaption = value
54
+ return self
55
+
56
+ def addSdgContentsType(self, sdg):
57
+ self.sdgContentsTypes.append(sdg)
58
+
59
+ def getSdgContentsTypes(self):
60
+ return self.sdgContentsTypes
@@ -1,7 +1,7 @@
1
+ from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
2
+ from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARFloat, ARNumerical, RefType, ARLiteral
3
+ from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import ARElement
1
4
 
2
- from ....ar_ref import RefType
3
- from ....ar_object import ARFloat, ARLiteral, ARNumerical, ARObject
4
- from ....general_structure import ARElement
5
5
  class PhysicalDimension(ARElement):
6
6
  def __init__(self, parent: ARObject, short_name: str):
7
7
  super().__init__(parent, short_name)
@@ -0,0 +1,26 @@
1
+ from typing import List
2
+ from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
3
+ from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARNumerical, RefType
4
+ from ....M2.MSR.DataDictionary.DataDefProperties import ValueList
5
+
6
+ class SwValues(ARObject):
7
+ def __init__(self):
8
+ super().__init__()
9
+
10
+ self._v = [] # type: List[ARNumerical]
11
+ self.vt = None # type: float
12
+
13
+ def addV(self, v: ARNumerical):
14
+ self._v.append(v)
15
+
16
+ def getVs(self) -> List[ARNumerical]:
17
+ return self._v
18
+
19
+
20
+ class SwValueCont(ARObject):
21
+ def __init__(self):
22
+ super().__init__()
23
+
24
+ self.sw_arraysize = None # type: ValueList
25
+ self.unit_ref = None # type: RefType
26
+ self.sw_values_phys = None # type: SwValues
@@ -1,8 +1,7 @@
1
-
2
1
  from typing import List
3
- from ....ar_object import ARLiteral, ARObject
4
- from ....general_structure import Identifiable
5
-
2
+ from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
3
+ from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARLiteral
4
+ from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Identifiable
6
5
 
7
6
  class SwAddrMethod(Identifiable):
8
7
  def __init__(self, parent: ARObject, short_name: str):
@@ -0,0 +1,145 @@
1
+ from typing import List
2
+ from ....M2.MSR.DataDictionary.CalibrationParameter import SwCalprmAxisTypeProps
3
+ from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
4
+ from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARFloat, ARNumerical, RefType
5
+
6
+ class SwGenericAxisParam(ARObject):
7
+ def __init__(self):
8
+ super().__init__()
9
+
10
+ self.swGenericAxisParamTypeRef = None # type: RefType
11
+ self.vfs = [] # type: List[ARFloat]
12
+
13
+ def getSwGenericAxisParamTypeRef(self):
14
+ return self.swGenericAxisParamTypeRef
15
+
16
+ def setSwGenericAxisParamTypeRef(self, value):
17
+ self.swGenericAxisParamTypeRef = value
18
+ return self
19
+
20
+ def getVfs(self):
21
+ return self.vfs
22
+
23
+ def addVf(self, value):
24
+ self.vfs.append(value)
25
+ return self
26
+
27
+ class SwAxisGeneric(ARObject):
28
+ def __init__(self):
29
+ super().__init__()
30
+
31
+ self.swAxisTypeRef = None # type: RefType
32
+ self.swGenericAxisParams = [] # type: List[SwGenericAxisParam]
33
+
34
+ def getSwAxisTypeRef(self):
35
+ return self.swAxisTypeRef
36
+
37
+ def setSwAxisTypeRef(self, value):
38
+ self.swAxisTypeRef = value
39
+ return self
40
+
41
+ def getSwGenericAxisParams(self):
42
+ return self.swGenericAxisParams
43
+
44
+ def addSwGenericAxisParam(self, value):
45
+ self.swGenericAxisParams.append(value)
46
+ return self
47
+
48
+ class SwAxisIndividual(SwCalprmAxisTypeProps):
49
+ def __init__(self):
50
+ super().__init__()
51
+
52
+ self.compuMethodRef = None # type: RefType
53
+ self.dataConstrRef = None # type: RefType
54
+ self.inputVariableTypeRef = None # type: RefType
55
+ self.swAxisGeneric = None # type: SwAxisGeneric
56
+ self.swMaxAxisPoints = None # type: ARNumerical
57
+ self.swMinAxisPoints = None # type: ARNumerical
58
+ self.swVariableRefs = [] # type: List
59
+ self.unitRef = None # type: RefType
60
+
61
+ def getCompuMethodRef(self):
62
+ return self.compuMethodRef
63
+
64
+ def setCompuMethodRef(self, value):
65
+ self.compuMethodRef = value
66
+ return self
67
+
68
+ def getDataConstrRef(self):
69
+ return self.dataConstrRef
70
+
71
+ def setDataConstrRef(self, value):
72
+ self.dataConstrRef = value
73
+ return self
74
+
75
+ def getInputVariableTypeRef(self):
76
+ return self.inputVariableTypeRef
77
+
78
+ def setInputVariableTypeRef(self, value):
79
+ self.inputVariableTypeRef = value
80
+ return self
81
+
82
+ def getSwAxisGeneric(self):
83
+ return self.swAxisGeneric
84
+
85
+ def setSwAxisGeneric(self, value):
86
+ self.swAxisGeneric = value
87
+ return self
88
+
89
+ def getSwMaxAxisPoints(self):
90
+ return self.swMaxAxisPoints
91
+
92
+ def setSwMaxAxisPoints(self, value):
93
+ self.swMaxAxisPoints = value
94
+ return self
95
+
96
+ def getSwMinAxisPoints(self):
97
+ return self.swMinAxisPoints
98
+
99
+ def setSwMinAxisPoints(self, value):
100
+ self.swMinAxisPoints = value
101
+ return self
102
+
103
+ def getSwVariableRefs(self):
104
+ return self.swVariableRefs
105
+
106
+ def setSwVariableRefs(self, value):
107
+ self.swVariableRefs = value
108
+ return self
109
+
110
+ def getUnitRef(self):
111
+ return self.unitRef
112
+
113
+ def setUnitRef(self, value):
114
+ self.unitRef = value
115
+ return self
116
+
117
+
118
+ class SwAxisGrouped(SwCalprmAxisTypeProps):
119
+ def __init__(self):
120
+ super().__init__()
121
+
122
+ self.sharedAxisTypeRef = None # type: RefType
123
+ self.swAxisIndex = None # type: ARNumerical
124
+ self.swCalprmRef = None # type: SwCalprmRefProxy
125
+
126
+ def getSharedAxisTypeRef(self):
127
+ return self.sharedAxisTypeRef
128
+
129
+ def setSharedAxisTypeRef(self, value):
130
+ self.sharedAxisTypeRef = value
131
+ return self
132
+
133
+ def getSwAxisIndex(self):
134
+ return self.swAxisIndex
135
+
136
+ def setSwAxisIndex(self, value):
137
+ self.swAxisIndex = value
138
+ return self
139
+
140
+ def getSwCalprmRef(self):
141
+ return self.swCalprmRef
142
+
143
+ def setSwCalprmRef(self, value):
144
+ self.swCalprmRef = value
145
+ return self
@@ -0,0 +1,37 @@
1
+ from typing import List
2
+ from abc import ABCMeta
3
+ from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
4
+ from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARFloat
5
+
6
+ class SwCalprmAxisTypeProps(ARObject, metaclass = ABCMeta):
7
+ def __init__(self):
8
+ if type(self) == SwCalprmAxisTypeProps:
9
+ raise NotImplementedError("SwCalprmAxisTypeProps is an abstract class.")
10
+
11
+ super().__init__()
12
+
13
+ self.maxGradient = None # type: ARFloat
14
+ self.monotony = None # type: MonotonyEnum
15
+
16
+
17
+ class SwCalprmAxis(ARObject):
18
+ def __init__(self):
19
+ super().__init__()
20
+
21
+ self.category = None # type: CalprmAxisCategoryEnum
22
+ self.displayFormat = None # type: DisplayFormatString
23
+ self.sw_axis_index = None # type: AxisIndexType
24
+ self.swCalibrationAccess = None # type: SwCalibrationAccessEnum
25
+ self.sw_calprm_axis_type_props = None # type: SwCalprmAxisTypeProps
26
+
27
+ class SwCalprmAxisSet(ARObject):
28
+ def __init__(self):
29
+ super().__init__()
30
+
31
+ self._swCalprmAxis = [] # type: List[SwCalprmAxis]
32
+
33
+ def addSwCalprmAxis(self, axis: SwCalprmAxis):
34
+ self._swCalprmAxis.append(axis)
35
+
36
+ def getSwCalprmAxises(self) -> List[SwCalprmAxis]:
37
+ return self._swCalprmAxis
@@ -1,11 +1,9 @@
1
1
  from typing import List
2
-
3
- from ...autosar_templates.common_structure import ValueSpecification
4
- from ....calibration import SwCalprmAxisSet
5
- from ....ar_ref import RefType
6
- from ....annotation import Annotation
7
- from ....ar_object import ARFloat, ARLiteral, ARObject
8
-
2
+ from ....M2.MSR.Documentation.Annotation import Annotation
3
+ from ....M2.MSR.DataDictionary.CalibrationParameter import SwCalprmAxisSet
4
+ from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
5
+ from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARFloat, RefType, ARLiteral
6
+ from ....M2.AUTOSARTemplates.CommonStructure import ValueSpecification
9
7
 
10
8
  class SwDataDefPropsConditional(ARObject):
11
9
  '''
@@ -261,9 +259,6 @@ class SwDataDefProps(ARObject):
261
259
  self.valueAxisDataTypeRef = value
262
260
  return self
263
261
 
264
-
265
-
266
-
267
262
  class SwPointerTargetProps(ARObject):
268
263
  def __init__(self):
269
264
  super().__init__()
@@ -293,3 +288,17 @@ class SwPointerTargetProps(ARObject):
293
288
  self.targetCategory = value
294
289
  return self
295
290
 
291
+
292
+ class ValueList(ARObject):
293
+ def __init__(self):
294
+ super().__init__()
295
+
296
+ self.v = None # type: ARFloat
297
+ self._vf = [] # type: List[ARLiteral]
298
+
299
+ def addVf(self, vf: ARLiteral):
300
+ self._vf.append(vf)
301
+
302
+ def getVfs(self) -> List[ARLiteral]:
303
+ return sorted(self._vf)
304
+