armodel 1.5.0__py3-none-any.whl → 1.6.0__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/cli/arxml_dump_cli.py +13 -13
- armodel/cli/memory_section_cli.py +76 -0
- armodel/cli/system_signal_cli.py +74 -0
- armodel/lib/__init__.py +2 -1
- armodel/lib/system_signal.py +37 -0
- armodel/models/__init__.py +6 -3
- armodel/models/annotation.py +27 -3
- armodel/models/ar_object.py +18 -6
- armodel/models/ar_package.py +124 -14
- armodel/models/ar_ref.py +109 -62
- armodel/models/bsw_module_template.py +37 -14
- armodel/models/common_structure.py +132 -147
- armodel/models/communication.py +1 -1
- armodel/models/data_prototype.py +41 -6
- armodel/models/datatype.py +11 -5
- armodel/models/fibex/can_communication.py +119 -3
- armodel/models/fibex/fibex_4_can/__init__.py +0 -0
- armodel/models/fibex/fibex_4_lin/__init__.py +0 -0
- armodel/models/fibex/fibex_4_multiplatform.py +81 -88
- armodel/models/fibex/fibex_core/__init__.py +0 -0
- armodel/models/fibex/fibex_core/core_communication.py +627 -0
- armodel/models/fibex/fibex_core/core_topology.py +180 -0
- armodel/models/fibex/lin_communication.py +24 -3
- armodel/models/general_structure.py +101 -8
- armodel/models/m2/__init__.py +0 -0
- armodel/models/m2/autosar_templates/__init__.py +0 -0
- armodel/models/m2/autosar_templates/common_structure/__init__.py +188 -0
- armodel/models/m2/autosar_templates/common_structure/constants.py +0 -0
- armodel/models/m2/autosar_templates/ecuc_description_template.py +268 -0
- armodel/models/m2/autosar_templates/sw_component_template/__init__.py +0 -0
- armodel/models/m2/autosar_templates/sw_component_template/communication.py +316 -0
- armodel/models/m2/autosar_templates/sw_component_template/components/__init__.py +0 -0
- armodel/models/m2/autosar_templates/sw_component_template/components/instance_refs.py +149 -0
- armodel/models/m2/autosar_templates/sw_component_template/port_interface.py +236 -0
- armodel/models/m2/autosar_templates/sw_component_template/swc_internal_behavior/__init__.py +203 -0
- armodel/models/m2/autosar_templates/sw_component_template/swc_internal_behavior/access_count.py +13 -0
- armodel/models/m2/autosar_templates/sw_component_template/swc_internal_behavior/data_elements.py +54 -0
- armodel/models/m2/autosar_templates/sw_component_template/swc_internal_behavior/mode_declaration_group.py +39 -0
- armodel/models/m2/autosar_templates/sw_component_template/swc_internal_behavior/server_call.py +26 -0
- armodel/models/m2/autosar_templates/sw_component_template/swc_internal_behavior/trigger.py +10 -0
- armodel/models/m2/autosar_templates/system_template/__init__.py +321 -0
- armodel/models/m2/autosar_templates/system_template/data_mapping.py +88 -0
- armodel/models/m2/autosar_templates/system_template/network_management.py +554 -0
- armodel/models/m2/autosar_templates/system_template/transport_protocols.py +7 -0
- armodel/models/m2/msr/__init__.py +0 -0
- armodel/models/m2/msr/asam_hdo/__init__.py +0 -0
- armodel/models/m2/msr/asam_hdo/units.py +105 -0
- armodel/models/m2/msr/data_dictionary/__init__.py +0 -0
- armodel/models/m2/msr/data_dictionary/auxillary_objects.py +42 -0
- armodel/models/m2/msr/data_dictionary/data_def_properties.py +295 -0
- armodel/models/m2/msr/documentation/__init__.py +0 -0
- armodel/models/m2/msr/documentation/block_elements.py +18 -0
- armodel/models/multilanguage_data.py +15 -0
- armodel/models/per_instance_memory.py +34 -6
- armodel/models/port_prototype.py +12 -174
- armodel/models/sw_component.py +14 -216
- armodel/parser/abstract_arxml_parser.py +10 -1
- armodel/parser/arxml_parser.py +803 -186
- armodel/tests/test_armodel/models/test_ar_package.py +1 -1
- armodel/tests/test_armodel/models/test_ar_ref.py +3 -3
- armodel/tests/test_armodel/models/test_bsw_module_template.py +5 -5
- armodel/tests/test_armodel/models/test_common_structure.py +3 -3
- armodel/tests/test_armodel/models/test_data_dictionary.py +5 -5
- armodel/tests/test_armodel/models/test_data_prototype.py +1 -1
- armodel/tests/test_armodel/models/test_datatype.py +1 -1
- armodel/tests/test_armodel/models/test_port_interface.py +1 -1
- armodel/tests/test_armodel/parser/test_parse_bswmd.py +3 -3
- armodel/tests/test_armodel/parser/test_sw_components.py +2 -2
- armodel/writer/arxml_writer.py +832 -196
- {armodel-1.5.0.dist-info → armodel-1.6.0.dist-info}/METADATA +24 -1
- armodel-1.6.0.dist-info/RECORD +127 -0
- {armodel-1.5.0.dist-info → armodel-1.6.0.dist-info}/entry_points.txt +3 -1
- armodel-1.5.0.dist-info/RECORD +0 -91
- {armodel-1.5.0.dist-info → armodel-1.6.0.dist-info}/LICENSE +0 -0
- {armodel-1.5.0.dist-info → armodel-1.6.0.dist-info}/WHEEL +0 -0
- {armodel-1.5.0.dist-info → armodel-1.6.0.dist-info}/top_level.txt +0 -0
armodel/models/ar_ref.py
CHANGED
|
@@ -7,17 +7,81 @@ class RefType(ARObject):
|
|
|
7
7
|
self.dest = ""
|
|
8
8
|
self.value = ""
|
|
9
9
|
|
|
10
|
+
def getDest(self):
|
|
11
|
+
return self.dest
|
|
12
|
+
|
|
13
|
+
def setDest(self, value):
|
|
14
|
+
self.dest = value
|
|
15
|
+
return self
|
|
16
|
+
|
|
17
|
+
def getValue(self):
|
|
18
|
+
return self.value
|
|
19
|
+
|
|
20
|
+
def setValue(self, value):
|
|
21
|
+
self.value = value
|
|
22
|
+
return self
|
|
23
|
+
|
|
10
24
|
class TRefType(RefType):
|
|
11
25
|
def __init__(self):
|
|
12
26
|
super().__init__()
|
|
13
|
-
|
|
27
|
+
|
|
28
|
+
class AnyInstanceRef(ARObject):
|
|
29
|
+
def __init__(self):
|
|
30
|
+
super().__init__()
|
|
31
|
+
|
|
32
|
+
self.baseRef = None # type: RefType
|
|
33
|
+
self.contextElementRef = None # type: RefType
|
|
34
|
+
self.targetRef = None # type: RefType
|
|
35
|
+
|
|
36
|
+
def getBaseRef(self) -> RefType:
|
|
37
|
+
return self.baseRef
|
|
38
|
+
|
|
39
|
+
def setBaseRef(self, value: RefType):
|
|
40
|
+
self.baseRef = value
|
|
41
|
+
return self
|
|
42
|
+
|
|
43
|
+
def getContextElementRef(self) -> RefType:
|
|
44
|
+
return self.contextElementRef
|
|
45
|
+
|
|
46
|
+
def setContextElementRef(self, value: RefType):
|
|
47
|
+
self.contextElementRef = value
|
|
48
|
+
return self
|
|
49
|
+
|
|
50
|
+
def getTargetRef(self) -> RefType:
|
|
51
|
+
return self.targetRef
|
|
52
|
+
|
|
53
|
+
def setTargetRef(self, value:RefType):
|
|
54
|
+
self.targetRef = value
|
|
55
|
+
return self
|
|
14
56
|
|
|
15
57
|
class AutosarVariableRef(ARObject):
|
|
16
58
|
def __init__(self):
|
|
17
59
|
super().__init__()
|
|
18
|
-
|
|
19
|
-
self.
|
|
20
|
-
self.
|
|
60
|
+
|
|
61
|
+
self.autosarVariableIRef = None # type: VariableInAtomicSWCTypeInstanceRef
|
|
62
|
+
self.autosarVariableInImplDatatype = None # type: ArVariableInImplementationDataInstanceRef
|
|
63
|
+
self.localVariableRef = None
|
|
64
|
+
|
|
65
|
+
def getAutosarVariableIRef(self):
|
|
66
|
+
return self.autosarVariableIRef
|
|
67
|
+
|
|
68
|
+
def setAutosarVariableIRef(self, value):
|
|
69
|
+
self.autosarVariableIRef = value
|
|
70
|
+
return self
|
|
71
|
+
|
|
72
|
+
def getAutosarVariableInImplDatatype(self):
|
|
73
|
+
return self.autosarVariableInImplDatatype
|
|
74
|
+
|
|
75
|
+
def setAutosarVariableInImplDatatype(self, value):
|
|
76
|
+
self.autosarVariableInImplDatatype = value
|
|
77
|
+
return self
|
|
78
|
+
|
|
79
|
+
def getLocalVariableRef(self):
|
|
80
|
+
return self.localVariableRef
|
|
81
|
+
|
|
82
|
+
def setLocalVariableRef(self, value):
|
|
83
|
+
self.localVariableRef = value
|
|
84
|
+
return self
|
|
21
85
|
|
|
22
86
|
class AutosarParameterRef(ARObject):
|
|
23
87
|
def __init__(self):
|
|
@@ -32,16 +96,51 @@ class AtpInstanceRef(ARObject, metaclass=ABCMeta):
|
|
|
32
96
|
raise NotImplementedError("AtpInstanceRef is an abstract class.")
|
|
33
97
|
|
|
34
98
|
super().__init__()
|
|
35
|
-
|
|
36
99
|
class VariableInAtomicSWCTypeInstanceRef(AtpInstanceRef):
|
|
37
100
|
def __init__(self):
|
|
38
101
|
super().__init__()
|
|
39
102
|
|
|
40
|
-
self.
|
|
41
|
-
self.
|
|
42
|
-
self.
|
|
43
|
-
self.
|
|
44
|
-
self.
|
|
103
|
+
self.baseRef = None # type: RefType
|
|
104
|
+
self.contextDataPrototypeRefs = [] # type: List[RefType]
|
|
105
|
+
self.portPrototypeRef = None # type: RefType
|
|
106
|
+
self.rootVariableDataPrototypeRef = None # type: RefType
|
|
107
|
+
self.targetDataPrototypeRef = None # type: RefType
|
|
108
|
+
|
|
109
|
+
def getBaseRef(self):
|
|
110
|
+
return self.baseRef
|
|
111
|
+
|
|
112
|
+
def setBaseRef(self, value):
|
|
113
|
+
self.baseRef = value
|
|
114
|
+
return self
|
|
115
|
+
|
|
116
|
+
def getContextDataPrototypeRefs(self):
|
|
117
|
+
return self.contextDataPrototypeRefs
|
|
118
|
+
|
|
119
|
+
def addContextDataPrototypeRef(self, value):
|
|
120
|
+
self.contextDataPrototypeRefs.append(value)
|
|
121
|
+
return self
|
|
122
|
+
|
|
123
|
+
def getPortPrototypeRef(self):
|
|
124
|
+
return self.portPrototypeRef
|
|
125
|
+
|
|
126
|
+
def setPortPrototypeRef(self, value):
|
|
127
|
+
self.portPrototypeRef = value
|
|
128
|
+
return self
|
|
129
|
+
|
|
130
|
+
def getRootVariableDataPrototypeRef(self):
|
|
131
|
+
return self.rootVariableDataPrototypeRef
|
|
132
|
+
|
|
133
|
+
def setRootVariableDataPrototypeRef(self, value):
|
|
134
|
+
self.rootVariableDataPrototypeRef = value
|
|
135
|
+
return self
|
|
136
|
+
|
|
137
|
+
def getTargetDataPrototypeRef(self):
|
|
138
|
+
return self.targetDataPrototypeRef
|
|
139
|
+
|
|
140
|
+
def setTargetDataPrototypeRef(self, value):
|
|
141
|
+
self.targetDataPrototypeRef = value
|
|
142
|
+
return self
|
|
143
|
+
|
|
45
144
|
|
|
46
145
|
class PortInCompositionTypeInstanceRef(AtpInstanceRef, metaclass=ABCMeta):
|
|
47
146
|
def __init__(self):
|
|
@@ -89,36 +188,6 @@ class ROperationInAtomicSwcInstanceRef(OperationInAtomicSwcInstanceRef):
|
|
|
89
188
|
self.context_r_port_ref = None # type: RefType
|
|
90
189
|
self.target_required_operation_ref = None # type: RefType
|
|
91
190
|
|
|
92
|
-
class VariableInAtomicSwcInstanceRef(AtpInstanceRef, metaclass=ABCMeta):
|
|
93
|
-
def __init__(self):
|
|
94
|
-
if type(self) == OperationInAtomicSwcInstanceRef:
|
|
95
|
-
raise NotImplementedError("OperationInAtomicSwcInstanceRef is an abstract class.")
|
|
96
|
-
|
|
97
|
-
super().__init__()
|
|
98
|
-
|
|
99
|
-
class RVariableInAtomicSwcInstanceRef(VariableInAtomicSwcInstanceRef):
|
|
100
|
-
def __init__(self):
|
|
101
|
-
super().__init__()
|
|
102
|
-
|
|
103
|
-
self.context_r_port_ref = None # type: RefType
|
|
104
|
-
self.target_data_element_ref = None # type: RefType
|
|
105
|
-
|
|
106
|
-
class RVariableInAtomicSwcInstanceRef(VariableInAtomicSwcInstanceRef):
|
|
107
|
-
def __init__(self):
|
|
108
|
-
super().__init__()
|
|
109
|
-
|
|
110
|
-
self.context_r_port_ref = None # type: RefType
|
|
111
|
-
self.target_data_element_ref = None # type: RefType
|
|
112
|
-
|
|
113
|
-
class RModeInAtomicSwcInstanceRef(AtpInstanceRef):
|
|
114
|
-
def __init__(self):
|
|
115
|
-
super().__init__()
|
|
116
|
-
|
|
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
191
|
class ParameterInAtomicSWCTypeInstanceRef(AtpInstanceRef):
|
|
123
192
|
def __init__(self):
|
|
124
193
|
super().__init__()
|
|
@@ -156,25 +225,3 @@ class VariableDataPrototypeInSystemInstanceRef(AtpInstanceRef):
|
|
|
156
225
|
self.context_port_ref = None # type: RefType
|
|
157
226
|
self.target_data_prototype_ref = None # type: RefType
|
|
158
227
|
|
|
159
|
-
class RModeGroupInAtomicSWCInstanceRef(AtpInstanceRef):
|
|
160
|
-
def __init__(self):
|
|
161
|
-
super().__init__()
|
|
162
|
-
|
|
163
|
-
self.context_r_port = None # type: RefType
|
|
164
|
-
self.target_mode_group = None # type: RefType
|
|
165
|
-
|
|
166
|
-
@property
|
|
167
|
-
def contextRPort(self) -> RefType:
|
|
168
|
-
return self.context_r_port
|
|
169
|
-
|
|
170
|
-
@contextRPort.setter
|
|
171
|
-
def contextRPort(self, value: RefType):
|
|
172
|
-
self.context_r_port = value
|
|
173
|
-
|
|
174
|
-
@property
|
|
175
|
-
def targetModeGroup(self) -> RefType:
|
|
176
|
-
return self.target_mode_group
|
|
177
|
-
|
|
178
|
-
@targetModeGroup.setter
|
|
179
|
-
def targetModeGroup(self, value: RefType):
|
|
180
|
-
self.target_mode_group = value
|
|
@@ -15,14 +15,35 @@ class BswModuleEntity(ExecutableEntity, metaclass=ABCMeta):
|
|
|
15
15
|
|
|
16
16
|
self.accessedModeGroupRefs = [] # type: List[RefType]
|
|
17
17
|
self.activationPointRefs = [] # type: List[RefType]
|
|
18
|
-
self.
|
|
19
|
-
self.
|
|
18
|
+
self.implementedEntryRef = None # type: RefType
|
|
19
|
+
self.managedModeGroupRefs = [] # type: List[RefType]
|
|
20
|
+
|
|
21
|
+
def getAccessedModeGroupRefs(self):
|
|
22
|
+
return self.accessedModeGroupRefs
|
|
23
|
+
|
|
24
|
+
def addAccessedModeGroupRefs(self, value):
|
|
25
|
+
self.accessedModeGroupRefs.append(value)
|
|
26
|
+
return self
|
|
27
|
+
|
|
28
|
+
def getActivationPointRefs(self):
|
|
29
|
+
return self.activationPointRefs
|
|
30
|
+
|
|
31
|
+
def addActivationPointRefs(self, value):
|
|
32
|
+
self.activationPointRefs.append(value)
|
|
33
|
+
return self
|
|
34
|
+
|
|
35
|
+
def getImplementedEntryRef(self):
|
|
36
|
+
return self.implementedEntryRef
|
|
37
|
+
|
|
38
|
+
def setImplementedEntryRef(self, value):
|
|
39
|
+
self.implementedEntryRef = value
|
|
40
|
+
return self
|
|
20
41
|
|
|
21
42
|
def addManagedModeGroupRef(self, ref: RefType):
|
|
22
|
-
self.
|
|
43
|
+
self.managedModeGroupRefs.append(ref)
|
|
23
44
|
|
|
24
45
|
def getManagedModeGroupRefs(self) -> List[RefType]:
|
|
25
|
-
return self.
|
|
46
|
+
return self.managedModeGroupRefs
|
|
26
47
|
|
|
27
48
|
class BswCalledEntity(BswModuleEntity):
|
|
28
49
|
def __init__(self, parent: ARObject, short_name: str):
|
|
@@ -235,7 +256,7 @@ class BswInternalBehavior(InternalBehavior):
|
|
|
235
256
|
def getIncludedDataTypeSets(self) -> List[IncludedDataTypeSet]:
|
|
236
257
|
return self.included_data_type_sets
|
|
237
258
|
|
|
238
|
-
class BswModuleDescription(
|
|
259
|
+
class BswModuleDescription(ARElement):
|
|
239
260
|
'''
|
|
240
261
|
Root element for the description of a single BSW module or BSW cluster. In case it
|
|
241
262
|
describes a BSW module, the short name of this element equals the name of the
|
|
@@ -262,15 +283,17 @@ class BswModuleDescription(AtpStructureElement):
|
|
|
262
283
|
def getImplementedEntries(self) -> List[RefType]:
|
|
263
284
|
return self._implementedEntryRefs
|
|
264
285
|
|
|
265
|
-
|
|
266
|
-
def category(self) -> str:
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
def category(self, value:str):
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
286
|
+
#@property
|
|
287
|
+
#def category(self) -> str:
|
|
288
|
+
# return ARElement.getCategory(self)
|
|
289
|
+
|
|
290
|
+
#@category.setter
|
|
291
|
+
#def category(self, value:str):
|
|
292
|
+
# if value is None:
|
|
293
|
+
# return
|
|
294
|
+
# if value not in ("BSW_MODULE", "BSW_CLUSTER", "LIBRARY"):
|
|
295
|
+
# raise ValueError("Invalid category <%s> of BswModuleDescription <%s>" % (value, self.short_name))
|
|
296
|
+
# ARElement.setCategory(self, value)
|
|
274
297
|
|
|
275
298
|
def createProvidedModeGroup(self, short_name: str) -> ModeDeclarationGroupPrototype:
|
|
276
299
|
if (short_name not in self.elements):
|
|
@@ -3,141 +3,72 @@
|
|
|
3
3
|
from abc import ABCMeta
|
|
4
4
|
from typing import List
|
|
5
5
|
|
|
6
|
-
from .ar_object import ARFloat, ARLiteral, ARNumerical
|
|
7
|
-
from .general_structure import ARObject,
|
|
8
|
-
from .data_dictionary import SwDataDefProps
|
|
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
9
|
from .ar_ref import RefType, TRefType
|
|
10
10
|
|
|
11
11
|
import re
|
|
12
12
|
|
|
13
|
-
class
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
Base : ARObject
|
|
18
|
-
Subclasses : AbstractRuleBasedValueSpecification, ApplicationValueSpecification, CompositeValueSpecification,
|
|
19
|
-
ConstantReference, NotAvailableValueSpecification, NumericalValueSpecification, ReferenceValueSpecification,
|
|
20
|
-
TextValueSpecification
|
|
21
|
-
'''
|
|
22
|
-
def __init__(self):
|
|
23
|
-
if type(self) == ValueSpecification:
|
|
24
|
-
raise NotImplementedError("ValueSpecification is an abstract class.")
|
|
25
|
-
|
|
26
|
-
super().__init__()
|
|
27
|
-
|
|
28
|
-
self.short_label = None
|
|
29
|
-
|
|
30
|
-
class CompositeRuleBasedValueArgument(ValueSpecification, metaclass=ABCMeta):
|
|
31
|
-
'''
|
|
32
|
-
This meta-class has the ability to serve as the abstract base class for ValueSpecifications that can be
|
|
33
|
-
used for compound primitive data types.
|
|
34
|
-
|
|
35
|
-
Base : ARObject
|
|
36
|
-
Subclasses : ApplicationRuleBasedValueSpecification, ApplicationValueSpecification
|
|
37
|
-
'''
|
|
38
|
-
def __init__(self):
|
|
39
|
-
if type(self) == CompositeRuleBasedValueArgument:
|
|
40
|
-
raise NotImplementedError("CompositeRuleBasedValueArgument is an abstract class.")
|
|
41
|
-
|
|
42
|
-
super().__init__()
|
|
43
|
-
|
|
44
|
-
class CompositeValueSpecification(ValueSpecification, metaclass=ABCMeta):
|
|
45
|
-
'''
|
|
46
|
-
This abstract meta-class acts a base class for ValueSpecifications that have a composite form.
|
|
47
|
-
|
|
48
|
-
Base : ARObject, ValueSpecification
|
|
49
|
-
Subclasses : ArrayValueSpecification, RecordValueSpecification
|
|
50
|
-
'''
|
|
51
|
-
def __init__(self):
|
|
52
|
-
if type(self) == CompositeValueSpecification:
|
|
53
|
-
raise NotImplementedError("CompositeValueSpecification is an abstract class.")
|
|
54
|
-
|
|
55
|
-
super().__init__()
|
|
56
|
-
|
|
57
|
-
class ApplicationValueSpecification(CompositeRuleBasedValueArgument):
|
|
58
|
-
'''
|
|
59
|
-
This meta-class represents values for DataPrototypes typed by ApplicationDataTypes (this includes in
|
|
60
|
-
particular compound primitives).
|
|
61
|
-
For further details refer to ASAM CDF 2.0. This meta-class corresponds to some extent with
|
|
62
|
-
SW-INSTANCE in ASAM CDF 2.0.
|
|
63
|
-
|
|
64
|
-
Base ARObject, CompositeRuleBasedValueArgument, ValueSpecification
|
|
65
|
-
'''
|
|
66
|
-
def __init__(self):
|
|
67
|
-
super().__init__()
|
|
68
|
-
|
|
69
|
-
self.category = None
|
|
70
|
-
self.sw_Axis_cont = []
|
|
71
|
-
self.sw_value_cont = None
|
|
72
|
-
|
|
73
|
-
class RecordValueSpecification(CompositeValueSpecification):
|
|
74
|
-
'''
|
|
75
|
-
Specifies the values for a record.
|
|
76
|
-
|
|
77
|
-
Base : ARObject, CompositeValueSpecification, ValueSpecification
|
|
78
|
-
'''
|
|
79
|
-
def __init__(self):
|
|
80
|
-
super().__init__()
|
|
81
|
-
|
|
82
|
-
self._fields = []
|
|
83
|
-
|
|
84
|
-
def add_field(self, field: ValueSpecification):
|
|
85
|
-
self._fields.append(field)
|
|
86
|
-
|
|
87
|
-
def get_fields(self) -> List[ValueSpecification]:
|
|
88
|
-
return self._fields
|
|
13
|
+
class AbstractImplementationDataTypeElement(Identifiable):
|
|
14
|
+
def __init__(self, parent, short_name: str):
|
|
15
|
+
super().__init__(parent, short_name)
|
|
89
16
|
|
|
90
|
-
class
|
|
91
|
-
|
|
92
|
-
|
|
17
|
+
class ImplementationDataTypeElement(AbstractImplementationDataTypeElement):
|
|
18
|
+
ARRAY_SIZE_SEMANTICS_FIXED_SIZE = "FIXED-SIZE"
|
|
19
|
+
ARRAY_SIZE_SEMANTICS_VARIABLE_SIZE = "VARIABLE_SIZE"
|
|
93
20
|
|
|
94
|
-
|
|
21
|
+
def __init__(self, parent, short_name: str):
|
|
22
|
+
super().__init__(parent, short_name)
|
|
95
23
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
24
|
+
self.arrayImplPolicy = None # type: ARLiteral
|
|
25
|
+
self.arraySize = None # type: ARNumerical
|
|
26
|
+
self.arraySizeHandling = None # type: ARLiteral
|
|
27
|
+
self.arraySizeSemantics = None # type: ARLiteral
|
|
28
|
+
self.isOptional = None # type: ARBoolean
|
|
29
|
+
self.swDataDefProps = None # type: SwDataDefProps
|
|
99
30
|
|
|
100
|
-
|
|
31
|
+
def getArrayImplPolicy(self):
|
|
32
|
+
return self.arrayImplPolicy
|
|
101
33
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
34
|
+
def setArrayImplPolicy(self, value):
|
|
35
|
+
self.arrayImplPolicy = value
|
|
36
|
+
return self
|
|
105
37
|
|
|
106
|
-
|
|
38
|
+
def getArraySize(self):
|
|
39
|
+
return self.arraySize
|
|
107
40
|
|
|
108
|
-
def
|
|
109
|
-
self.
|
|
41
|
+
def setArraySize(self, value):
|
|
42
|
+
self.arraySize = value
|
|
43
|
+
return self
|
|
110
44
|
|
|
111
|
-
def
|
|
112
|
-
return self.
|
|
45
|
+
def getArraySizeHandling(self):
|
|
46
|
+
return self.arraySizeHandling
|
|
113
47
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
48
|
+
def setArraySizeHandling(self, value):
|
|
49
|
+
self.arraySizeHandling = value
|
|
50
|
+
return self
|
|
117
51
|
|
|
118
|
-
|
|
52
|
+
def getArraySizeSemantics(self):
|
|
53
|
+
return self.arraySizeSemantics
|
|
119
54
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
55
|
+
def setArraySizeSemantics(self, value):
|
|
56
|
+
self.arraySizeSemantics = value
|
|
57
|
+
return self
|
|
123
58
|
|
|
124
|
-
|
|
59
|
+
def getIsOptional(self):
|
|
60
|
+
return self.isOptional
|
|
125
61
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
class ImplementationDataTypeElement(AbstractImplementationDataTypeElement):
|
|
131
|
-
ARRAY_SIZE_SEMANTICS_FIXED_SIZE = "FIXED-SIZE"
|
|
132
|
-
ARRAY_SIZE_SEMANTICS_VARIABLE_SIZE = "VARIABLE_SIZE"
|
|
62
|
+
def setIsOptional(self, value):
|
|
63
|
+
self.isOptional = value
|
|
64
|
+
return self
|
|
133
65
|
|
|
134
|
-
def
|
|
135
|
-
|
|
66
|
+
def getSwDataDefProps(self):
|
|
67
|
+
return self.swDataDefProps
|
|
136
68
|
|
|
137
|
-
|
|
138
|
-
self.
|
|
139
|
-
self
|
|
140
|
-
self.sw_data_def_props = None # type: SwDataDefProps
|
|
69
|
+
def setSwDataDefProps(self, value):
|
|
70
|
+
self.swDataDefProps = value
|
|
71
|
+
return self
|
|
141
72
|
|
|
142
73
|
def createImplementationDataTypeElement(self, short_name: str): # type: (...) -> ImplementationDataTypeElement
|
|
143
74
|
if (short_name not in self.elements):
|
|
@@ -190,41 +121,54 @@ class ExecutableEntity(Identifiable, metaclass=ABCMeta):
|
|
|
190
121
|
def __init__(self, parent: ARObject, short_name: str):
|
|
191
122
|
if type(self) == ExecutableEntity:
|
|
192
123
|
raise NotImplementedError("ExecutableEntity is an abstract class.")
|
|
124
|
+
|
|
193
125
|
super().__init__(parent, short_name)
|
|
194
126
|
|
|
195
|
-
self.
|
|
196
|
-
self.
|
|
197
|
-
self.
|
|
198
|
-
self.
|
|
199
|
-
self.
|
|
127
|
+
self.activationReason = None # *
|
|
128
|
+
self.minimumStartInterval = None # type: ARFloat
|
|
129
|
+
self.reentrancyLevel = None #
|
|
130
|
+
self.canEnterExclusiveAreaRefs = [] # type: List[RefType]
|
|
131
|
+
self.swAddrMethodRef = None # type: RefType
|
|
132
|
+
|
|
133
|
+
def getActivationReason(self):
|
|
134
|
+
return self.activationReason
|
|
135
|
+
|
|
136
|
+
def setActivationReason(self, value):
|
|
137
|
+
self.activationReason = value
|
|
138
|
+
return self
|
|
139
|
+
|
|
140
|
+
def getMinimumStartInterval(self):
|
|
141
|
+
return self.minimumStartInterval
|
|
142
|
+
|
|
143
|
+
def setMinimumStartInterval(self, value):
|
|
144
|
+
self.minimumStartInterval = value
|
|
145
|
+
return self
|
|
146
|
+
|
|
147
|
+
def getReentrancyLevel(self):
|
|
148
|
+
return self.reentrancyLevel
|
|
149
|
+
|
|
150
|
+
def setReentrancyLevel(self, value):
|
|
151
|
+
self.reentrancyLevel = value
|
|
152
|
+
return self
|
|
153
|
+
|
|
154
|
+
def getSwAddrMethodRef(self):
|
|
155
|
+
return self.swAddrMethodRef
|
|
156
|
+
|
|
157
|
+
def setSwAddrMethodRef(self, value):
|
|
158
|
+
self.swAddrMethodRef = value
|
|
159
|
+
return self
|
|
200
160
|
|
|
201
161
|
@property
|
|
202
162
|
def minimumStartIntervalMs(self) -> int:
|
|
203
|
-
if self.
|
|
204
|
-
return int(self.
|
|
163
|
+
if self.minimumStartInterval is not None:
|
|
164
|
+
return int(self.minimumStartInterval.getValue() * 1000)
|
|
205
165
|
return None
|
|
206
166
|
|
|
207
|
-
@property
|
|
208
|
-
def minimumStartInterval(self) -> ARFloat:
|
|
209
|
-
return self.minimum_start_interval
|
|
210
|
-
|
|
211
|
-
@minimumStartInterval.setter
|
|
212
|
-
def minimumStartInterval(self, value: ARFloat):
|
|
213
|
-
self.minimum_start_interval = value
|
|
214
|
-
|
|
215
|
-
@property
|
|
216
|
-
def swAddrMethodRef(self) -> RefType:
|
|
217
|
-
return self.sw_addr_method_ref
|
|
218
|
-
|
|
219
|
-
@swAddrMethodRef.setter
|
|
220
|
-
def swAddrMethodRef(self, ref: RefType):
|
|
221
|
-
self.sw_addr_method_ref = ref
|
|
222
|
-
|
|
223
167
|
def addCanEnterExclusiveAreaRef(self, ref: RefType):
|
|
224
|
-
self.
|
|
168
|
+
self.canEnterExclusiveAreaRefs.append(ref)
|
|
225
169
|
|
|
226
170
|
def getCanEnterExclusiveAreaRefs(self):
|
|
227
|
-
return self.
|
|
171
|
+
return self.canEnterExclusiveAreaRefs
|
|
228
172
|
|
|
229
173
|
class ModeDeclarationGroupPrototype(Identifiable):
|
|
230
174
|
"""
|
|
@@ -247,21 +191,57 @@ class ModeDeclarationGroupPrototype(Identifiable):
|
|
|
247
191
|
raise ValueError("Invalid SwCalibrationAccess <%s> of ModeDeclarationGroupPrototype <%s>" % (value, self.short_name))
|
|
248
192
|
self._swCalibrationAccess = value
|
|
249
193
|
|
|
194
|
+
def getSwCalibrationAccess(self):
|
|
195
|
+
return self.swCalibrationAccess
|
|
196
|
+
|
|
197
|
+
def setSwCalibrationAccess(self, value):
|
|
198
|
+
self.swCalibrationAccess = value
|
|
199
|
+
return self
|
|
200
|
+
|
|
201
|
+
def getTypeTRef(self):
|
|
202
|
+
return self.typeTRef
|
|
203
|
+
|
|
204
|
+
def setTypeTRef(self, value):
|
|
205
|
+
self.typeTRef = value
|
|
206
|
+
return self
|
|
207
|
+
|
|
250
208
|
class MemorySection(Identifiable):
|
|
251
209
|
def __init__(self, parent: ARObject, short_name: str):
|
|
252
210
|
super().__init__(parent, short_name)
|
|
253
211
|
|
|
254
212
|
self._alignment = None # type: ARLiteral
|
|
255
213
|
self.size = None
|
|
256
|
-
self.
|
|
214
|
+
self.options = [] # type: List[ARLiteral]
|
|
257
215
|
self.swAddrMethodRef = None # type: RefType
|
|
258
216
|
self.symbol = None # type: ARLiteral
|
|
259
217
|
|
|
260
|
-
def
|
|
261
|
-
self.
|
|
218
|
+
def getAlignment(self):
|
|
219
|
+
return self.alignment
|
|
262
220
|
|
|
263
|
-
def
|
|
264
|
-
|
|
221
|
+
def setAlignment(self, value):
|
|
222
|
+
self.alignment = value
|
|
223
|
+
return self
|
|
224
|
+
|
|
225
|
+
def getSize(self):
|
|
226
|
+
return self.size
|
|
227
|
+
|
|
228
|
+
def setSize(self, value):
|
|
229
|
+
self.size = value
|
|
230
|
+
return self
|
|
231
|
+
|
|
232
|
+
def getSwAddrMethodRef(self):
|
|
233
|
+
return self.swAddrMethodRef
|
|
234
|
+
|
|
235
|
+
def setSwAddrMethodRef(self, value):
|
|
236
|
+
self.swAddrMethodRef = value
|
|
237
|
+
return self
|
|
238
|
+
|
|
239
|
+
def getSymbol(self):
|
|
240
|
+
return self.symbol
|
|
241
|
+
|
|
242
|
+
def setSymbol(self, value):
|
|
243
|
+
self.symbol = value
|
|
244
|
+
return self
|
|
265
245
|
|
|
266
246
|
@property
|
|
267
247
|
def alignment(self) -> ARLiteral:
|
|
@@ -282,7 +262,12 @@ class MemorySection(Identifiable):
|
|
|
282
262
|
|
|
283
263
|
if not match:
|
|
284
264
|
raise ValueError("Invalid alignment <%s> of memory section <%s>" % (value, self.short_name))
|
|
285
|
-
|
|
265
|
+
|
|
266
|
+
def addOption(self, option: ARLiteral):
|
|
267
|
+
self.options.append(option)
|
|
268
|
+
|
|
269
|
+
def getOptions(self) -> List[ARLiteral]:
|
|
270
|
+
return self.options
|
|
286
271
|
|
|
287
272
|
class ResourceConsumption(Identifiable):
|
|
288
273
|
def __init__(self, parent: ARObject, short_name: str):
|
armodel/models/communication.py
CHANGED