armodel 1.4.3__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.
Files changed (87) hide show
  1. armodel/cli/arxml_dump_cli.py +14 -14
  2. armodel/cli/memory_section_cli.py +76 -0
  3. armodel/cli/system_signal_cli.py +74 -0
  4. armodel/lib/__init__.py +2 -1
  5. armodel/lib/system_signal.py +37 -0
  6. armodel/models/__init__.py +6 -3
  7. armodel/models/annotation.py +27 -3
  8. armodel/models/ar_object.py +18 -6
  9. armodel/models/ar_package.py +248 -30
  10. armodel/models/ar_ref.py +115 -45
  11. armodel/models/bsw_module_template.py +66 -28
  12. armodel/models/common_structure.py +150 -150
  13. armodel/models/communication.py +1 -1
  14. armodel/models/data_prototype.py +41 -6
  15. armodel/models/datatype.py +11 -5
  16. armodel/models/fibex/__init__.py +0 -0
  17. armodel/models/fibex/can_communication.py +122 -0
  18. armodel/models/fibex/fibex_4_can/__init__.py +0 -0
  19. armodel/models/fibex/fibex_4_lin/__init__.py +0 -0
  20. armodel/models/fibex/fibex_4_multiplatform.py +138 -0
  21. armodel/models/fibex/fibex_core/__init__.py +0 -0
  22. armodel/models/fibex/fibex_core/core_communication.py +627 -0
  23. armodel/models/fibex/fibex_core/core_topology.py +180 -0
  24. armodel/models/fibex/fibex_core.py +341 -0
  25. armodel/models/fibex/lin_communication.py +38 -0
  26. armodel/models/fibex/lin_topology.py +7 -0
  27. armodel/models/general_structure.py +119 -10
  28. armodel/models/implementation.py +4 -5
  29. armodel/models/internal_behavior.py +63 -0
  30. armodel/models/m2/__init__.py +0 -0
  31. armodel/models/m2/autosar_templates/__init__.py +0 -0
  32. armodel/models/m2/autosar_templates/common_structure/__init__.py +188 -0
  33. armodel/models/m2/autosar_templates/common_structure/constants.py +0 -0
  34. armodel/models/m2/autosar_templates/ecuc_description_template.py +268 -0
  35. armodel/models/m2/autosar_templates/sw_component_template/__init__.py +0 -0
  36. armodel/models/m2/autosar_templates/sw_component_template/communication.py +316 -0
  37. armodel/models/m2/autosar_templates/sw_component_template/components/__init__.py +0 -0
  38. armodel/models/m2/autosar_templates/sw_component_template/components/instance_refs.py +149 -0
  39. armodel/models/m2/autosar_templates/sw_component_template/port_interface.py +236 -0
  40. armodel/models/m2/autosar_templates/sw_component_template/swc_internal_behavior/__init__.py +203 -0
  41. armodel/models/m2/autosar_templates/sw_component_template/swc_internal_behavior/access_count.py +13 -0
  42. armodel/models/m2/autosar_templates/sw_component_template/swc_internal_behavior/data_elements.py +54 -0
  43. armodel/models/m2/autosar_templates/sw_component_template/swc_internal_behavior/mode_declaration_group.py +39 -0
  44. armodel/models/m2/autosar_templates/sw_component_template/swc_internal_behavior/server_call.py +26 -0
  45. armodel/models/m2/autosar_templates/sw_component_template/swc_internal_behavior/trigger.py +10 -0
  46. armodel/models/m2/autosar_templates/system_template/__init__.py +321 -0
  47. armodel/models/m2/autosar_templates/system_template/data_mapping.py +88 -0
  48. armodel/models/m2/autosar_templates/system_template/network_management.py +554 -0
  49. armodel/models/m2/autosar_templates/system_template/transport_protocols.py +7 -0
  50. armodel/models/m2/msr/__init__.py +0 -0
  51. armodel/models/m2/msr/asam_hdo/__init__.py +0 -0
  52. armodel/models/m2/msr/asam_hdo/units.py +105 -0
  53. armodel/models/m2/msr/data_dictionary/__init__.py +0 -0
  54. armodel/models/m2/msr/data_dictionary/auxillary_objects.py +42 -0
  55. armodel/models/m2/msr/data_dictionary/data_def_properties.py +295 -0
  56. armodel/models/m2/msr/documentation/__init__.py +0 -0
  57. armodel/models/m2/msr/documentation/block_elements.py +18 -0
  58. armodel/models/mode_declaration.py +8 -0
  59. armodel/models/multilanguage_data.py +15 -0
  60. armodel/models/per_instance_memory.py +34 -6
  61. armodel/models/port_prototype.py +15 -159
  62. armodel/models/rpt_scenario.py +20 -0
  63. armodel/models/sw_component.py +48 -187
  64. armodel/models/system_template/__init__.py +0 -0
  65. armodel/models/system_template/network_management.py +7 -0
  66. armodel/models/system_template/transport_protocols.py +7 -0
  67. armodel/models/timing.py +91 -0
  68. armodel/parser/abstract_arxml_parser.py +11 -2
  69. armodel/parser/arxml_parser.py +1101 -227
  70. armodel/tests/test_armodel/models/test_ar_package.py +1 -1
  71. armodel/tests/test_armodel/models/test_ar_ref.py +3 -3
  72. armodel/tests/test_armodel/models/test_bsw_module_template.py +5 -5
  73. armodel/tests/test_armodel/models/test_common_structure.py +3 -3
  74. armodel/tests/test_armodel/models/test_data_dictionary.py +5 -5
  75. armodel/tests/test_armodel/models/test_data_prototype.py +2 -2
  76. armodel/tests/test_armodel/models/test_datatype.py +8 -8
  77. armodel/tests/test_armodel/models/test_port_interface.py +6 -6
  78. armodel/tests/test_armodel/parser/test_parse_bswmd.py +16 -8
  79. armodel/tests/test_armodel/parser/test_sw_components.py +6 -6
  80. armodel/writer/arxml_writer.py +1046 -181
  81. {armodel-1.4.3.dist-info → armodel-1.6.0.dist-info}/METADATA +48 -1
  82. armodel-1.6.0.dist-info/RECORD +127 -0
  83. {armodel-1.4.3.dist-info → armodel-1.6.0.dist-info}/entry_points.txt +3 -1
  84. armodel-1.4.3.dist-info/RECORD +0 -78
  85. {armodel-1.4.3.dist-info → armodel-1.6.0.dist-info}/LICENSE +0 -0
  86. {armodel-1.4.3.dist-info → armodel-1.6.0.dist-info}/WHEEL +0 -0
  87. {armodel-1.4.3.dist-info → armodel-1.6.0.dist-info}/top_level.txt +0 -0
@@ -1,8 +1,10 @@
1
1
  from abc import ABCMeta
2
2
  from typing import Dict, List
3
+
4
+ from .internal_behavior import IncludedDataTypeSet, InternalBehavior
3
5
  from .general_structure import AtpStructureElement, ARObject, ARElement
4
6
  from .ar_object import ARBoolean, ARFloat, ARLiteral, ARNumerical, ARPositiveInteger
5
- from .common_structure import ExecutableEntity, ModeDeclarationGroupPrototype, InternalBehavior, Identifiable
7
+ from .common_structure import ExecutableEntity, IncludedModeDeclarationGroupSet, ModeDeclarationGroupPrototype, Identifiable
6
8
  from .ar_ref import RefType
7
9
 
8
10
  class BswModuleEntity(ExecutableEntity, metaclass=ABCMeta):
@@ -13,14 +15,35 @@ class BswModuleEntity(ExecutableEntity, metaclass=ABCMeta):
13
15
 
14
16
  self.accessedModeGroupRefs = [] # type: List[RefType]
15
17
  self.activationPointRefs = [] # type: List[RefType]
16
- self.implemented_entry_ref = None # type: RefType
17
- self._managedModeGroupRefs = [] # type: List[RefType]
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
18
41
 
19
42
  def addManagedModeGroupRef(self, ref: RefType):
20
- self._managedModeGroupRefs.append(ref)
43
+ self.managedModeGroupRefs.append(ref)
21
44
 
22
45
  def getManagedModeGroupRefs(self) -> List[RefType]:
23
- return self._managedModeGroupRefs
46
+ return self.managedModeGroupRefs
24
47
 
25
48
  class BswCalledEntity(BswModuleEntity):
26
49
  def __init__(self, parent: ARObject, short_name: str):
@@ -105,7 +128,6 @@ class BswInternalTriggerOccurredEvent(BswScheduleEvent):
105
128
 
106
129
  self.event_source_ref = None # type: RefType
107
130
 
108
-
109
131
  class BswModeSwitchAckRequest(ARObject):
110
132
  def __init__(self):
111
133
  super().__init__()
@@ -144,21 +166,23 @@ class BswInternalBehavior(InternalBehavior):
144
166
  def __init__(self, parent: ARObject, short_name: str):
145
167
  super().__init__(parent, short_name)
146
168
 
147
- self._entities = [] # type: List[BswModuleEntity]
148
- self._events = [] # type: List[BswEvent]
149
- self._mode_sender_policies = [] # type: List[BswModeSenderPolicy]
169
+ self.entities = [] # type: List[BswModuleEntity]
170
+ self.events = [] # type: List[BswEvent]
171
+ self.mode_sender_policies = [] # type: List[BswModeSenderPolicy]
172
+ self.included_mode_declaration_group_sets = [] # type: List[IncludedModeDeclarationGroupSet]
173
+ self.included_data_type_sets = [] # type: List[IncludedDataTypeSet]
150
174
 
151
175
  def addModeSenderPolicy(self, policy: BswModeSenderPolicy):
152
- self._mode_sender_policies.append(policy)
176
+ self.mode_sender_policies.append(policy)
153
177
 
154
178
  def getModeSenderPolicies(self) -> List[BswModeSenderPolicy]:
155
- return self._mode_sender_policies
179
+ return self.mode_sender_policies
156
180
 
157
181
  def createBswCalledEntity(self, short_name: str) -> BswCalledEntity:
158
182
  if (short_name not in self.elements):
159
183
  event = BswCalledEntity(self, short_name)
160
184
  self.elements[short_name] = event
161
- self._entities.append(event)
185
+ self.entities.append(event)
162
186
  return self.elements[short_name]
163
187
 
164
188
  def getBswCalledEntities(self) -> List[BswCalledEntity]:
@@ -168,7 +192,7 @@ class BswInternalBehavior(InternalBehavior):
168
192
  if (short_name not in self.elements):
169
193
  event = BswSchedulableEntity(self, short_name)
170
194
  self.elements[short_name] = event
171
- self._entities.append(event)
195
+ self.entities.append(event)
172
196
  return self.elements[short_name]
173
197
 
174
198
  def getBswSchedulableEntities(self) -> List[BswSchedulableEntity]:
@@ -181,7 +205,7 @@ class BswInternalBehavior(InternalBehavior):
181
205
  if (short_name not in self.elements):
182
206
  event = BswModeSwitchEvent(self, short_name)
183
207
  self.elements[short_name] = event
184
- self._events.append(event)
208
+ self.events.append(event)
185
209
  return self.elements[short_name]
186
210
 
187
211
  def getBswModeSwitchEvents(self) -> List[BswModeSwitchEvent]:
@@ -191,7 +215,7 @@ class BswInternalBehavior(InternalBehavior):
191
215
  if (short_name not in self.elements):
192
216
  event = BswTimingEvent(self, short_name)
193
217
  self.elements[short_name] = event
194
- self._events.append(event)
218
+ self.events.append(event)
195
219
  return self.elements[short_name]
196
220
 
197
221
  def getBswTimingEvents(self) -> List[BswTimingEvent]:
@@ -201,7 +225,7 @@ class BswInternalBehavior(InternalBehavior):
201
225
  if (short_name not in self.elements):
202
226
  event = BswDataReceivedEvent(self, short_name)
203
227
  self.elements[short_name] = event
204
- self._events.append(event)
228
+ self.events.append(event)
205
229
  return self.elements[short_name]
206
230
 
207
231
  def getBswDataReceivedEvents(self) -> List[BswDataReceivedEvent]:
@@ -211,7 +235,7 @@ class BswInternalBehavior(InternalBehavior):
211
235
  if (short_name not in self.elements):
212
236
  event = BswInternalTriggerOccurredEvent(self, short_name)
213
237
  self.elements[short_name] = event
214
- self._events.append(event)
238
+ self.events.append(event)
215
239
  return self.elements[short_name]
216
240
 
217
241
  def getBswInternalTriggerOccurredEvents(self) -> List[BswInternalTriggerOccurredEvent]:
@@ -219,8 +243,20 @@ class BswInternalBehavior(InternalBehavior):
219
243
 
220
244
  def getBswEvents(self) -> List[BswEvent]:
221
245
  return list(filter(lambda a: isinstance(a, BswEvent), self.elements.values()))
246
+
247
+ def addIncludedModeDeclarationGroupSet(self, group_set: IncludedModeDeclarationGroupSet):
248
+ self.included_mode_declaration_group_sets.append(group_set)
222
249
 
223
- class BswModuleDescription(AtpStructureElement):
250
+ def getIncludedModeDeclarationGroupSets(self) -> List[IncludedModeDeclarationGroupSet]:
251
+ return self.included_mode_declaration_group_sets
252
+
253
+ def addIncludedDataTypeSet(self, type_set: IncludedDataTypeSet):
254
+ self.included_data_type_sets.append(type_set)
255
+
256
+ def getIncludedDataTypeSets(self) -> List[IncludedDataTypeSet]:
257
+ return self.included_data_type_sets
258
+
259
+ class BswModuleDescription(ARElement):
224
260
  '''
225
261
  Root element for the description of a single BSW module or BSW cluster. In case it
226
262
  describes a BSW module, the short name of this element equals the name of the
@@ -239,7 +275,7 @@ class BswModuleDescription(AtpStructureElement):
239
275
  self._implementedEntryRefs = [] # type: List[RefType]
240
276
 
241
277
  self.providedModeGroups = {} # type: Dict[str, ModeDeclarationGroupPrototype]
242
- self.requiredModeGroups = {} # tyep: Dict[str, ModeDeclarationGroupPrototype]
278
+ self.requiredModeGroups = {} # type: Dict[str, ModeDeclarationGroupPrototype]
243
279
 
244
280
  def addImplementedEntry(self, entry_ref: RefType):
245
281
  self._implementedEntryRefs.append(entry_ref)
@@ -247,15 +283,17 @@ class BswModuleDescription(AtpStructureElement):
247
283
  def getImplementedEntries(self) -> List[RefType]:
248
284
  return self._implementedEntryRefs
249
285
 
250
- @property
251
- def category(self) -> str:
252
- return self._category
253
-
254
- @category.setter
255
- def category(self, value:str):
256
- if value not in ("BSW_MODULE", "BSW_CLUSTER", "LIBRARY"):
257
- raise ValueError("Invalid category <%s> of BswModuleDescription <%s>" % (value, self.short_name))
258
- self._category = value
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)
259
297
 
260
298
  def createProvidedModeGroup(self, short_name: str) -> ModeDeclarationGroupPrototype:
261
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, ARElement, Identifiable
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 ValueSpecification(ARObject, metaclass=ABCMeta):
14
- '''
15
- Base class for expressions leading to a value which can be used to initialize a data object.
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
89
-
90
- class TextValueSpecification(ValueSpecification):
91
- def __init__(self):
92
- super().__init__()
13
+ class AbstractImplementationDataTypeElement(Identifiable):
14
+ def __init__(self, parent, short_name: str):
15
+ super().__init__(parent, short_name)
93
16
 
94
- self.value = None # type: str
17
+ class ImplementationDataTypeElement(AbstractImplementationDataTypeElement):
18
+ ARRAY_SIZE_SEMANTICS_FIXED_SIZE = "FIXED-SIZE"
19
+ ARRAY_SIZE_SEMANTICS_VARIABLE_SIZE = "VARIABLE_SIZE"
95
20
 
96
- class NumericalValueSpecification(ValueSpecification):
97
- def __init__(self):
98
- super().__init__()
21
+ def __init__(self, parent, short_name: str):
22
+ super().__init__(parent, short_name)
99
23
 
100
- self.value = None # type: ARFloat
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
101
30
 
102
- class ArrayValueSpecification(ValueSpecification):
103
- def __init__(self):
104
- super().__init__()
31
+ def getArrayImplPolicy(self):
32
+ return self.arrayImplPolicy
105
33
 
106
- self._element = [] # type: List[ValueSpecification]
34
+ def setArrayImplPolicy(self, value):
35
+ self.arrayImplPolicy = value
36
+ return self
107
37
 
108
- def add_element(self, element: ValueSpecification):
109
- self._element.append(element)
38
+ def getArraySize(self):
39
+ return self.arraySize
110
40
 
111
- def get_elements(self) -> List[ValueSpecification]:
112
- return self._element
41
+ def setArraySize(self, value):
42
+ self.arraySize = value
43
+ return self
113
44
 
114
- class ConstantSpecification(ARElement):
115
- def __init__(self, parent, short_name):
116
- super().__init__(parent, short_name)
45
+ def getArraySizeHandling(self):
46
+ return self.arraySizeHandling
117
47
 
118
- self.value_spec = None # type: ValueSpecification
48
+ def setArraySizeHandling(self, value):
49
+ self.arraySizeHandling = value
50
+ return self
119
51
 
120
- class ConstantReference(ValueSpecification):
121
- def __init__(self):
122
- super().__init__()
52
+ def getArraySizeSemantics(self):
53
+ return self.arraySizeSemantics
123
54
 
124
- self.constant_ref = None
55
+ def setArraySizeSemantics(self, value):
56
+ self.arraySizeSemantics = value
57
+ return self
125
58
 
126
- class AbstractImplementationDataTypeElement(Identifiable):
127
- def __init__(self, parent, short_name: str):
128
- super().__init__(parent, short_name)
59
+ def getIsOptional(self):
60
+ return self.isOptional
129
61
 
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 __init__(self, parent, short_name: str):
135
- super().__init__(parent, short_name)
66
+ def getSwDataDefProps(self):
67
+ return self.swDataDefProps
136
68
 
137
- self.arraySize = None # type: int
138
- self.array_size_semantics = None # type: str
139
- self.isOptional = None # type: bool
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):
@@ -152,29 +83,27 @@ class ExclusiveArea(Identifiable):
152
83
  def __init__(self, parent: ARObject, short_name: str):
153
84
  super().__init__(parent, short_name)
154
85
 
155
- class InternalBehavior(Identifiable, metaclass=ABCMeta):
156
- def __init__(self, parent: ARObject, short_name: str):
157
- if type(self) == InternalBehavior:
158
- raise NotImplementedError("InternalBehavior is an abstract class.")
159
- super().__init__(parent, short_name)
160
-
161
- self._dataTypeMappingRefs = [] # type: List[RefType]
162
-
163
- def addDataTypeMappingRef(self, ref: RefType):
164
- self._dataTypeMappingRefs.append(ref)
86
+ class IncludedModeDeclarationGroupSet(ARObject):
87
+ def __init__(self):
88
+ super().__init__()
165
89
 
166
- def getDataTypeMappingRefs(self) -> List[RefType]:
167
- return self._dataTypeMappingRefs
90
+ self.mode_declaration_group_refs = [] # type: List[RefType]
91
+ self.prefix = None # type: ARLiteral
168
92
 
169
- def createExclusiveArea(self, short_name: str) -> ExclusiveArea:
170
- if (short_name not in self.elements):
171
- event = ExclusiveArea(self, short_name)
172
- self.elements[short_name] = event
173
- return self.elements[short_name]
93
+ def addModeDeclarationGroupRef(self, ref: RefType):
94
+ self.mode_declaration_group_refs.append(ref)
95
+ return self
174
96
 
175
- def getExclusiveAreas(self) -> List[ExclusiveArea]:
176
- return list(filter(lambda c: isinstance(c, ExclusiveArea), self.elements.values()))
97
+ def getModeDeclarationGroupRefs(self) -> List[RefType]:
98
+ return self.mode_declaration_group_refs
177
99
 
100
+ def setPrefix(self, prefix: str):
101
+ self.prefix = prefix
102
+ return self
103
+
104
+ def getPrefix(self) -> ARLiteral:
105
+ return self.prefix
106
+
178
107
  class ModeDeclaration(Identifiable):
179
108
  def __init__(self, parent: ARObject, short_name: str):
180
109
  super().__init__(parent, short_name)
@@ -192,24 +121,54 @@ class ExecutableEntity(Identifiable, metaclass=ABCMeta):
192
121
  def __init__(self, parent: ARObject, short_name: str):
193
122
  if type(self) == ExecutableEntity:
194
123
  raise NotImplementedError("ExecutableEntity is an abstract class.")
124
+
195
125
  super().__init__(parent, short_name)
196
126
 
197
- self.activation_reason = None # *
198
- self.minimum_start_interval = None # type: ARFloat
199
- self.reentrancy_level = None #
200
- self._can_enter_exclusive_area_refs = [] # type: List[RefType]
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
201
160
 
202
161
  @property
203
- def minimum_start_interval_ms(self) -> int:
204
- if self.minimum_start_interval is not None:
205
- return int(self.minimum_start_interval.getValue() * 1000)
162
+ def minimumStartIntervalMs(self) -> int:
163
+ if self.minimumStartInterval is not None:
164
+ return int(self.minimumStartInterval.getValue() * 1000)
206
165
  return None
207
166
 
208
167
  def addCanEnterExclusiveAreaRef(self, ref: RefType):
209
- self._can_enter_exclusive_area_refs.append(ref)
168
+ self.canEnterExclusiveAreaRefs.append(ref)
210
169
 
211
170
  def getCanEnterExclusiveAreaRefs(self):
212
- return self._can_enter_exclusive_area_refs
171
+ return self.canEnterExclusiveAreaRefs
213
172
 
214
173
  class ModeDeclarationGroupPrototype(Identifiable):
215
174
  """
@@ -232,21 +191,57 @@ class ModeDeclarationGroupPrototype(Identifiable):
232
191
  raise ValueError("Invalid SwCalibrationAccess <%s> of ModeDeclarationGroupPrototype <%s>" % (value, self.short_name))
233
192
  self._swCalibrationAccess = value
234
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
+
235
208
  class MemorySection(Identifiable):
236
209
  def __init__(self, parent: ARObject, short_name: str):
237
210
  super().__init__(parent, short_name)
238
211
 
239
212
  self._alignment = None # type: ARLiteral
240
213
  self.size = None
241
- self._options = [] # type: List[ARLiteral]
214
+ self.options = [] # type: List[ARLiteral]
242
215
  self.swAddrMethodRef = None # type: RefType
243
216
  self.symbol = None # type: ARLiteral
244
217
 
245
- def addOption(self, option: ARLiteral):
246
- self._options.append(option)
218
+ def getAlignment(self):
219
+ return self.alignment
247
220
 
248
- def getOptions(self) -> List[ARLiteral]:
249
- return self._options
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
250
245
 
251
246
  @property
252
247
  def alignment(self) -> ARLiteral:
@@ -267,7 +262,12 @@ class MemorySection(Identifiable):
267
262
 
268
263
  if not match:
269
264
  raise ValueError("Invalid alignment <%s> of memory section <%s>" % (value, self.short_name))
270
-
265
+
266
+ def addOption(self, option: ARLiteral):
267
+ self.options.append(option)
268
+
269
+ def getOptions(self) -> List[ARLiteral]:
270
+ return self.options
271
271
 
272
272
  class ResourceConsumption(Identifiable):
273
273
  def __init__(self, parent: ARObject, short_name: str):
@@ -1,5 +1,5 @@
1
1
 
2
- from .data_dictionary import SwDataDefProps
2
+ from .m2.msr.data_dictionary.data_def_properties import SwDataDefProps
3
3
  from .ar_ref import ApplicationCompositeElementInPortInterfaceInstanceRef
4
4
  from .ar_object import ARObject
5
5
 
@@ -2,8 +2,8 @@ from abc import ABCMeta
2
2
 
3
3
  from .ar_object import ARNumerical
4
4
  from .ar_ref import RefType
5
- from .data_dictionary import SwDataDefProps
6
- from .common_structure import ValueSpecification
5
+ from .m2.msr.data_dictionary.data_def_properties import SwDataDefProps
6
+ from .m2.autosar_templates.common_structure import ValueSpecification
7
7
  from .general_structure import AtpFeature, ARObject
8
8
 
9
9
  class AtpPrototype(AtpFeature, metaclass = ABCMeta):
@@ -20,8 +20,14 @@ class DataPrototype(AtpPrototype, metaclass = ABCMeta):
20
20
 
21
21
  super().__init__(parent, short_name)
22
22
 
23
- self.sw_data_def_props = None # type: SwDataDefProps
23
+ self.swDataDefProps = None # type: SwDataDefProps
24
24
 
25
+ def getSwDataDefProps(self):
26
+ return self.swDataDefProps
27
+
28
+ def setSwDataDefProps(self, value):
29
+ self.swDataDefProps = value
30
+ return self
25
31
  class AutosarDataPrototype(DataPrototype, metaclass = ABCMeta):
26
32
  def __init__(self, parent:ARObject, short_name: str):
27
33
  if type(self) == AutosarDataPrototype:
@@ -29,13 +35,27 @@ class AutosarDataPrototype(DataPrototype, metaclass = ABCMeta):
29
35
 
30
36
  super().__init__(parent, short_name)
31
37
 
32
- self.type_tref = None
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
33
46
 
34
47
  class VariableDataPrototype(AutosarDataPrototype):
35
48
  def __init__(self, parent:ARObject, short_name: str):
36
49
  super().__init__(parent, short_name)
37
50
 
38
- self.init_value = None # type: ValueSpecification
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
39
59
 
40
60
  class ApplicationCompositeElementDataPrototype(DataPrototype, metaclass = ABCMeta):
41
61
  def __init__(self, parent:ARObject, short_name: str):
@@ -46,6 +66,14 @@ class ApplicationCompositeElementDataPrototype(DataPrototype, metaclass = ABCMet
46
66
 
47
67
  self.typeTRef = None # type: RefType
48
68
 
69
+ def getTypeTRef(self):
70
+ return self.typeTRef
71
+
72
+ def setTypeTRef(self, value):
73
+ self.typeTRef = value
74
+ return self
75
+
76
+
49
77
  class ApplicationArrayElement(ApplicationCompositeElementDataPrototype):
50
78
  def __init__(self, parent:ARObject, short_name: str):
51
79
  super().__init__(parent, short_name)
@@ -65,4 +93,11 @@ class ParameterDataPrototype(AutosarDataPrototype):
65
93
  def __init__(self, parent: ARObject, short_name: str):
66
94
  super().__init__(parent, short_name)
67
95
 
68
- self.init_value = None # type: ValueSpecification
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