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.
Files changed (76) hide show
  1. armodel/cli/arxml_dump_cli.py +13 -13
  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 +124 -14
  10. armodel/models/ar_ref.py +109 -62
  11. armodel/models/bsw_module_template.py +37 -14
  12. armodel/models/common_structure.py +132 -147
  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/can_communication.py +119 -3
  17. armodel/models/fibex/fibex_4_can/__init__.py +0 -0
  18. armodel/models/fibex/fibex_4_lin/__init__.py +0 -0
  19. armodel/models/fibex/fibex_4_multiplatform.py +81 -88
  20. armodel/models/fibex/fibex_core/__init__.py +0 -0
  21. armodel/models/fibex/fibex_core/core_communication.py +627 -0
  22. armodel/models/fibex/fibex_core/core_topology.py +180 -0
  23. armodel/models/fibex/lin_communication.py +24 -3
  24. armodel/models/general_structure.py +101 -8
  25. armodel/models/m2/__init__.py +0 -0
  26. armodel/models/m2/autosar_templates/__init__.py +0 -0
  27. armodel/models/m2/autosar_templates/common_structure/__init__.py +188 -0
  28. armodel/models/m2/autosar_templates/common_structure/constants.py +0 -0
  29. armodel/models/m2/autosar_templates/ecuc_description_template.py +268 -0
  30. armodel/models/m2/autosar_templates/sw_component_template/__init__.py +0 -0
  31. armodel/models/m2/autosar_templates/sw_component_template/communication.py +316 -0
  32. armodel/models/m2/autosar_templates/sw_component_template/components/__init__.py +0 -0
  33. armodel/models/m2/autosar_templates/sw_component_template/components/instance_refs.py +149 -0
  34. armodel/models/m2/autosar_templates/sw_component_template/port_interface.py +236 -0
  35. armodel/models/m2/autosar_templates/sw_component_template/swc_internal_behavior/__init__.py +203 -0
  36. armodel/models/m2/autosar_templates/sw_component_template/swc_internal_behavior/access_count.py +13 -0
  37. armodel/models/m2/autosar_templates/sw_component_template/swc_internal_behavior/data_elements.py +54 -0
  38. armodel/models/m2/autosar_templates/sw_component_template/swc_internal_behavior/mode_declaration_group.py +39 -0
  39. armodel/models/m2/autosar_templates/sw_component_template/swc_internal_behavior/server_call.py +26 -0
  40. armodel/models/m2/autosar_templates/sw_component_template/swc_internal_behavior/trigger.py +10 -0
  41. armodel/models/m2/autosar_templates/system_template/__init__.py +321 -0
  42. armodel/models/m2/autosar_templates/system_template/data_mapping.py +88 -0
  43. armodel/models/m2/autosar_templates/system_template/network_management.py +554 -0
  44. armodel/models/m2/autosar_templates/system_template/transport_protocols.py +7 -0
  45. armodel/models/m2/msr/__init__.py +0 -0
  46. armodel/models/m2/msr/asam_hdo/__init__.py +0 -0
  47. armodel/models/m2/msr/asam_hdo/units.py +105 -0
  48. armodel/models/m2/msr/data_dictionary/__init__.py +0 -0
  49. armodel/models/m2/msr/data_dictionary/auxillary_objects.py +42 -0
  50. armodel/models/m2/msr/data_dictionary/data_def_properties.py +295 -0
  51. armodel/models/m2/msr/documentation/__init__.py +0 -0
  52. armodel/models/m2/msr/documentation/block_elements.py +18 -0
  53. armodel/models/multilanguage_data.py +15 -0
  54. armodel/models/per_instance_memory.py +34 -6
  55. armodel/models/port_prototype.py +12 -174
  56. armodel/models/sw_component.py +14 -216
  57. armodel/parser/abstract_arxml_parser.py +10 -1
  58. armodel/parser/arxml_parser.py +803 -186
  59. armodel/tests/test_armodel/models/test_ar_package.py +1 -1
  60. armodel/tests/test_armodel/models/test_ar_ref.py +3 -3
  61. armodel/tests/test_armodel/models/test_bsw_module_template.py +5 -5
  62. armodel/tests/test_armodel/models/test_common_structure.py +3 -3
  63. armodel/tests/test_armodel/models/test_data_dictionary.py +5 -5
  64. armodel/tests/test_armodel/models/test_data_prototype.py +1 -1
  65. armodel/tests/test_armodel/models/test_datatype.py +1 -1
  66. armodel/tests/test_armodel/models/test_port_interface.py +1 -1
  67. armodel/tests/test_armodel/parser/test_parse_bswmd.py +3 -3
  68. armodel/tests/test_armodel/parser/test_sw_components.py +2 -2
  69. armodel/writer/arxml_writer.py +832 -196
  70. {armodel-1.5.0.dist-info → armodel-1.6.0.dist-info}/METADATA +24 -1
  71. armodel-1.6.0.dist-info/RECORD +127 -0
  72. {armodel-1.5.0.dist-info → armodel-1.6.0.dist-info}/entry_points.txt +3 -1
  73. armodel-1.5.0.dist-info/RECORD +0 -91
  74. {armodel-1.5.0.dist-info → armodel-1.6.0.dist-info}/LICENSE +0 -0
  75. {armodel-1.5.0.dist-info → armodel-1.6.0.dist-info}/WHEEL +0 -0
  76. {armodel-1.5.0.dist-info → armodel-1.6.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,180 @@
1
+ from abc import ABCMeta
2
+ from typing import List
3
+
4
+ from ...fibex.lin_communication import LinFrameTriggering
5
+ from ...fibex.can_communication import CanFrameTriggering
6
+ from ...ar_ref import RefType
7
+ from ...general_structure import Identifiable
8
+ from ...ar_object import ARFloat, ARLiteral, ARObject
9
+ from ...fibex.fibex_core.core_communication import FibexElement, FrameTriggering, ISignalTriggering, PduTriggering
10
+
11
+ class PhysicalChannel (Identifiable, metaclass = ABCMeta):
12
+ def __init__(self, parent: ARObject, short_name: str):
13
+ if type(self) == PhysicalChannel:
14
+ raise NotImplementedError("PhysicalChannel is an abstract class.")
15
+
16
+ super().__init__(parent, short_name)
17
+
18
+ self.commConnectorRefs = [] # type: List[RefType]
19
+ self.managedPhysicalChannelRefs = [] # type: List[RefType]
20
+
21
+ def getCommConnectorRefs(self):
22
+ return self.commConnectorRefs
23
+
24
+ def addCommConnectorRef(self, value):
25
+ self.commConnectorRefs.append(value)
26
+ return self
27
+
28
+ def getFrameTriggerings(self) -> List[FrameTriggering]:
29
+ return list(sorted(filter(lambda a: isinstance(a, FrameTriggering), self.elements.values()), key= lambda o:o.short_name))
30
+
31
+ def createCanFrameTriggering(self, short_name: str):
32
+ if (short_name not in self.elements):
33
+ channel = CanFrameTriggering(self, short_name)
34
+ self.elements[short_name] = channel
35
+ return self.elements[short_name]
36
+
37
+ def createLinFrameTriggering(self, short_name: str):
38
+ if (short_name not in self.elements):
39
+ channel = LinFrameTriggering(self, short_name)
40
+ self.elements[short_name] = channel
41
+ return self.elements[short_name]
42
+
43
+ def getISignalTriggerings(self) -> List[ISignalTriggering]:
44
+ return list(sorted(filter(lambda a: isinstance(a, ISignalTriggering), self.elements.values()), key= lambda o:o.short_name))
45
+
46
+ def createISignalTriggering(self, short_name: str):
47
+ if (short_name not in self.elements):
48
+ channel = ISignalTriggering(self, short_name)
49
+ self.elements[short_name] = channel
50
+ return self.elements[short_name]
51
+
52
+
53
+ def getManagedPhysicalChannelRefs(self):
54
+ return self.managedPhysicalChannelRefs
55
+
56
+ def addManagedPhysicalChannelRef(self, value):
57
+ self.managedPhysicalChannelRefs.append(value)
58
+ return self
59
+
60
+ def getPduTriggerings(self) -> List[PduTriggering]:
61
+ return list(sorted(filter(lambda a: isinstance(a, PduTriggering), self.elements.values()), key= lambda o:o.short_name))
62
+
63
+ def createPduTriggering(self, short_name: str):
64
+ if (short_name not in self.elements):
65
+ channel = PduTriggering(self, short_name)
66
+ self.elements[short_name] = channel
67
+ return self.elements[short_name]
68
+
69
+ class AbstractCanPhysicalChannel(PhysicalChannel, metaclass = ABCMeta):
70
+ def __init__(self, parent, short_name):
71
+ if type(self) == ARObject:
72
+ raise NotImplementedError("AbstractCanPhysicalChannel is an abstract class.")
73
+
74
+ super().__init__(parent, short_name)
75
+
76
+ class CanPhysicalChannel(AbstractCanPhysicalChannel):
77
+ def __init__(self, parent, short_name):
78
+ super().__init__(parent, short_name)
79
+
80
+ class LinPhysicalChannel(PhysicalChannel):
81
+ def __init__(self, parent: ARObject, short_name: str):
82
+ super().__init__(parent, short_name)
83
+
84
+ class CommunicationCluster(FibexElement, metaclass = ABCMeta):
85
+ def __init__(self, parent: ARObject, short_name: str):
86
+ if type(self) == CommunicationCluster:
87
+ raise NotImplementedError("CommunicationCluster is an abstract class.")
88
+
89
+ super().__init__(parent, short_name)
90
+
91
+ self.baudrate = None # type: ARFloat
92
+ self.protocolName = None # type: ARLiteral
93
+ self.protocolVersion = None # type: ARLiteral
94
+
95
+ def getBaudrate(self):
96
+ return self.baudrate
97
+
98
+ def setBaudrate(self, value):
99
+ self.baudrate = value
100
+ return self
101
+
102
+ def getPhysicalChannels(self) -> List[PhysicalChannel]:
103
+ return list(sorted(filter(lambda a: isinstance(a, PhysicalChannel), self.elements.values()), key= lambda o:o.short_name))
104
+
105
+ def getCanPhysicalChannels(self) -> List[CanPhysicalChannel]:
106
+ return list(sorted(filter(lambda a: isinstance(a, CanPhysicalChannel), self.elements.values()), key= lambda o:o.short_name))
107
+
108
+ def getLinPhysicalChannels(self) -> List[LinPhysicalChannel]:
109
+ return list(sorted(filter(lambda a: isinstance(a, LinPhysicalChannel), self.elements.values()), key= lambda o:o.short_name))
110
+
111
+ def createCanPhysicalChannel(self, short_name: str):
112
+ if (short_name not in self.elements):
113
+ channel = CanPhysicalChannel(self, short_name)
114
+ self.elements[short_name] = channel
115
+ return self.elements[short_name]
116
+
117
+ def createLinPhysicalChannel(self, short_name: str):
118
+ if (short_name not in self.elements):
119
+ channel = LinPhysicalChannel(self, short_name)
120
+ self.elements[short_name] = channel
121
+ return self.elements[short_name]
122
+
123
+ def getProtocolName(self):
124
+ return self.protocolName
125
+
126
+ def setProtocolName(self, value):
127
+ self.protocolName = value
128
+ return self
129
+
130
+ def getProtocolVersion(self):
131
+ return self.protocolVersion
132
+
133
+ def setProtocolVersion(self, value):
134
+ self.protocolVersion = value
135
+ return self
136
+
137
+ class AbstractCanCluster(CommunicationCluster, metaclass = ABCMeta):
138
+ def __init__(self, parent: ARObject, short_name: str):
139
+ if type(self) == AbstractCanCluster:
140
+ raise NotImplementedError("AbstractCanCluster is an abstract class.")
141
+
142
+ super().__init__(parent, short_name)
143
+
144
+ self.busOffRecovery = None
145
+ self.canFdBaudrate = None
146
+ self.canXlBaudrate = None
147
+
148
+ def getBusOffRecovery(self):
149
+ return self.busOffRecovery
150
+
151
+ def setBusOffRecovery(self, value):
152
+ self.busOffRecovery = value
153
+ return self
154
+
155
+ def getCanFdBaudrate(self):
156
+ return self.canFdBaudrate
157
+
158
+ def setCanFdBaudrate(self, value):
159
+ self.canFdBaudrate = value
160
+ return self
161
+
162
+ def getCanXlBaudrate(self):
163
+ return self.canXlBaudrate
164
+
165
+ def setCanXlBaudrate(self, value):
166
+ self.canXlBaudrate = value
167
+ return self
168
+
169
+
170
+ class CanCluster(AbstractCanCluster):
171
+ def __init__(self, parent: ARObject, short_name: str):
172
+ super().__init__(parent, short_name)
173
+
174
+ class LinCluster(CommunicationCluster):
175
+ def __init__(self, parent: ARObject, short_name: str):
176
+ super().__init__(parent, short_name)
177
+
178
+ class EcuInstance(FibexElement):
179
+ def __init__(self, parent, short_name):
180
+ super().__init__(parent, short_name)
@@ -1,7 +1,7 @@
1
1
 
2
2
  from abc import ABCMeta
3
- from ..ar_object import ARObject
4
- from .fibex_core import Frame
3
+ from ..ar_object import ARLiteral, ARNumerical, ARObject
4
+ from .fibex_core.core_communication import Frame, FrameTriggering
5
5
 
6
6
  class LinFrame(Frame):
7
7
  __metaclass__ = ABCMeta
@@ -14,4 +14,25 @@ class LinFrame(Frame):
14
14
 
15
15
  class LinUnconditionalFrame(LinFrame):
16
16
  def __init__(self, parent: ARObject, short_name: str):
17
- super().__init__(parent, short_name)
17
+ super().__init__(parent, short_name)
18
+
19
+ class LinFrameTriggering(FrameTriggering):
20
+ def __init__(self, parent, short_name):
21
+ super().__init__(parent, short_name)
22
+
23
+ self.identifier = None # type: ARNumerical
24
+ self.linChecksum = None # type: ARLiteral
25
+
26
+ def getIdentifier(self):
27
+ return self.identifier
28
+
29
+ def setIdentifier(self, value):
30
+ self.identifier = value
31
+ return self
32
+
33
+ def getLinChecksum(self):
34
+ return self.linChecksum
35
+
36
+ def setLinChecksum(self, value):
37
+ self.linChecksum = value
38
+ return self
@@ -1,6 +1,7 @@
1
1
  from abc import ABCMeta
2
2
  from typing import List
3
3
 
4
+ from .annotation import Annotation
4
5
  from .ar_ref import RefType
5
6
  from .multilanguage_data import MultiLanguageOverviewParagraph, MultilanguageLongName
6
7
  from .ar_object import ARObject
@@ -12,21 +13,55 @@ class Sd(ARObject):
12
13
  self.gid = ""
13
14
  self.value = ""
14
15
 
16
+ def getGID(self):
17
+ return self.gid
18
+
19
+ def setGID(self, value):
20
+ self.gid = value
21
+ return self
22
+
23
+ def getValue(self):
24
+ return self.value
25
+
26
+ def setValue(self, value):
27
+ self.value = value
28
+ return self
15
29
  class Sdg(ARObject):
16
30
  def __init__(self):
17
31
  super().__init__()
18
32
 
19
33
  self.gid = ""
20
34
  self.sd = [] # type: List[Sd]
21
- self.sdg_caption = None
22
- self.sdg_contents_type = None
35
+ self.sdgCaption = None
36
+ self.sdgContentsTypes = [] # type: List[Sdg]
37
+
38
+ def getGID(self):
39
+ return self.gid
40
+
41
+ def setGID(self, value):
42
+ self.gid = value
43
+ return self
23
44
 
24
45
  def addSd(self, sd: Sd):
25
46
  self.sd.append(sd)
47
+ return self
26
48
 
27
49
  def getSds(self) -> List[Sd]:
28
50
  return self.sd
29
51
 
52
+ def getSdgCaption(self):
53
+ return self.sdgCaption
54
+
55
+ def setSdgCaption(self, value):
56
+ self.sdgCaption = value
57
+ return self
58
+
59
+ def addSdgContentsType(self, sdg):
60
+ self.sdgContentsTypes.append(sdg)
61
+
62
+ def getSdgContentsTypes(self):
63
+ return self.sdgContentsTypes
64
+
30
65
  class AdminData(ARObject):
31
66
  def __init__(self):
32
67
  super().__init__()
@@ -67,21 +102,30 @@ class Referrable(ARObject, metaclass=ABCMeta):
67
102
  def shortName(self, value):
68
103
  self.short_name = value
69
104
 
105
+ def getShortName(self) -> str:
106
+ return self.short_name
107
+
70
108
  @property
71
109
  def full_name(self) -> str:
72
110
  return self._parent.full_name + "/" + self.short_name
73
111
 
74
- class MultilanguageReferrable(Referrable, metaclass=ABCMeta):
112
+ class MultilanguageReferrable(Referrable, metaclass = ABCMeta):
75
113
  def __init__(self, parent: ARObject, short_name: str):
76
114
  if type(self) == MultilanguageReferrable:
77
115
  raise NotImplementedError("MultilanguageReferrable is an abstract class.")
78
116
 
79
117
  super().__init__(parent, short_name)
80
118
 
81
- self._parent = parent
82
- self.long_name = None # type: MultilanguageLongName
119
+ #self._parent = parent
120
+ self.longName = None # type: MultilanguageLongName
83
121
 
84
- class CollectableElement(ARObject, metaclass=ABCMeta):
122
+ def getLongName(self) -> MultilanguageLongName:
123
+ return self.longName
124
+
125
+ def setLongName(self, value: MultilanguageLongName):
126
+ self.longName = value
127
+ return self
128
+ class CollectableElement(ARObject, metaclass = ABCMeta):
85
129
  def __init__(self):
86
130
  if type(self) == CollectableElement:
87
131
  raise NotImplementedError("CollectableElement is an abstract class.")
@@ -111,10 +155,59 @@ class Identifiable(MultilanguageReferrable, CollectableElement, metaclass=ABCMet
111
155
  MultilanguageReferrable.__init__(self, parent, short_name)
112
156
  CollectableElement.__init__(self)
113
157
 
114
- self.admin_data = None # type: AdminData
115
- self._category = None
158
+ self.annotations = [] # type: List[Annotation]
159
+ self.adminData = None # type: AdminData
160
+ self.category = None
116
161
  self.desc = None # type: MultiLanguageOverviewParagraph
117
162
 
163
+ def getAdminData(self):
164
+ return self.adminData
165
+
166
+ def setAdminData(self, value):
167
+ self.adminData = value
168
+ return self
169
+
170
+ def getDesc(self):
171
+ return self.desc
172
+
173
+ def setDesc(self, value):
174
+ self.desc = value
175
+ return self
176
+
177
+ def getCategory(self):
178
+ return self.category
179
+
180
+ def setCategory(self, value):
181
+ self.category = value
182
+ return self
183
+
184
+ def addAnnotation(self, annotation: Annotation):
185
+ self.annotations.append(annotation)
186
+ return self
187
+
188
+ def getAnnotations(self) -> List[Annotation]:
189
+ return self.annotations
190
+
191
+ class Describable(ARObject, metaclass=ABCMeta):
192
+ def __init__(self):
193
+ if type(self) == Describable:
194
+ raise NotImplementedError("Describable is an abstract class.")
195
+
196
+ super().__init__()
197
+
198
+ self._desc = None
199
+ self._category = None
200
+ self._adminData = None
201
+ self._introduction = None
202
+
203
+ @property
204
+ def desc(self):
205
+ return self._desc
206
+
207
+ @desc.setter
208
+ def desc(self, value):
209
+ self._desc = value
210
+
118
211
  @property
119
212
  def category(self):
120
213
  return self._category
File without changes
File without changes
@@ -0,0 +1,188 @@
1
+ from abc import ABCMeta
2
+ from typing import List
3
+
4
+ from armodel.models.general_structure import ARElement
5
+ from ....ar_object import ARLiteral, ARNumerical, ARObject
6
+
7
+ class ValueSpecification(ARObject, metaclass = ABCMeta):
8
+ '''
9
+ Base class for expressions leading to a value which can be used to initialize a data object.
10
+
11
+ Base : ARObject
12
+ Subclasses : AbstractRuleBasedValueSpecification, ApplicationValueSpecification, CompositeValueSpecification,
13
+ ConstantReference, NotAvailableValueSpecification, NumericalValueSpecification, ReferenceValueSpecification,
14
+ TextValueSpecification
15
+ '''
16
+ def __init__(self):
17
+ if type(self) == ValueSpecification:
18
+ raise NotImplementedError("ValueSpecification is an abstract class.")
19
+
20
+ super().__init__()
21
+
22
+ self.shortLabel = None
23
+
24
+ def getShortLabel(self):
25
+ return self.shortLabel
26
+
27
+ def setShortLabel(self, value):
28
+ self.shortLabel = value
29
+ return self
30
+
31
+ class CompositeValueSpecification(ValueSpecification, metaclass = ABCMeta):
32
+ '''
33
+ This abstract meta-class acts a base class for ValueSpecifications that have a composite form.
34
+
35
+ Base : ARObject, ValueSpecification
36
+ Subclasses : ArrayValueSpecification, RecordValueSpecification
37
+ '''
38
+ def __init__(self):
39
+ if type(self) == CompositeValueSpecification:
40
+ raise NotImplementedError("CompositeValueSpecification is an abstract class.")
41
+
42
+ super().__init__()
43
+
44
+ class CompositeRuleBasedValueArgument(ARObject, metaclass = ABCMeta):
45
+ '''
46
+ This meta-class has the ability to serve as the abstract base class for ValueSpecifications that can be
47
+ used for compound primitive data types.
48
+
49
+ Base : ARObject
50
+ Subclasses : ApplicationRuleBasedValueSpecification, ApplicationValueSpecification
51
+ '''
52
+ def __init__(self):
53
+ if type(self) == CompositeRuleBasedValueArgument:
54
+ raise NotImplementedError("CompositeRuleBasedValueArgument is an abstract class.")
55
+
56
+ super().__init__()
57
+
58
+ class ApplicationValueSpecification(CompositeRuleBasedValueArgument, ValueSpecification):
59
+ '''
60
+ This meta-class represents values for DataPrototypes typed by ApplicationDataTypes (this includes in
61
+ particular compound primitives).
62
+ For further details refer to ASAM CDF 2.0. This meta-class corresponds to some extent with
63
+ SW-INSTANCE in ASAM CDF 2.0.
64
+
65
+ Base ARObject, CompositeRuleBasedValueArgument, ValueSpecification
66
+ '''
67
+ def __init__(self):
68
+
69
+ CompositeRuleBasedValueArgument.__init__(self)
70
+ ValueSpecification.__init__(self)
71
+
72
+ self.category = None
73
+ self.swAxisCont = []
74
+ self.swValueCont = None
75
+
76
+ def getCategory(self):
77
+ return self.category
78
+
79
+ def setCategory(self, value):
80
+ self.category = value
81
+ return self
82
+
83
+ def getSwAxisCont(self):
84
+ return self.swAxisCont
85
+
86
+ def setSwAxisCont(self, value):
87
+ self.swAxisCont = value
88
+ return self
89
+
90
+ def getSwValueCont(self):
91
+ return self.swValueCont
92
+
93
+ def setSwValueCont(self, value):
94
+ self.swValueCont = value
95
+ return self
96
+
97
+
98
+ class RecordValueSpecification(CompositeValueSpecification):
99
+ '''
100
+ Specifies the values for a record.
101
+
102
+ Base : ARObject, CompositeValueSpecification, ValueSpecification
103
+ '''
104
+ def __init__(self):
105
+ super().__init__()
106
+
107
+ self.fields = []
108
+
109
+ def addField(self, field: ValueSpecification):
110
+ self.fields.append(field)
111
+
112
+ def getFields(self) -> List[ValueSpecification]:
113
+ return self.fields
114
+
115
+ class TextValueSpecification(ValueSpecification):
116
+ def __init__(self):
117
+ super().__init__()
118
+
119
+ self.value = None # type: ARLiteral
120
+
121
+ def getValue(self):
122
+ return self.value
123
+
124
+ def setValue(self, value):
125
+ self.value = value
126
+ return self
127
+
128
+
129
+ class NumericalValueSpecification(ValueSpecification):
130
+ def __init__(self):
131
+ super().__init__()
132
+
133
+ self.value = None # type: ARNumerical
134
+
135
+ def getValue(self):
136
+ return self.value
137
+
138
+ def setValue(self, value):
139
+ self.value = value
140
+ return self
141
+
142
+
143
+ class ArrayValueSpecification(ValueSpecification):
144
+ def __init__(self):
145
+ super().__init__()
146
+
147
+ self.element = [] # type: List[ValueSpecification]
148
+ self.intendedPartialInitializationCount = None
149
+
150
+ def getIntendedPartialInitializationCount(self):
151
+ return self.intendedPartialInitializationCount
152
+
153
+ def setIntendedPartialInitializationCount(self, value):
154
+ self.intendedPartialInitializationCount = value
155
+ return self
156
+
157
+ def addElement(self, element: ValueSpecification):
158
+ self.element.append(element)
159
+
160
+ def getElements(self) -> List[ValueSpecification]:
161
+ return self.element
162
+
163
+ class ConstantSpecification(ARElement):
164
+ def __init__(self, parent, short_name):
165
+ super().__init__(parent, short_name)
166
+
167
+ self.valueSpec = None # type: ValueSpecification
168
+
169
+ def getValueSpec(self):
170
+ return self.valueSpec
171
+
172
+ def setValueSpec(self, value):
173
+ self.valueSpec = value
174
+ return self
175
+
176
+
177
+ class ConstantReference(ValueSpecification):
178
+ def __init__(self):
179
+ super().__init__()
180
+
181
+ self.constantRef = None # type: RefType
182
+
183
+ def getConstantRef(self):
184
+ return self.constantRef
185
+
186
+ def setConstantRef(self, value):
187
+ self.constantRef = value
188
+ return self