armodel 1.4.0__py3-none-any.whl → 1.4.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.
- armodel/__init__.py +2 -1
- armodel/cli/arxml_dump_cli.py +8 -6
- armodel/cli/arxml_format_cli.py +72 -0
- armodel/cli/connector_update_cli.py +11 -4
- armodel/data_models/__init__.py +0 -0
- armodel/data_models/sw_connector.py +22 -0
- armodel/lib/data_analyzer.py +1 -1
- armodel/models/__init__.py +3 -2
- armodel/models/annotation.py +20 -0
- armodel/models/ar_object.py +163 -18
- armodel/models/ar_package.py +110 -14
- armodel/models/ar_ref.py +62 -6
- armodel/models/bsw_module_template.py +97 -26
- armodel/models/calibration.py +107 -4
- armodel/models/common_structure.py +112 -37
- armodel/models/communication.py +10 -1
- armodel/models/data_def_properties.py +16 -0
- armodel/models/data_dictionary.py +46 -9
- armodel/models/data_prototype.py +24 -5
- armodel/models/datatype.py +69 -20
- armodel/models/end_to_end_protection.py +67 -0
- armodel/models/general_structure.py +25 -15
- armodel/models/global_constraints.py +4 -4
- armodel/models/implementation.py +80 -32
- armodel/models/m2_msr.py +6 -4
- armodel/models/multilanguage_data.py +42 -0
- armodel/models/per_instance_memory.py +14 -0
- armodel/models/port_interface.py +27 -4
- armodel/models/port_prototype.py +37 -17
- armodel/models/record_layout.py +118 -0
- armodel/models/service_mapping.py +11 -0
- armodel/models/service_needs.py +48 -0
- armodel/models/sw_component.py +224 -39
- armodel/parser/abstract_arxml_parser.py +248 -0
- armodel/parser/arxml_parser.py +1280 -810
- armodel/parser/connector_xlsx_parser.py +190 -0
- armodel/parser/excel_parser.py +18 -0
- armodel/tests/test_armodel/models/test_ar_object.py +152 -0
- armodel/tests/test_armodel/models/test_ar_package.py +1 -1
- armodel/tests/test_armodel/models/test_common_structure.py +2 -2
- armodel/tests/test_armodel/models/test_data_dictionary.py +7 -7
- armodel/tests/test_armodel/models/test_data_prototype.py +2 -2
- armodel/tests/test_armodel/models/test_datatype.py +4 -4
- armodel/tests/test_armodel/models/test_general_structure.py +1 -1
- armodel/tests/test_armodel/models/test_implementation.py +26 -0
- armodel/tests/test_armodel/models/test_m2_msr.py +4 -4
- armodel/tests/test_armodel/parser/test_arxml_parser.py +15 -0
- armodel/tests/test_armodel/parser/test_parse_bswmd.py +70 -46
- armodel/tests/test_armodel/parser/test_sw_components.py +93 -0
- armodel/writer/abstract_arxml_writer.py +123 -0
- armodel/writer/arxml_writer.py +1464 -350
- {armodel-1.4.0.dist-info → armodel-1.4.3.dist-info}/METADATA +90 -3
- armodel-1.4.3.dist-info/RECORD +78 -0
- {armodel-1.4.0.dist-info → armodel-1.4.3.dist-info}/WHEEL +1 -1
- {armodel-1.4.0.dist-info → armodel-1.4.3.dist-info}/entry_points.txt +2 -0
- armodel-1.4.0.dist-info/RECORD +0 -60
- {armodel-1.4.0.dist-info → armodel-1.4.3.dist-info}/LICENSE +0 -0
- {armodel-1.4.0.dist-info → armodel-1.4.3.dist-info}/top_level.txt +0 -0
armodel/models/ar_ref.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from abc import ABCMeta
|
|
2
|
+
from typing import List
|
|
2
3
|
from .ar_object import ARObject
|
|
3
4
|
|
|
4
5
|
class RefType(ARObject):
|
|
@@ -14,16 +15,34 @@ class TRefType(RefType):
|
|
|
14
15
|
class AutosarVariableRef(ARObject):
|
|
15
16
|
def __init__(self):
|
|
16
17
|
super().__init__()
|
|
17
|
-
self.autosar_variable_iref = None
|
|
18
|
-
self.autosar_variable_in_impl_datatype = None
|
|
18
|
+
self.autosar_variable_iref = None # type: VariableInAtomicSWCTypeInstanceRef
|
|
19
|
+
self.autosar_variable_in_impl_datatype = None # type: ArVariableInImplementationDataInstanceRef
|
|
19
20
|
self.local_variable_ref = None
|
|
20
21
|
|
|
22
|
+
class AutosarParameterRef(ARObject):
|
|
23
|
+
def __init__(self):
|
|
24
|
+
super().__init__()
|
|
25
|
+
|
|
26
|
+
self.autosar_parameter_iref = None # type: ParameterInAtomicSWCTypeInstanceRef
|
|
27
|
+
self.local_parameter_ref = None # type: RefType
|
|
28
|
+
|
|
21
29
|
class AtpInstanceRef(ARObject, metaclass=ABCMeta):
|
|
22
30
|
def __init__(self):
|
|
23
31
|
if type(self) == AtpInstanceRef:
|
|
24
32
|
raise NotImplementedError("AtpInstanceRef is an abstract class.")
|
|
33
|
+
|
|
25
34
|
super().__init__()
|
|
26
35
|
|
|
36
|
+
class VariableInAtomicSWCTypeInstanceRef(AtpInstanceRef):
|
|
37
|
+
def __init__(self):
|
|
38
|
+
super().__init__()
|
|
39
|
+
|
|
40
|
+
self.base_ref = None # type: RefType
|
|
41
|
+
self.context_data_prototype_ref = None # type: RefType
|
|
42
|
+
self.port_prototype_ref = None # type: RefType
|
|
43
|
+
self.root_variable_data_prototype_ref = None # type: RefType
|
|
44
|
+
self.target_data_prototype_ref = None # type: RefType
|
|
45
|
+
|
|
27
46
|
class PortInCompositionTypeInstanceRef(AtpInstanceRef, metaclass=ABCMeta):
|
|
28
47
|
def __init__(self):
|
|
29
48
|
if type(self) == PortInCompositionTypeInstanceRef:
|
|
@@ -95,7 +114,44 @@ class RModeInAtomicSwcInstanceRef(AtpInstanceRef):
|
|
|
95
114
|
def __init__(self):
|
|
96
115
|
super().__init__()
|
|
97
116
|
|
|
98
|
-
self.base_ref = None
|
|
99
|
-
self.
|
|
100
|
-
self.
|
|
101
|
-
self.
|
|
117
|
+
self.base_ref = None # type: RefType
|
|
118
|
+
self.context_mode_declaration_group_prototype_ref = None # type: RefType
|
|
119
|
+
self.context_port_ref = None # type: RefType
|
|
120
|
+
self.target_mode_declaration_ref = None # type: RefType
|
|
121
|
+
|
|
122
|
+
class ParameterInAtomicSWCTypeInstanceRef(AtpInstanceRef):
|
|
123
|
+
def __init__(self):
|
|
124
|
+
super().__init__()
|
|
125
|
+
|
|
126
|
+
self.base_ref = None # type: RefType
|
|
127
|
+
self.context_data_prototype_ref = None # type: RefType
|
|
128
|
+
self.port_prototype_ref = None # type: RefType
|
|
129
|
+
self.root_parameter_data_prototype_ref = None # type: RefType
|
|
130
|
+
self.target_data_prototype_ref = None # type: RefType
|
|
131
|
+
|
|
132
|
+
class ApplicationCompositeElementInPortInterfaceInstanceRef(AtpInstanceRef):
|
|
133
|
+
def __init__(self):
|
|
134
|
+
super().__init__()
|
|
135
|
+
|
|
136
|
+
self.base_ref = None # type: RefType
|
|
137
|
+
self.context_data_prototype_ref = None # type: RefType
|
|
138
|
+
self.root_data_prototype_ref = None # type: RefType
|
|
139
|
+
self.target_data_prototype_ref = None # type: RefType
|
|
140
|
+
|
|
141
|
+
class InnerPortGroupInCompositionInstanceRef(AtpInstanceRef):
|
|
142
|
+
def __init__(self):
|
|
143
|
+
super().__init__()
|
|
144
|
+
|
|
145
|
+
self.baseRef = None # type: RefType
|
|
146
|
+
self.contextRef = None # type: RefType
|
|
147
|
+
self.targetRef = None # type: RefType
|
|
148
|
+
|
|
149
|
+
class VariableDataPrototypeInSystemInstanceRef(AtpInstanceRef):
|
|
150
|
+
def __init__(self):
|
|
151
|
+
super().__init__()
|
|
152
|
+
|
|
153
|
+
self.baseRef = None # type: RefType
|
|
154
|
+
self.contextComponentRef = [] # type: List[RefType]
|
|
155
|
+
self.contextCompositionRef = None # type: RefType
|
|
156
|
+
self.contextPortRef = None # type: RefType
|
|
157
|
+
self.targetDataPrototypeRef = None # type: RefType
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from abc import ABCMeta
|
|
2
|
-
from typing import List
|
|
2
|
+
from typing import Dict, List
|
|
3
3
|
from .general_structure import AtpStructureElement, ARObject, ARElement
|
|
4
|
-
from .ar_object import ARBoolean
|
|
4
|
+
from .ar_object import ARBoolean, ARFloat, ARLiteral, ARNumerical, ARPositiveInteger
|
|
5
5
|
from .common_structure import ExecutableEntity, ModeDeclarationGroupPrototype, InternalBehavior, Identifiable
|
|
6
6
|
from .ar_ref import RefType
|
|
7
7
|
|
|
@@ -11,10 +11,16 @@ class BswModuleEntity(ExecutableEntity, metaclass=ABCMeta):
|
|
|
11
11
|
raise NotImplementedError("BswModuleEntity is an abstract class.")
|
|
12
12
|
super().__init__(parent, short_name)
|
|
13
13
|
|
|
14
|
-
self.
|
|
15
|
-
self.
|
|
16
|
-
self.implemented_entry_ref = None
|
|
17
|
-
self.
|
|
14
|
+
self.accessedModeGroupRefs = [] # type: List[RefType]
|
|
15
|
+
self.activationPointRefs = [] # type: List[RefType]
|
|
16
|
+
self.implemented_entry_ref = None # type: RefType
|
|
17
|
+
self._managedModeGroupRefs = [] # type: List[RefType]
|
|
18
|
+
|
|
19
|
+
def addManagedModeGroupRef(self, ref: RefType):
|
|
20
|
+
self._managedModeGroupRefs.append(ref)
|
|
21
|
+
|
|
22
|
+
def getManagedModeGroupRefs(self) -> List[RefType]:
|
|
23
|
+
return self._managedModeGroupRefs
|
|
18
24
|
|
|
19
25
|
class BswCalledEntity(BswModuleEntity):
|
|
20
26
|
def __init__(self, parent: ARObject, short_name: str):
|
|
@@ -47,7 +53,7 @@ class BswEvent(Identifiable, metaclass=ABCMeta):
|
|
|
47
53
|
raise NotImplementedError("BswEvent is an abstract class.")
|
|
48
54
|
super().__init__(parent, short_name)
|
|
49
55
|
|
|
50
|
-
self.
|
|
56
|
+
self.startsOnEventRef = None # type: RefType
|
|
51
57
|
|
|
52
58
|
class BswOperationInvokedEvent(BswEvent):
|
|
53
59
|
def __init__(self, parent: ARObject, short_name: str):
|
|
@@ -79,11 +85,13 @@ class BswTimingEvent(BswScheduleEvent):
|
|
|
79
85
|
def __init__(self, parent: ARObject, short_name: str):
|
|
80
86
|
super().__init__(parent, short_name)
|
|
81
87
|
|
|
82
|
-
self.period =
|
|
88
|
+
self.period = None # type: ARFloat
|
|
83
89
|
|
|
84
90
|
@property
|
|
85
|
-
def
|
|
86
|
-
|
|
91
|
+
def periodMs(self) -> int:
|
|
92
|
+
if self.period is not None:
|
|
93
|
+
return int(self.period.value * 1000)
|
|
94
|
+
return None
|
|
87
95
|
|
|
88
96
|
class BswDataReceivedEvent(BswScheduleEvent):
|
|
89
97
|
def __init__(self, parent: ARObject, short_name: str):
|
|
@@ -95,16 +103,62 @@ class BswInternalTriggerOccurredEvent(BswScheduleEvent):
|
|
|
95
103
|
def __init__(self, parent: ARObject, short_name: str):
|
|
96
104
|
super().__init__(parent, short_name)
|
|
97
105
|
|
|
98
|
-
self.event_source_ref = None
|
|
106
|
+
self.event_source_ref = None # type: RefType
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
class BswModeSwitchAckRequest(ARObject):
|
|
110
|
+
def __init__(self):
|
|
111
|
+
super().__init__()
|
|
112
|
+
|
|
113
|
+
self.timeout = None # type: ARFloat
|
|
114
|
+
|
|
115
|
+
class BswModeSenderPolicy(ARObject):
|
|
116
|
+
def __init__(self):
|
|
117
|
+
super().__init__()
|
|
118
|
+
|
|
119
|
+
self.ack_request = None # type: BswModeSwitchAckRequest
|
|
120
|
+
self.enhanced_mode_api = None # type: ARBoolean
|
|
121
|
+
self._provided_mode_group_ref = None # type: RefType
|
|
122
|
+
self._queue_length = None # type: ARNumerical
|
|
123
|
+
|
|
124
|
+
def setProvidedModeGroupRef(self, ref: RefType):
|
|
125
|
+
self._provided_mode_group_ref = ref
|
|
126
|
+
return self
|
|
127
|
+
|
|
128
|
+
def getProvidedModeGroupRef(self) -> RefType:
|
|
129
|
+
return self._provided_mode_group_ref
|
|
130
|
+
|
|
131
|
+
def setQueueLength(self, length: any):
|
|
132
|
+
if isinstance(length, ARNumerical):
|
|
133
|
+
self._queue_length = length
|
|
134
|
+
elif isinstance(length, int):
|
|
135
|
+
self._queue_length = ARNumerical()
|
|
136
|
+
self._queue_length.setValue(length)
|
|
137
|
+
else:
|
|
138
|
+
raise ValueError("Unsupported type <%s>" % type(length))
|
|
139
|
+
|
|
140
|
+
def getQueueLength(self) -> ARNumerical:
|
|
141
|
+
return self._queue_length
|
|
99
142
|
|
|
100
143
|
class BswInternalBehavior(InternalBehavior):
|
|
101
144
|
def __init__(self, parent: ARObject, short_name: str):
|
|
102
145
|
super().__init__(parent, short_name)
|
|
103
146
|
|
|
147
|
+
self._entities = [] # type: List[BswModuleEntity]
|
|
148
|
+
self._events = [] # type: List[BswEvent]
|
|
149
|
+
self._mode_sender_policies = [] # type: List[BswModeSenderPolicy]
|
|
150
|
+
|
|
151
|
+
def addModeSenderPolicy(self, policy: BswModeSenderPolicy):
|
|
152
|
+
self._mode_sender_policies.append(policy)
|
|
153
|
+
|
|
154
|
+
def getModeSenderPolicies(self) -> List[BswModeSenderPolicy]:
|
|
155
|
+
return self._mode_sender_policies
|
|
156
|
+
|
|
104
157
|
def createBswCalledEntity(self, short_name: str) -> BswCalledEntity:
|
|
105
158
|
if (short_name not in self.elements):
|
|
106
159
|
event = BswCalledEntity(self, short_name)
|
|
107
160
|
self.elements[short_name] = event
|
|
161
|
+
self._entities.append(event)
|
|
108
162
|
return self.elements[short_name]
|
|
109
163
|
|
|
110
164
|
def getBswCalledEntities(self) -> List[BswCalledEntity]:
|
|
@@ -114,24 +168,30 @@ class BswInternalBehavior(InternalBehavior):
|
|
|
114
168
|
if (short_name not in self.elements):
|
|
115
169
|
event = BswSchedulableEntity(self, short_name)
|
|
116
170
|
self.elements[short_name] = event
|
|
171
|
+
self._entities.append(event)
|
|
117
172
|
return self.elements[short_name]
|
|
118
173
|
|
|
119
174
|
def getBswSchedulableEntities(self) -> List[BswSchedulableEntity]:
|
|
120
175
|
return list(filter(lambda a: isinstance(a, BswSchedulableEntity), self.elements.values()))
|
|
176
|
+
|
|
177
|
+
def getBswModuleEntities(self) -> List[BswModuleEntity]:
|
|
178
|
+
return list(filter(lambda a: isinstance(a, BswModuleEntity), self.elements.values()))
|
|
121
179
|
|
|
122
180
|
def createBswModeSwitchEvent(self, short_name: str) -> BswModeSwitchEvent:
|
|
123
181
|
if (short_name not in self.elements):
|
|
124
182
|
event = BswModeSwitchEvent(self, short_name)
|
|
125
183
|
self.elements[short_name] = event
|
|
184
|
+
self._events.append(event)
|
|
126
185
|
return self.elements[short_name]
|
|
127
186
|
|
|
128
187
|
def getBswModeSwitchEvents(self) -> List[BswModeSwitchEvent]:
|
|
129
188
|
return list(filter(lambda a: isinstance(a, BswModeSwitchEvent), self.elements.values()))
|
|
130
|
-
|
|
189
|
+
|
|
131
190
|
def createBswTimingEvent(self, short_name: str) -> BswTimingEvent:
|
|
132
191
|
if (short_name not in self.elements):
|
|
133
192
|
event = BswTimingEvent(self, short_name)
|
|
134
193
|
self.elements[short_name] = event
|
|
194
|
+
self._events.append(event)
|
|
135
195
|
return self.elements[short_name]
|
|
136
196
|
|
|
137
197
|
def getBswTimingEvents(self) -> List[BswTimingEvent]:
|
|
@@ -141,6 +201,7 @@ class BswInternalBehavior(InternalBehavior):
|
|
|
141
201
|
if (short_name not in self.elements):
|
|
142
202
|
event = BswDataReceivedEvent(self, short_name)
|
|
143
203
|
self.elements[short_name] = event
|
|
204
|
+
self._events.append(event)
|
|
144
205
|
return self.elements[short_name]
|
|
145
206
|
|
|
146
207
|
def getBswDataReceivedEvents(self) -> List[BswDataReceivedEvent]:
|
|
@@ -150,10 +211,14 @@ class BswInternalBehavior(InternalBehavior):
|
|
|
150
211
|
if (short_name not in self.elements):
|
|
151
212
|
event = BswInternalTriggerOccurredEvent(self, short_name)
|
|
152
213
|
self.elements[short_name] = event
|
|
214
|
+
self._events.append(event)
|
|
153
215
|
return self.elements[short_name]
|
|
154
216
|
|
|
155
217
|
def getBswInternalTriggerOccurredEvents(self) -> List[BswInternalTriggerOccurredEvent]:
|
|
156
218
|
return list(filter(lambda a: isinstance(a, BswInternalTriggerOccurredEvent), self.elements.values()))
|
|
219
|
+
|
|
220
|
+
def getBswEvents(self) -> List[BswEvent]:
|
|
221
|
+
return list(filter(lambda a: isinstance(a, BswEvent), self.elements.values()))
|
|
157
222
|
|
|
158
223
|
class BswModuleDescription(AtpStructureElement):
|
|
159
224
|
'''
|
|
@@ -169,12 +234,18 @@ class BswModuleDescription(AtpStructureElement):
|
|
|
169
234
|
super().__init__(parent, short_name)
|
|
170
235
|
|
|
171
236
|
# MODULE-ID
|
|
172
|
-
self.module_id =
|
|
237
|
+
self.module_id = None # type: ARPositiveInteger
|
|
173
238
|
# PROVIDED-ENTRYS
|
|
174
|
-
self.
|
|
239
|
+
self._implementedEntryRefs = [] # type: List[RefType]
|
|
240
|
+
|
|
241
|
+
self.providedModeGroups = {} # type: Dict[str, ModeDeclarationGroupPrototype]
|
|
242
|
+
self.requiredModeGroups = {} # tyep: Dict[str, ModeDeclarationGroupPrototype]
|
|
243
|
+
|
|
244
|
+
def addImplementedEntry(self, entry_ref: RefType):
|
|
245
|
+
self._implementedEntryRefs.append(entry_ref)
|
|
175
246
|
|
|
176
|
-
|
|
177
|
-
self.
|
|
247
|
+
def getImplementedEntries(self) -> List[RefType]:
|
|
248
|
+
return self._implementedEntryRefs
|
|
178
249
|
|
|
179
250
|
@property
|
|
180
251
|
def category(self) -> str:
|
|
@@ -190,21 +261,21 @@ class BswModuleDescription(AtpStructureElement):
|
|
|
190
261
|
if (short_name not in self.elements):
|
|
191
262
|
prototype = ModeDeclarationGroupPrototype(self, short_name)
|
|
192
263
|
self.elements[short_name] = prototype
|
|
193
|
-
self.
|
|
264
|
+
self.providedModeGroups[short_name] = prototype
|
|
194
265
|
return self.elements[short_name]
|
|
195
266
|
|
|
196
267
|
def getProvidedModeGroups(self) -> List[ModeDeclarationGroupPrototype]:
|
|
197
|
-
return sorted(self.
|
|
268
|
+
return sorted(self.providedModeGroups.values(), key=lambda v: v.short_name)
|
|
198
269
|
|
|
199
270
|
def createRequiredModeGroup(self, short_name: str) -> ModeDeclarationGroupPrototype:
|
|
200
271
|
if (short_name not in self.elements):
|
|
201
272
|
prototype = ModeDeclarationGroupPrototype(self, short_name)
|
|
202
273
|
self.elements[short_name] = prototype
|
|
203
|
-
self.
|
|
274
|
+
self.requiredModeGroups[short_name] = property
|
|
204
275
|
return self.elements[short_name]
|
|
205
276
|
|
|
206
277
|
def getRequiredModeGroups(self) -> List[ModeDeclarationGroupPrototype]:
|
|
207
|
-
return sorted(self.
|
|
278
|
+
return sorted(self.requiredModeGroups.values(), key=lambda v: v.short_name)
|
|
208
279
|
|
|
209
280
|
def createBswInternalBehavior(self, short_name: str) -> BswInternalBehavior:
|
|
210
281
|
'''
|
|
@@ -222,12 +293,12 @@ class BswModuleEntry(ARElement):
|
|
|
222
293
|
def __init__(self, parent: ARObject, short_name: str):
|
|
223
294
|
super().__init__(parent, short_name)
|
|
224
295
|
|
|
225
|
-
self.service_id = None
|
|
226
|
-
self.is_reentrant = None
|
|
227
|
-
self.is_synchronous = None
|
|
228
|
-
self.call_type = None
|
|
229
|
-
self._execution_context = None
|
|
230
|
-
self._sw_service_impl_policy = None
|
|
296
|
+
self.service_id = None # type: ARNumerical
|
|
297
|
+
self.is_reentrant = None # type: ARBoolean
|
|
298
|
+
self.is_synchronous = None # type: ARBoolean
|
|
299
|
+
self.call_type = None # type: ARLiteral
|
|
300
|
+
self._execution_context = None # type: ARLiteral
|
|
301
|
+
self._sw_service_impl_policy = None # type: ARLiteral
|
|
231
302
|
|
|
232
303
|
@property
|
|
233
304
|
def execution_context(self):
|
armodel/models/calibration.py
CHANGED
|
@@ -1,16 +1,119 @@
|
|
|
1
|
-
from
|
|
1
|
+
from abc import ABCMeta
|
|
2
|
+
from typing import List
|
|
3
|
+
|
|
4
|
+
from .ar_object import ARFloat, ARNumerical, ARObject
|
|
2
5
|
from .ar_ref import RefType
|
|
6
|
+
from .data_def_properties import ValueList
|
|
3
7
|
|
|
4
8
|
class SwValues(ARObject):
|
|
5
9
|
def __init__(self):
|
|
6
10
|
super().__init__()
|
|
7
11
|
|
|
8
|
-
self.
|
|
12
|
+
self._v = [] # type: List[ARNumerical]
|
|
13
|
+
self.vt = None # type: float
|
|
14
|
+
|
|
15
|
+
def addV(self, v: ARNumerical):
|
|
16
|
+
self._v.append(v)
|
|
9
17
|
|
|
18
|
+
def getVs(self) -> List[ARNumerical]:
|
|
19
|
+
return self._v
|
|
20
|
+
|
|
10
21
|
class SwValueCont(ARObject):
|
|
11
22
|
def __init__(self):
|
|
12
23
|
super().__init__()
|
|
13
24
|
|
|
14
|
-
self.
|
|
15
|
-
self.
|
|
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
|
+
|
|
16
119
|
|