armodel 1.6.1__py3-none-any.whl → 1.6.3__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 (157) hide show
  1. armodel/cli/arxml_dump_cli.py +31 -25
  2. armodel/cli/arxml_format_cli.py +1 -4
  3. armodel/cli/connector_update_cli.py +1 -1
  4. armodel/cli/swc_list_cli.py +1 -1
  5. armodel/lib/sw_component.py +3 -1
  6. armodel/lib/system_signal.py +3 -1
  7. armodel/models/M2/AUTOSARTemplates/AutosarTopLevelStructure.py +123 -0
  8. armodel/models/{bsw_module_template.py → M2/AUTOSARTemplates/BswModuleTemplate/BswBehavior.py} +115 -140
  9. armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswImplementation.py +21 -0
  10. armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswInterfaces.py +52 -0
  11. armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswOverview.py +78 -0
  12. armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/__init__.py +1 -0
  13. armodel/models/M2/AUTOSARTemplates/CommonStructure/Implementation.py +81 -0
  14. armodel/models/{m2/autosar_templates/common_structure/implementation_data_types.py → M2/AUTOSARTemplates/CommonStructure/ImplementationDataTypes.py} +20 -10
  15. armodel/models/M2/AUTOSARTemplates/CommonStructure/InternalBehavior.py +108 -0
  16. armodel/models/M2/AUTOSARTemplates/CommonStructure/ModeDeclaration.py +96 -0
  17. armodel/models/M2/AUTOSARTemplates/CommonStructure/ResourceConsumption/MemorySectionUsage.py +72 -0
  18. armodel/models/M2/AUTOSARTemplates/CommonStructure/ResourceConsumption/__init__.py +22 -0
  19. armodel/models/{service_needs.py → M2/AUTOSARTemplates/CommonStructure/ServiceNeeds.py} +7 -7
  20. armodel/models/M2/AUTOSARTemplates/CommonStructure/SwcBswMapping.py +36 -0
  21. armodel/models/M2/AUTOSARTemplates/CommonStructure/SwcInternalBehavior/ModeDeclarationGroup.py +27 -0
  22. armodel/models/M2/AUTOSARTemplates/CommonStructure/SwcInternalBehavior/__init__.py +1 -0
  23. armodel/models/M2/AUTOSARTemplates/CommonStructure/TriggerDeclaration.py +9 -0
  24. armodel/models/{m2/autosar_templates/common_structure → M2/AUTOSARTemplates/CommonStructure}/__init__.py +5 -2
  25. armodel/models/{m2/autosar_templates/generic_structure/abstract_structure.py → M2/AUTOSARTemplates/GenericStructure/AbstractStructure.py} +25 -2
  26. armodel/models/{ar_package.py → M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ARPackage.py} +113 -218
  27. armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ArObject.py +16 -0
  28. armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ElementCollection.py +1 -0
  29. armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/EngineeringObject.py +55 -0
  30. armodel/models/{general_structure.py → M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/Identifiable.py} +37 -149
  31. armodel/models/{ar_object.py → M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/PrimitiveTypes.py} +163 -70
  32. armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/__init__.py +1 -0
  33. armodel/models/M2/AUTOSARTemplates/GenericStructure/__init__.py +1 -0
  34. armodel/models/{m2/autosar_templates/sw_component_template/communication.py → M2/AUTOSARTemplates/SWComponentTemplate/Communication.py} +22 -5
  35. armodel/models/{m2/autosar_templates/sw_component_template/components/instance_refs.py → M2/AUTOSARTemplates/SWComponentTemplate/Components/InstanceRefs.py} +2 -2
  36. armodel/models/{m2/autosar_templates/sw_component_template/components → M2/AUTOSARTemplates/SWComponentTemplate/Components}/__init__.py +10 -8
  37. armodel/models/{m2/autosar_templates/sw_component_template/composition/instance_refs.py → M2/AUTOSARTemplates/SWComponentTemplate/Composition/InstanceRefs.py} +2 -2
  38. armodel/models/{m2/autosar_templates/sw_component_template/composition → M2/AUTOSARTemplates/SWComponentTemplate/Composition}/__init__.py +5 -5
  39. armodel/models/{m2/autosar_templates/sw_component_template/data_type/data_prototypes.py → M2/AUTOSARTemplates/SWComponentTemplate/Datatype/DataPrototypes.py} +25 -7
  40. armodel/models/{datatype.py → M2/AUTOSARTemplates/SWComponentTemplate/Datatype/Datatypes.py} +16 -74
  41. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Datatype/__init__.py +1 -0
  42. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/EndToEndProtection.py +177 -0
  43. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcImplementation.py +11 -0
  44. armodel/models/{m2/autosar_templates/sw_component_template/swc_internal_behavior/access_count.py → M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/AccessCount.py} +2 -2
  45. armodel/models/{m2/autosar_templates/sw_component_template/swc_internal_behavior/data_elements.py → M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/DataElements.py} +7 -5
  46. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/IncludedDataTypes.py +24 -0
  47. armodel/models/{m2/autosar_templates/sw_component_template/swc_internal_behavior/instance_refs_usage.py → M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/InstanceRefsUsage.py} +3 -3
  48. armodel/models/{m2/autosar_templates/sw_component_template/swc_internal_behavior/mode_declaration_group.py → M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ModeDeclarationGroup.py} +3 -3
  49. armodel/models/{per_instance_memory.py → M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/PerInstanceMemory.py} +5 -6
  50. armodel/models/{m2/autosar_templates/sw_component_template/swc_internal_behavior/server_call.py → M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ServerCall.py} +3 -3
  51. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ServiceMapping.py +23 -0
  52. armodel/models/{m2/autosar_templates/sw_component_template/swc_internal_behavior/trigger.py → M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/Trigger.py} +2 -2
  53. armodel/models/{m2/autosar_templates/sw_component_template/swc_internal_behavior → M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior}/__init__.py +9 -10
  54. armodel/models/{m2/autosar_templates/sw_component_template → M2/AUTOSARTemplates/SWComponentTemplate}/port_interface/__init__.py +12 -8
  55. armodel/models/{m2/autosar_templates/sw_component_template → M2/AUTOSARTemplates/SWComponentTemplate}/port_interface/instance_refs.py +2 -2
  56. armodel/models/{m2/autosar_templates/system_template/instance_refs.py → M2/AUTOSARTemplates/SystemTemplate/InstanceRefs.py} +2 -2
  57. armodel/models/{m2/autosar_templates/system_template → M2/AUTOSARTemplates/SystemTemplate}/__init__.py +4 -2
  58. armodel/models/{m2/autosar_templates/system_template → M2/AUTOSARTemplates/SystemTemplate}/data_mapping.py +2 -2
  59. armodel/models/{m2/autosar_templates/system_template → M2/AUTOSARTemplates/SystemTemplate}/network_management.py +7 -3
  60. armodel/models/{m2/autosar_templates/system_template → M2/AUTOSARTemplates/SystemTemplate}/transport_protocols.py +1 -1
  61. armodel/models/{m2/autosar_templates → M2/AUTOSARTemplates}/ecuc_description_template.py +10 -6
  62. armodel/models/M2/MSR/AsamHdo/AdminData.py +21 -0
  63. armodel/models/M2/MSR/AsamHdo/BaseTypes.py +77 -0
  64. armodel/models/{m2_msr.py → M2/MSR/AsamHdo/ComputationMethod.py} +44 -28
  65. armodel/models/{global_constraints.py → M2/MSR/AsamHdo/Constraints/GlobalConstraints.py} +7 -4
  66. armodel/models/M2/MSR/AsamHdo/Constraints/__init__.py +1 -0
  67. armodel/models/M2/MSR/AsamHdo/SpecialData.py +63 -0
  68. armodel/models/{m2/msr/asam_hdo/units.py → M2/MSR/AsamHdo/Units.py} +6 -3
  69. armodel/models/M2/MSR/AsamHdo/__init__.py +1 -0
  70. armodel/models/M2/MSR/CalibrationData/CalibrationValue.py +30 -0
  71. armodel/models/M2/MSR/CalibrationData/__init__.py +1 -0
  72. armodel/models/{m2/msr/data_dictionary/auxillary_objects.py → M2/MSR/DataDictionary/AuxillaryObjects.py} +4 -2
  73. armodel/models/M2/MSR/DataDictionary/Axis.py +145 -0
  74. armodel/models/M2/MSR/DataDictionary/CalibrationParameter.py +37 -0
  75. armodel/models/{m2/msr/data_dictionary/data_def_properties.py → M2/MSR/DataDictionary/DataDefProperties.py} +19 -9
  76. armodel/models/{record_layout.py → M2/MSR/DataDictionary/RecordLayout.py} +26 -25
  77. armodel/models/M2/MSR/DataDictionary/__init__.py +1 -0
  78. armodel/models/{annotation.py → M2/MSR/Documentation/Annotation.py} +8 -8
  79. armodel/models/{m2/msr/documentation/block_elements.py → M2/MSR/Documentation/BlockElements.py} +2 -2
  80. armodel/models/M2/MSR/Documentation/TextModel/LanguageDataModel.py +17 -0
  81. armodel/models/{multilanguage_data.py → M2/MSR/Documentation/TextModel/MultilanguageData.py} +21 -30
  82. armodel/models/M2/MSR/Documentation/TextModel/__init__.py +2 -0
  83. armodel/models/M2/MSR/Documentation/__init__.py +3 -0
  84. armodel/models/M2/MSR/__init__.py +1 -0
  85. armodel/models/M2/__init__.py +1 -0
  86. armodel/models/__init__.py +6 -23
  87. armodel/models/fibex/can_communication.py +3 -2
  88. armodel/models/fibex/fibex_4_multiplatform.py +5 -3
  89. armodel/models/fibex/fibex_core/core_communication.py +9 -3
  90. armodel/models/fibex/fibex_core/core_topology.py +7 -3
  91. armodel/models/fibex/lin_communication.py +5 -1
  92. armodel/models/rpt_scenario.py +2 -2
  93. armodel/models/sw_component.py +19 -14
  94. armodel/models/timing.py +3 -3
  95. armodel/parser/abstract_arxml_parser.py +8 -4
  96. armodel/parser/arxml_parser.py +120 -86
  97. armodel/parser/connector_xlsx_parser.py +6 -2
  98. armodel/report/connector_xls_report.py +2 -1
  99. armodel/tests/test_armodel/models/test_ar_object.py +2 -1
  100. armodel/tests/test_armodel/models/test_ar_package.py +20 -8
  101. armodel/tests/test_armodel/models/test_ar_ref.py +7 -5
  102. armodel/tests/test_armodel/models/test_bsw_module_template.py +5 -1
  103. armodel/tests/test_armodel/models/test_common_structure.py +11 -5
  104. armodel/tests/test_armodel/models/test_data_dictionary.py +2 -2
  105. armodel/tests/test_armodel/models/test_data_prototype.py +7 -3
  106. armodel/tests/test_armodel/models/test_datatype.py +22 -8
  107. armodel/tests/test_armodel/models/test_general_structure.py +12 -2
  108. armodel/tests/test_armodel/models/test_implementation.py +3 -2
  109. armodel/tests/test_armodel/models/test_m2_msr.py +4 -2
  110. armodel/tests/test_armodel/models/test_port_interface.py +16 -6
  111. armodel/tests/test_armodel/models/test_port_prototype.py +1 -1
  112. armodel/tests/test_armodel/parser/test_parse_bswmd.py +3 -1
  113. armodel/tests/test_armodel/parser/test_sw_components.py +2 -2
  114. armodel/tests/test_armodel/parser/test_system.py +30 -0
  115. armodel/writer/abstract_arxml_writer.py +5 -2
  116. armodel/writer/arxml_writer.py +100 -67
  117. {armodel-1.6.1.dist-info → armodel-1.6.3.dist-info}/METADATA +366 -356
  118. armodel-1.6.3.dist-info/RECORD +148 -0
  119. {armodel-1.6.1.dist-info → armodel-1.6.3.dist-info}/WHEEL +1 -1
  120. armodel/lib/data_analyzer.py +0 -34
  121. armodel/models/ar_ref.py +0 -25
  122. armodel/models/calibration.py +0 -119
  123. armodel/models/common_structure.py +0 -272
  124. armodel/models/communication.py +0 -17
  125. armodel/models/data_def_properties.py +0 -16
  126. armodel/models/data_dictionary.py +0 -59
  127. armodel/models/data_prototype.py +0 -103
  128. armodel/models/ecuc_parameter_def_template.py +0 -0
  129. armodel/models/end_to_end_protection.py +0 -67
  130. armodel/models/fibex/fibex_core.py +0 -341
  131. armodel/models/fibex/lin_topology.py +0 -7
  132. armodel/models/implementation.py +0 -135
  133. armodel/models/internal_behavior.py +0 -63
  134. armodel/models/m2/autosar_templates/common_structure/constants.py +0 -0
  135. armodel/models/m2/autosar_templates/common_structure/implementation.py +0 -21
  136. armodel/models/m2/autosar_templates/generic_structure/__init__.py +0 -0
  137. armodel/models/m2/autosar_templates/sw_component_template/__init__.py +0 -0
  138. armodel/models/m2/autosar_templates/sw_component_template/data_type/__init__.py +0 -0
  139. armodel/models/m2/autosar_templates/sw_component_template/port_interface.py +0 -236
  140. armodel/models/m2/msr/__init__.py +0 -0
  141. armodel/models/m2/msr/asam_hdo/__init__.py +0 -0
  142. armodel/models/m2/msr/data_dictionary/__init__.py +0 -0
  143. armodel/models/m2/msr/documentation/__init__.py +0 -0
  144. armodel/models/mode_declaration.py +0 -8
  145. armodel/models/port_interface.py +0 -165
  146. armodel/models/port_prototype.py +0 -6
  147. armodel/models/service_mapping.py +0 -11
  148. armodel/models/system_template/__init__.py +0 -0
  149. armodel/models/system_template/network_management.py +0 -7
  150. armodel/models/system_template/transport_protocols.py +0 -7
  151. armodel/models/unit.py +0 -14
  152. armodel-1.6.1.dist-info/RECORD +0 -140
  153. /armodel/models/{m2 → M2/AUTOSARTemplates/SWComponentTemplate}/__init__.py +0 -0
  154. /armodel/models/{m2/autosar_templates → M2/AUTOSARTemplates}/__init__.py +0 -0
  155. {armodel-1.6.1.dist-info → armodel-1.6.3.dist-info}/LICENSE +0 -0
  156. {armodel-1.6.1.dist-info → armodel-1.6.3.dist-info}/entry_points.txt +0 -0
  157. {armodel-1.6.1.dist-info → armodel-1.6.3.dist-info}/top_level.txt +0 -0
@@ -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
File without changes
@@ -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)
@@ -1,341 +0,0 @@
1
- from abc import ABCMeta
2
- from typing import List
3
-
4
- from armodel.models.ar_ref import RefType
5
-
6
- from ..ar_object import ARFloat, ARLiteral, ARNumerical, ARObject, ARPositiveInteger
7
- from ..general_structure import Identifiable
8
-
9
-
10
- class FibexElement(Identifiable):
11
- __metaclass__ = ABCMeta
12
-
13
- def __init__(self, parent: ARObject, short_name: str):
14
- if type(self) == FibexElement:
15
- raise NotImplementedError("FibexElement is an abstract class.")
16
-
17
- super().__init__(parent, short_name)
18
-
19
- class PhysicalChannel (Identifiable):
20
- __metaclass__ = ABCMeta
21
-
22
- def __init__(self, parent: ARObject, short_name: str):
23
- if type(self) == PhysicalChannel:
24
- raise NotImplementedError("PhysicalChannel is an abstract class.")
25
-
26
- super().__init__(parent, short_name)
27
-
28
-
29
- class CommunicationCluster(FibexElement):
30
- __metaclass__ = ABCMeta
31
-
32
- def __init__(self, parent: ARObject, short_name: str):
33
- if type(self) == CommunicationCluster:
34
- raise NotImplementedError("CommunicationCluster is an abstract class.")
35
-
36
- super().__init__(parent, short_name)
37
-
38
- self.baudrate = None # type: ARFloat
39
- self.physical_channels = [] # type: List[PhysicalChannel]
40
- self.protocol_name = None # type: ARLiteral
41
- self.protocol_version = None # type: ARLiteral
42
-
43
- def addPhysicalChannel(self, channel: PhysicalChannel):
44
- self.physical_channels.append(channel)
45
-
46
- def getPhysicalChannels(self) -> List[PhysicalChannel]:
47
- return self.physical_channels
48
-
49
- @property
50
- def protocolName(self) -> ARLiteral:
51
- return self.protocol_name
52
-
53
- @protocolName.setter
54
- def protocolName(self, value: ARLiteral):
55
- self.protocol_name = value
56
-
57
- @property
58
- def protocolVersion(self) -> ARLiteral:
59
- return self.protocol_version
60
-
61
- @protocolVersion.setter
62
- def protocolVersion(self, value: ARLiteral):
63
- self.protocol_version = value
64
-
65
- class Pdu(FibexElement):
66
- __metaclass__ = ABCMeta
67
-
68
- def __init__(self, parent: ARObject, short_name: str):
69
- if type(self) == Pdu:
70
- raise NotImplementedError("Pdu is an abstract class.")
71
-
72
- super().__init__(parent, short_name)
73
-
74
- self.length = None # type: ARNumerical
75
-
76
- class PduToFrameMapping(Identifiable):
77
- def __init__(self, parent: ARObject, short_name: str):
78
- super().__init__(parent, short_name)
79
-
80
- self.packing_byte_order = None # type: ARLiteral
81
- self.pdu_ref = None # type: RefType
82
- self.start_position = None # type: ARNumerical
83
-
84
- @property
85
- def packingByteOrder(self) -> ARLiteral:
86
- return self.packing_byte_order
87
-
88
- @packingByteOrder.setter
89
- def packingByteOrder(self, value: ARLiteral):
90
- self.packing_byte_order = value
91
-
92
- @property
93
- def pduRef(self) -> RefType:
94
- return self.pdu_ref
95
-
96
- @pduRef.setter
97
- def pduRef(self, value: RefType):
98
- self.pdu_ref = value
99
-
100
- @property
101
- def startPosition(self) -> ARNumerical:
102
- return self.start_position
103
-
104
- @startPosition.setter
105
- def startPosition(self, value: ARNumerical):
106
- self.start_position = value
107
-
108
- class Frame(Identifiable):
109
- __metaclass__ = ABCMeta
110
-
111
- def __init__(self, parent: ARObject, short_name: str):
112
- if type(self) == Frame:
113
- raise NotImplementedError("Frame is an abstract class.")
114
-
115
- super().__init__(parent, short_name)
116
-
117
- self.frame_length = None
118
- self.pdu_to_frame_mappings = [] # type: List[PduToFrameMapping]
119
-
120
- @property
121
- def frameLength(self) -> ARNumerical:
122
- return self.frame_length
123
-
124
- @frameLength.setter
125
- def frameLength(self, value: ARNumerical):
126
- self.frame_length = value
127
-
128
- def createPduToFrameMapping(self, short_name: str) -> PduToFrameMapping:
129
- if (short_name not in self.elements):
130
- mapping = PduToFrameMapping(self, short_name)
131
- self.elements[short_name] = mapping
132
- self.pdu_to_frame_mappings.append(mapping)
133
- return self.elements[short_name]
134
-
135
- def getPduToFrameMappings(self) -> List[PduToFrameMapping]:
136
- return list(sorted(filter(lambda a: isinstance(a, PduToFrameMapping), self.elements.values()), key= lambda o:o.short_name))
137
-
138
- class ContainedIPduProps(ARObject):
139
- def __init__(self):
140
- super().__init__()
141
-
142
- self._collection_semantics = None # type: ARLiteral
143
- self._header_id_long_header = None # type: ARPositiveInteger
144
- self._header_id_short_header = None # type: ARPositiveInteger
145
- self._offset = None # type: ARNumerical
146
- self._timeout = None # type: ARNumerical
147
- self._trigger = None # type: ARLiteral
148
- self._update_indication_bit_position = None # type: ARNumerical
149
-
150
- @property
151
- def headerIdLongHeader(self) -> ARPositiveInteger:
152
- return self._header_id_long_header
153
-
154
- @headerIdLongHeader.setter
155
- def headerIdLongHeader(self, value: ARPositiveInteger):
156
- self._header_id_long_header = value
157
-
158
- @property
159
- def headerIdShortHeader(self) -> ARPositiveInteger:
160
- return self._header_id_short_header
161
-
162
- @headerIdShortHeader.setter
163
- def headerIdShortHeader(self, value: ARPositiveInteger):
164
- self._header_id_short_header = value
165
-
166
- @property
167
- def offset(self) -> ARNumerical:
168
- return self._offset
169
-
170
- @offset.setter
171
- def offset(self, value: ARNumerical):
172
- self._offset = value
173
-
174
- @property
175
- def timeout(self):
176
- return self._timeout
177
-
178
- @timeout.setter
179
- def timeout(self, value):
180
- self._timeout = value
181
-
182
- @property
183
- def collectionSemantics(self) -> ARLiteral:
184
- return self._collection_semantics
185
-
186
- @collectionSemantics.setter
187
- def collectionSemantics(self, value: ARLiteral):
188
- self._collection_semantics = value
189
-
190
- @property
191
- def trigger(self) -> ARLiteral:
192
- return self._trigger
193
-
194
- @trigger.setter
195
- def trigger(self, value: ARLiteral):
196
- self._trigger = value
197
-
198
- @property
199
- def updateIndicationBitPosition(self) -> ARNumerical:
200
- return self._update_indication_bit_position
201
-
202
- @updateIndicationBitPosition.setter
203
- def updateIndicationBitPosition(self, value: ARNumerical):
204
- self._update_indication_bit_position = value
205
-
206
- class IPdu(Pdu):
207
- __metaclass__ = ABCMeta
208
-
209
- def __init__(self, parent: ARObject, short_name: str):
210
- if type(self) == IPdu:
211
- raise NotImplementedError("IPdu is an abstract class.")
212
-
213
- super().__init__(parent, short_name)
214
-
215
- self._contained_ipdu_props = None # type: ContainedIPduProps
216
-
217
- @property
218
- def containedIPduProps(self) -> ContainedIPduProps:
219
- return self._contained_ipdu_props
220
-
221
- @containedIPduProps.setter
222
- def containedIPduProps(self, value: ContainedIPduProps):
223
- self._contained_ipdu_props = value
224
-
225
-
226
- class NmPdu(Pdu):
227
- def __init__(self, parent: ARObject, short_name: str):
228
- super().__init__(parent, short_name)
229
-
230
-
231
- class NPdu(IPdu):
232
- def __init__(self, parent: ARObject, short_name: str):
233
- super().__init__(parent, short_name)
234
-
235
- class DcmIPdu(IPdu):
236
- def __init__(self, parent: ARObject, short_name: str):
237
- super().__init__(parent, short_name)
238
-
239
- class FrameTriggering(Identifiable):
240
- __metaclass__ = ABCMeta
241
-
242
- def __init__(self, parent: ARObject, short_name: str):
243
- if type(self) == FrameTriggering:
244
- raise NotImplementedError("FrameTriggering is an abstract class.")
245
-
246
- super().__init__(parent, short_name)
247
-
248
- class ISignal(FibexElement):
249
- def __init__(self, parent: ARObject, short_name: str):
250
- super().__init__(parent, short_name)
251
-
252
- self._data_transformation_ref = None
253
- self._data_type_policy = None
254
- self._i_signal_props = None
255
- self._i_signal_type = None
256
- self._init_value = None
257
- self._length = None
258
- self._network_representation_props = None
259
- self._system_signal_ref = None # type: RefType
260
- self._timeout_substitution_value = None
261
- self._transformation_i_signal_props = []
262
-
263
- @property
264
- def dataTransformationRef(self):
265
- return self._data_transformation_ref
266
-
267
- @dataTransformationRef.setter
268
- def dataTransformationRef(self, value):
269
- self._data_transformation_ref = value
270
-
271
- @property
272
- def dataTypePolicy(self):
273
- return self._data_type_policy
274
-
275
- @dataTypePolicy.setter
276
- def dataTypePolicy(self, value):
277
- self._data_type_policy = value
278
-
279
- @property
280
- def iSignalProps(self):
281
- return self._i_signal_props
282
-
283
- @iSignalProps.setter
284
- def iSignalProps(self, value):
285
- self._i_signal_props = value
286
-
287
- @property
288
- def iSignalType(self):
289
- return self._i_signal_type
290
-
291
- @iSignalType.setter
292
- def iSignalType(self, value):
293
- self._i_signal_type = value
294
-
295
- @property
296
- def initValue(self):
297
- return self._init_value
298
-
299
- @initValue.setter
300
- def initValue(self, value):
301
- self._init_value = value
302
-
303
- @property
304
- def length(self):
305
- return self._length
306
-
307
- @length.setter
308
- def length(self, value):
309
- self._length = value
310
-
311
- @property
312
- def networkRepresentationProps(self):
313
- return self._network_representation_props
314
-
315
- @networkRepresentationProps.setter
316
- def networkRepresentationProps(self, value):
317
- self._network_representation_props = value
318
-
319
- @property
320
- def systemSignalRef(self):
321
- return self._system_signal_ref
322
-
323
- @systemSignalRef.setter
324
- def systemSignalRef(self, value):
325
- self._system_signal_ref = value
326
-
327
- @property
328
- def timeoutSubstitutionValue(self):
329
- return self._timeout_substitution_value
330
-
331
- @timeoutSubstitutionValue.setter
332
- def timeoutSubstitutionValue(self, value):
333
- self._timeout_substitution_value = value
334
-
335
- @property
336
- def transformationISignalProps(self):
337
- return self._transformation_i_signal_props
338
-
339
- @transformationISignalProps.setter
340
- def transformationISignalProps(self, value):
341
- self._transformation_i_signal_props = value
@@ -1,7 +0,0 @@
1
-
2
- from ..ar_object import ARObject
3
- from .fibex_core import CommunicationCluster
4
-
5
- class LinCluster(CommunicationCluster):
6
- def __init__(self, parent: ARObject, short_name: str):
7
- super().__init__(parent, short_name)