armodel 1.4.0__py3-none-any.whl → 1.5.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 (72) hide show
  1. armodel/__init__.py +2 -1
  2. armodel/cli/arxml_dump_cli.py +9 -7
  3. armodel/cli/arxml_format_cli.py +72 -0
  4. armodel/cli/connector_update_cli.py +11 -4
  5. armodel/data_models/__init__.py +0 -0
  6. armodel/data_models/sw_connector.py +22 -0
  7. armodel/lib/data_analyzer.py +1 -1
  8. armodel/models/__init__.py +3 -2
  9. armodel/models/annotation.py +20 -0
  10. armodel/models/ar_object.py +163 -18
  11. armodel/models/ar_package.py +228 -24
  12. armodel/models/ar_ref.py +85 -6
  13. armodel/models/bsw_module_template.py +113 -27
  14. armodel/models/calibration.py +107 -4
  15. armodel/models/common_structure.py +142 -52
  16. armodel/models/communication.py +10 -1
  17. armodel/models/data_def_properties.py +16 -0
  18. armodel/models/data_dictionary.py +46 -9
  19. armodel/models/data_prototype.py +24 -5
  20. armodel/models/datatype.py +69 -20
  21. armodel/models/end_to_end_protection.py +67 -0
  22. armodel/models/fibex/__init__.py +0 -0
  23. armodel/models/fibex/can_communication.py +6 -0
  24. armodel/models/fibex/fibex_4_multiplatform.py +145 -0
  25. armodel/models/fibex/fibex_core.py +341 -0
  26. armodel/models/fibex/lin_communication.py +17 -0
  27. armodel/models/fibex/lin_topology.py +7 -0
  28. armodel/models/general_structure.py +44 -18
  29. armodel/models/global_constraints.py +4 -4
  30. armodel/models/implementation.py +79 -32
  31. armodel/models/internal_behavior.py +63 -0
  32. armodel/models/m2_msr.py +6 -4
  33. armodel/models/mode_declaration.py +8 -0
  34. armodel/models/multilanguage_data.py +42 -0
  35. armodel/models/per_instance_memory.py +14 -0
  36. armodel/models/port_interface.py +27 -4
  37. armodel/models/port_prototype.py +57 -19
  38. armodel/models/record_layout.py +118 -0
  39. armodel/models/rpt_scenario.py +20 -0
  40. armodel/models/service_mapping.py +11 -0
  41. armodel/models/service_needs.py +48 -0
  42. armodel/models/sw_component.py +293 -45
  43. armodel/models/system_template/__init__.py +0 -0
  44. armodel/models/system_template/network_management.py +7 -0
  45. armodel/models/system_template/transport_protocols.py +7 -0
  46. armodel/models/timing.py +91 -0
  47. armodel/parser/abstract_arxml_parser.py +248 -0
  48. armodel/parser/arxml_parser.py +1571 -844
  49. armodel/parser/connector_xlsx_parser.py +190 -0
  50. armodel/parser/excel_parser.py +18 -0
  51. armodel/tests/test_armodel/models/test_ar_object.py +152 -0
  52. armodel/tests/test_armodel/models/test_ar_package.py +1 -1
  53. armodel/tests/test_armodel/models/test_common_structure.py +2 -2
  54. armodel/tests/test_armodel/models/test_data_dictionary.py +7 -7
  55. armodel/tests/test_armodel/models/test_data_prototype.py +3 -3
  56. armodel/tests/test_armodel/models/test_datatype.py +11 -11
  57. armodel/tests/test_armodel/models/test_general_structure.py +1 -1
  58. armodel/tests/test_armodel/models/test_implementation.py +26 -0
  59. armodel/tests/test_armodel/models/test_m2_msr.py +4 -4
  60. armodel/tests/test_armodel/models/test_port_interface.py +5 -5
  61. armodel/tests/test_armodel/parser/test_arxml_parser.py +15 -0
  62. armodel/tests/test_armodel/parser/test_parse_bswmd.py +74 -42
  63. armodel/tests/test_armodel/parser/test_sw_components.py +93 -0
  64. armodel/writer/abstract_arxml_writer.py +123 -0
  65. armodel/writer/arxml_writer.py +1701 -358
  66. {armodel-1.4.0.dist-info → armodel-1.5.0.dist-info}/METADATA +114 -3
  67. armodel-1.5.0.dist-info/RECORD +91 -0
  68. {armodel-1.4.0.dist-info → armodel-1.5.0.dist-info}/WHEEL +1 -1
  69. {armodel-1.4.0.dist-info → armodel-1.5.0.dist-info}/entry_points.txt +2 -0
  70. armodel-1.4.0.dist-info/RECORD +0 -60
  71. {armodel-1.4.0.dist-info → armodel-1.5.0.dist-info}/LICENSE +0 -0
  72. {armodel-1.4.0.dist-info → armodel-1.5.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,63 @@
1
+ from abc import ABCMeta
2
+ from typing import List
3
+
4
+ from .ar_object import ARLiteral, ARObject
5
+ from .ar_ref import RefType
6
+ from .common_structure import ExclusiveArea
7
+ from .data_prototype import ParameterDataPrototype
8
+ from .general_structure import Identifiable
9
+
10
+ class IncludedDataTypeSet(ARObject):
11
+ def __init__(self):
12
+ super().__init__()
13
+
14
+ self.data_type_refs = [] # type: List[RefType]
15
+ self.literal_prefix = None # type: ARLiteral
16
+
17
+ def addDataTypeRef(self, ref_type: RefType):
18
+ self.data_type_refs.append(ref_type)
19
+
20
+ def getDataTypeRefs(self) -> List[RefType]:
21
+ return self.data_type_refs
22
+
23
+ @property
24
+ def literalPrefix(self) -> ARLiteral:
25
+ return self.literal_prefix
26
+
27
+ @literalPrefix.setter
28
+ def literalPrefix(self, value: ARLiteral):
29
+ self.literal_prefix = value
30
+
31
+ class InternalBehavior(Identifiable, metaclass=ABCMeta):
32
+ def __init__(self, parent: ARObject, short_name: str):
33
+ if type(self) == InternalBehavior:
34
+ raise NotImplementedError("InternalBehavior is an abstract class.")
35
+ super().__init__(parent, short_name)
36
+
37
+ self.data_type_mapping_refs = [] # type: List[RefType]
38
+ self.constant_memories = [] # type: List[ParameterDataPrototype]
39
+
40
+ def addDataTypeMappingRef(self, ref: RefType):
41
+ self.data_type_mapping_refs.append(ref)
42
+
43
+ def getDataTypeMappingRefs(self) -> List[RefType]:
44
+ return self.data_type_mapping_refs
45
+
46
+ def createExclusiveArea(self, short_name: str) -> ExclusiveArea:
47
+ if (short_name not in self.elements):
48
+ event = ExclusiveArea(self, short_name)
49
+ self.elements[short_name] = event
50
+ return self.elements[short_name]
51
+
52
+ def getExclusiveAreas(self) -> List[ExclusiveArea]:
53
+ return list(filter(lambda c: isinstance(c, ExclusiveArea), self.elements.values()))
54
+
55
+ def createConstantMemory(self, short_name: str) -> ParameterDataPrototype:
56
+ if (short_name not in self.elements):
57
+ prototype = ParameterDataPrototype(self, short_name)
58
+ self.elements[short_name] = prototype
59
+ self.constant_memories.append(prototype)
60
+ return self.elements[short_name]
61
+
62
+ def getConstantMemorys(self) -> List[ParameterDataPrototype]:
63
+ return self.constant_memories
armodel/models/m2_msr.py CHANGED
@@ -1,3 +1,4 @@
1
+ from .ar_object import ARLiteral
1
2
  from .general_structure import ARObject, ARElement, Limit
2
3
  from .ar_ref import RefType
3
4
  from abc import ABCMeta
@@ -117,10 +118,11 @@ class CompuScale(Compu):
117
118
  def __init__(self):
118
119
  super().__init__()
119
120
 
120
- self.lower_limit = None # type: Limit
121
- self.upper_limit = None # type: Limit
122
- self.compu_inverse_value = None # type: CompuConst
123
- self.compu_scale_contents = None # type: CompuScaleContents
121
+ self.symbol = None # type: ARLiteral
122
+ self.lowerLimit = None # type: Limit
123
+ self.upperLimit = None # type: Limit
124
+ self.compuInverseValue = None # type: CompuConst
125
+ self.compuScaleContents = None # type: CompuScaleContents
124
126
 
125
127
  class CompuScales(CompuContent):
126
128
  def __init__(self):
@@ -0,0 +1,8 @@
1
+
2
+ from .ar_object import ARObject
3
+ from .general_structure import Identifiable
4
+
5
+
6
+ class ModeDeclarationGroupPrototype(Identifiable):
7
+ def __init__(self, parent: ARObject, short_name: str):
8
+ super().__init__(parent, short_name)
@@ -0,0 +1,42 @@
1
+
2
+ from typing import List
3
+ from .ar_object import ARObject
4
+
5
+
6
+ class LLongName(ARObject):
7
+ def __init__(self):
8
+ super().__init__()
9
+
10
+ self.l = ""
11
+ self.value = ""
12
+
13
+ class LOverviewParagraph(ARObject):
14
+ def __init__(self):
15
+ super().__init__()
16
+
17
+ self.l = ""
18
+ self.value = ""
19
+
20
+ class MultilanguageLongName(ARObject):
21
+ def __init__(self):
22
+ super().__init__()
23
+
24
+ self.l4 = [] # type:List[LLongName]
25
+
26
+ def addL4(self, l4: LLongName):
27
+ self.l4.append(l4)
28
+
29
+ def getL4s(self) -> List[LLongName]:
30
+ return self.l4
31
+
32
+ class MultiLanguageOverviewParagraph(ARObject):
33
+ def __init__(self):
34
+ super().__init__()
35
+
36
+ self.l2 = [] # type: List[str]
37
+
38
+ def addL2(self, l2: LOverviewParagraph):
39
+ self.l2.append(l2)
40
+
41
+ def getL2s(self) -> List[LOverviewParagraph]:
42
+ return self.l2
@@ -0,0 +1,14 @@
1
+
2
+ from .data_dictionary import SwDataDefProps
3
+ from .ar_object import ARObject
4
+ from .general_structure import Identifiable
5
+
6
+
7
+ class PerInstanceMemory(Identifiable):
8
+ def __init__(self, parent: ARObject, short_name: str):
9
+ super().__init__(parent, short_name)
10
+
11
+ self.init_value = None # type: str
12
+ self.sw_data_def_props = None # type: SwDataDefProps
13
+ self.type = None # type: str
14
+ self.type_definition = None # type: str
@@ -1,19 +1,21 @@
1
1
  from abc import ABCMeta
2
2
  from typing import List
3
3
 
4
+ from .ar_object import ARBoolean, ARLiteral, ARNumerical
5
+ from .common_structure import ModeDeclarationGroupPrototype, Trigger
4
6
  from .datatype import AtpType
5
7
  from .general_structure import ARObject, Identifiable, AtpFeature
6
8
  from .data_prototype import VariableDataPrototype, AutosarDataPrototype
7
9
  from .ar_ref import RefType
8
10
 
9
- class PortInterface(AtpType, metaclass=ABCMeta):
11
+ class PortInterface(AtpType, metaclass = ABCMeta):
10
12
  def __init__(self, parent: ARObject, short_name: str):
11
13
  if type(self) == PortInterface:
12
14
  raise NotImplementedError("PortInterface is an abstract class.")
13
15
  super().__init__(parent, short_name)
14
16
 
15
- self.is_service = False
16
-
17
+ self.is_service = None # type: ARBoolean
18
+ self.serviceKind = None # type: ARLiteral
17
19
 
18
20
  class DataInterface(PortInterface, metaclass=ABCMeta):
19
21
  def __init__(self, parent: ARObject, short_name: str):
@@ -63,7 +65,7 @@ class ApplicationError(Identifiable):
63
65
  def __init__(self, parent: ARObject, short_name: str):
64
66
  super().__init__(parent, short_name)
65
67
 
66
- self.error_code = 0
68
+ self.error_code = None # type: ARNumerical
67
69
 
68
70
  class ClientServerOperation(AtpFeature):
69
71
  """
@@ -140,3 +142,24 @@ class ClientServerInterface(PortInterface):
140
142
 
141
143
  def getPossibleErrors(self) -> List[ApplicationError]:
142
144
  return list(filter(lambda c: isinstance(c, ApplicationError), self.elements.values()))
145
+
146
+ class TriggerInterface(PortInterface):
147
+ def __init__(self, parent: ARObject, short_name: str):
148
+ super().__init__(parent, short_name)
149
+
150
+ self._triggers = [] # type: Trigger
151
+
152
+ class ModeSwitchInterface(PortInterface):
153
+ def __init__(self, parent: ARObject, short_name: str):
154
+ super().__init__(parent, short_name)
155
+
156
+ self._modeGroup = [] # type: List[ModeDeclarationGroupPrototype]
157
+
158
+ def createModeGroup(self, short_name: str) -> ModeDeclarationGroupPrototype:
159
+ prototype = ModeDeclarationGroupPrototype(self, short_name)
160
+ if (short_name not in self.elements):
161
+ self.elements[short_name] = prototype
162
+ return self.elements[short_name]
163
+
164
+ def getModeGroups(self) -> List[ModeDeclarationGroupPrototype]:
165
+ return list(sorted(filter(lambda c: isinstance(c, ModeDeclarationGroupPrototype), self.elements.values()), key= lambda o: o.short_name))
@@ -1,9 +1,10 @@
1
1
  from typing import List
2
2
 
3
+ from .ar_object import ARBoolean
3
4
  from .data_dictionary import SwDataDefProps
4
5
  from .general_structure import ARObject, Identifiable
5
6
  from .ar_ref import RefType, TRefType
6
- from .communication import TransmissionAcknowledgementRequest
7
+ from .communication import CompositeNetworkRepresentation, TransmissionAcknowledgementRequest
7
8
  from .common_structure import ValueSpecification
8
9
 
9
10
  from abc import ABCMeta
@@ -48,12 +49,28 @@ class ClientComSpec(RPortComSpec):
48
49
  super().__init__()
49
50
 
50
51
  self.operation_ref = None # type: RefType
51
-
52
+
53
+ @property
54
+ def operationRef(self) -> RefType:
55
+ return self.operation_ref
56
+
57
+ @operationRef.setter
58
+ def operationRef(self, value:RefType):
59
+ self.operation_ref = value
52
60
 
53
61
  class ModeSwitchReceiverComSpec(RPortComSpec):
54
62
  def __init__(self):
55
63
  super().__init__()
56
64
 
65
+ self.mode_group_ref = None # type: RefType
66
+
67
+ @property
68
+ def modeGroupRef(self) -> RefType:
69
+ return self.mode_group_ref
70
+
71
+ @modeGroupRef.setter
72
+ def modeGroupRef(self, value: RefType):
73
+ self.mode_group_ref = value
57
74
 
58
75
  class NvRequireComSpec(RPortComSpec):
59
76
  def __init__(self):
@@ -71,11 +88,17 @@ class ReceiverComSpec(RPortComSpec):
71
88
  def __init__(self):
72
89
  super().__init__()
73
90
 
74
- self.data_element_ref = None # type: RefType
75
- self.network_representation = None # type: SwDataDefProps
76
- self.handle_out_of_range = None # type: HandleOutOfRangeStatusEnum
77
- self.uses_end_to_end_protection = False
78
-
91
+ self._composite_network_representation = [] # type: List[CompositeNetworkRepresentation]
92
+ self.data_element_ref = None # type: RefType
93
+ self.network_representation = None # type: SwDataDefProps
94
+ self.handle_out_of_range = None # type: str
95
+ self.uses_end_to_end_protection = None # type: ARBoolean
96
+
97
+ def addCompositeNetworkRepresentation(self, representation: CompositeNetworkRepresentation):
98
+ self._composite_network_representation.append(representation)
99
+
100
+ def getCompositeNetworkRepresentations(self) -> List[CompositeNetworkRepresentation]:
101
+ return self._composite_network_representation
79
102
 
80
103
  class ModeSwitchSenderComSpec(RPortComSpec):
81
104
  def __init__(self):
@@ -92,11 +115,18 @@ class SenderComSpec(PPortComSpec):
92
115
 
93
116
  def __init__(self):
94
117
  super().__init__()
95
- self.data_element_ref = None # type: RefType
96
- self.network_representation = None # type: SwDataDefProps
97
- self.handle_out_of_range = ""
98
- self.transmission_acknowledge = None # type: TransmissionAcknowledgementRequest
99
- self.uses_end_to_end_protection = False
118
+ self._composite_network_representation = [] # type: List[CompositeNetworkRepresentation]
119
+ self.data_element_ref = None # type: RefType
120
+ self.network_representation = None # type: SwDataDefProps
121
+ self.handle_out_of_range = None # type: str
122
+ self.transmission_acknowledge = None # type: TransmissionAcknowledgementRequest
123
+ self.uses_end_to_end_protection = None # type: ARBoolean
124
+
125
+ def addCompositeNetworkRepresentation(self, representation: CompositeNetworkRepresentation):
126
+ self._composite_network_representation.append(representation)
127
+
128
+ def getCompositeNetworkRepresentations(self) -> List[CompositeNetworkRepresentation]:
129
+ return self._composite_network_representation
100
130
 
101
131
  class QueuedSenderComSpec(PPortComSpec):
102
132
  def __init__(self):
@@ -113,7 +143,9 @@ class NonqueuedSenderComSpec(SenderComSpec):
113
143
  class ServerComSpec(PPortComSpec):
114
144
  def __init__(self):
115
145
  super().__init__()
116
- self.operation_ref = None # type: RefType
146
+
147
+ self.operation_ref = None # type: RefType
148
+ self.queue_length = None # type: int
117
149
 
118
150
 
119
151
  class NonqueuedReceiverComSpec(ReceiverComSpec):
@@ -121,10 +153,10 @@ class NonqueuedReceiverComSpec(ReceiverComSpec):
121
153
  super().__init__()
122
154
 
123
155
  self.alive_timeout = 0
124
- self.enable_updated = False
156
+ self.enable_updated = None # type: ARBoolean
125
157
  self.filter = None # type: DataFilter
126
158
  self.handle_data_status = None # type: bool
127
- self.handle_never_received = False
159
+ self.handle_never_received = None # type: ARBoolean
128
160
  self.handel_timeout_type = ""
129
161
  self.init_value = None # type: ValueSpecification
130
162
  self.timeout_substitution = None # type: ValueSpecification
@@ -147,13 +179,15 @@ class AbstractProvidedPortPrototype(PortPrototype):
147
179
  self.provided_com_specs = [] # type: List[PPortComSpec]
148
180
 
149
181
  def _validateRPortComSpec(self, com_spec: PPortComSpec):
150
- if (isinstance(com_spec, NonqueuedSenderComSpec)):
151
- if (com_spec.data_element_ref == None):
182
+ if isinstance(com_spec, NonqueuedSenderComSpec):
183
+ if com_spec.data_element_ref == None:
152
184
  raise ValueError(
153
185
  "operation of NonqueuedSenderComSpec is invalid")
154
- if (com_spec.data_element_ref.dest != "VARIABLE-DATA-PROTOTYPE"):
186
+ if com_spec.data_element_ref.dest != "VARIABLE-DATA-PROTOTYPE":
155
187
  raise ValueError(
156
188
  "Invalid operation dest of NonqueuedSenderComSpec")
189
+ elif isinstance(com_spec, ServerComSpec):
190
+ pass
157
191
  else:
158
192
  raise ValueError("Unsupported com spec")
159
193
 
@@ -188,8 +222,12 @@ class AbstractRequiredPortPrototype(PortPrototype):
188
222
  if (com_spec.data_element_ref.dest != "VARIABLE-DATA-PROTOTYPE"):
189
223
  raise ValueError(
190
224
  "Invalid date element dest of NonqueuedReceiverComSpec.")
225
+ elif isinstance(com_spec, QueuedReceiverComSpec):
226
+ pass
227
+ elif isinstance(com_spec, ModeSwitchReceiverComSpec):
228
+ pass
191
229
  else:
192
- raise ValueError("Unsupported RPortComSpec")
230
+ raise ValueError("Unsupported RPortComSpec <%s>" % type(com_spec))
193
231
 
194
232
  def addRequiredComSpec(self, com_spec: RPortComSpec):
195
233
  self._validateRPortComSpec(com_spec)
@@ -0,0 +1,118 @@
1
+
2
+ from .multilanguage_data import MultiLanguageOverviewParagraph
3
+ from .ar_ref import RefType
4
+ from .ar_object import ARLiteral, ARNumerical, ARObject
5
+ from .general_structure import ARElement
6
+
7
+ class SwRecordLayoutV(ARObject):
8
+ def __init__(self):
9
+ super().__init__()
10
+
11
+ self.baseTypeRef = None # type: RefType
12
+ self.desc = None # type: MultiLanguageOverviewParagraph
13
+ self.shortLabel = None # type: ARLiteral
14
+ self.swGenericAxisParamTypeRef = None # type: RefType
15
+ self.swRecordLayoutVAxis = None # type: ARNumerical
16
+ self.swRecordLayoutVFixValue = None # type: ARNumerical
17
+ self.swRecordLayoutVIndex = None # type: ARLiteral
18
+ self.swRecordLayoutVProp = None # type: ARLiteral
19
+
20
+ def setShortLabel(self, short_label: ARLiteral):
21
+ self.shortLabel = short_label
22
+ return self
23
+
24
+ def setBaseTypeRef(self, ref: RefType):
25
+ self.baseTypeRef = ref
26
+ return self
27
+
28
+ def setSwRecordLayoutVAxis(self, axis: ARNumerical):
29
+ self.swRecordLayoutVAxis = axis
30
+ return self
31
+
32
+ def setSwRecordLayoutVFixValue(self, value: ARNumerical):
33
+ self.swRecordLayoutVFixValue = value
34
+ return self
35
+
36
+ def setSwRecordLayoutVIndex(self, index: ARLiteral):
37
+ self.swRecordLayoutVIndex = index
38
+ return self
39
+
40
+ def setSwRecordLayoutVProp(self, prop: ARLiteral):
41
+ self.swRecordLayoutVProp = prop
42
+ return self
43
+
44
+ class SwRecordLayoutGroupContent(ARObject):
45
+ def __init__(self):
46
+ super().__init__()
47
+
48
+ self.swRecordLayoutRef = None # type: RefType
49
+ self.swRecordLayoutGroup = None # type: SwRecordLayoutGroup
50
+ self.swRecordLayoutV = None # type: SwRecordLayoutV
51
+
52
+ class SwRecordLayoutGroup(ARObject):
53
+ def __init__(self):
54
+ super().__init__()
55
+
56
+ self.category = None # type: ARLiteral
57
+ self.desc = None # type: MultiLanguageOverviewParagraph
58
+ self.shortLabel = None # type: ARLiteral
59
+ self.swGenericAxisParamTypeRef = None # type: RefType
60
+ self.swRecordLayoutComponent = None # type: ARLiteral
61
+ self.swRecordLayoutGroupAxis = None # type: ARNumerical
62
+ self.swRecordLayoutGroupContentType = None # type: SwRecordLayoutGroupContent
63
+ self.swRecordLayoutGroupIndex = None # type: ARLiteral
64
+ self.swRecordLayoutGroupFrom = None # type: ARLiteral
65
+ self.swRecordLayoutGroupTo = None # type: ARLiteral
66
+
67
+
68
+ def setCategory(self, category: ARLiteral):
69
+ self.category = category
70
+ return self
71
+
72
+ def setDesc(self, desc):
73
+ self.desc = desc
74
+ return self
75
+
76
+ def setShortLabel(self, label: ARLiteral):
77
+ self.shortLabel = label
78
+ return self
79
+
80
+ def setSwGenericAxisParamTypeRef(self, ref: RefType):
81
+ self.swGenericAxisParamTypeRef = ref
82
+ return self
83
+
84
+ def setSwRecordLayoutComponent(self, component: ARLiteral):
85
+ self.swRecordLayoutComponent = component
86
+ return self
87
+
88
+ def setSwRecordLayoutGroupAxis(self, axis: ARNumerical):
89
+ self.swRecordLayoutGroupAxis = axis
90
+ return self
91
+
92
+ def setSwRecordLayoutGroupIndex(self, index: ARLiteral):
93
+ self.swRecordLayoutGroupIndex = index
94
+ return self
95
+
96
+ def setSwRecordLayoutGroupFrom(self, from_value: ARLiteral):
97
+ self.swRecordLayoutGroupFrom = from_value
98
+ return self
99
+
100
+ def setSwRecordLayoutGroupTo(self, to_value: ARLiteral):
101
+ self.swRecordLayoutGroupTo = to_value
102
+ return self
103
+
104
+ def setSwRecordLayoutGroupContentType(self, content_type: SwRecordLayoutGroupContent):
105
+ self.swRecordLayoutGroupContentType = content_type
106
+ return self
107
+
108
+
109
+ class SwRecordLayout(ARElement):
110
+ def __init__(self, parent: ARObject, short_name: str):
111
+ super().__init__(parent, short_name)
112
+
113
+ self.swRecordLayoutGroup = None # type: SwRecordLayoutGroup
114
+
115
+ def setSwRecordLayoutGroup(self, group: SwRecordLayoutGroup):
116
+ self.swRecordLayoutGroup = group
117
+ return self
118
+
@@ -0,0 +1,20 @@
1
+
2
+ from abc import ABCMeta
3
+ from .ar_object import ARObject
4
+ from .general_structure import Identifiable
5
+
6
+
7
+ class IdentCaption(Identifiable):
8
+
9
+ __metaclass__ = ABCMeta
10
+
11
+ def __init__(self, parent: ARObject, short_name: str):
12
+ if type(self) == IdentCaption:
13
+ raise NotImplementedError("IdentCaption is an abstract class.")
14
+
15
+ super().__init__(parent, short_name)
16
+
17
+
18
+ class ModeAccessPointIdent(IdentCaption):
19
+ def __init__(self, parent: ARObject, short_name: str):
20
+ super().__init__(parent, short_name)
@@ -0,0 +1,11 @@
1
+
2
+ from .ar_ref import RefType
3
+ from .ar_object import ARObject
4
+
5
+
6
+ class RoleBasedPortAssignment(ARObject):
7
+ def __init__(self):
8
+ super().__init__()
9
+
10
+ self.port_prototype_ref = None # type: RefType
11
+ self.role = None # type: str
@@ -0,0 +1,48 @@
1
+
2
+ from abc import ABCMeta
3
+ from .general_structure import Identifiable
4
+ from .ar_ref import AutosarVariableRef, AutosarParameterRef, RefType
5
+ from .ar_object import ARBoolean, ARLiteral, ARObject
6
+
7
+
8
+ class RoleBasedDataAssignment(ARObject):
9
+ def __init__(self):
10
+ super().__init__()
11
+
12
+ self.role = None # type: ARLiteral
13
+ self.used_data_element = None # type: AutosarVariableRef
14
+ self.used_parameter_element = None # type: AutosarParameterRef
15
+ self.used_pim_ref = None # type: RefType
16
+
17
+ class ServiceNeeds(Identifiable, metaclass = ABCMeta):
18
+ def __init__(self, parent: ARObject, short_name: str):
19
+ if type(self) == ServiceNeeds:
20
+ raise NotImplementedError("ServiceNeeds is an abstract class.")
21
+
22
+ super().__init__(parent, short_name)
23
+
24
+ class NvBlockNeeds(ServiceNeeds):
25
+ def __init__(self, parent: ARObject, short_name: str):
26
+ super().__init__(parent, short_name)
27
+
28
+ self.calc_ram_block_crc = None # type: ARBoolean
29
+ self.check_static_block_id = None # type: ARBoolean
30
+ self.n_data_sets = None # type: int
31
+ self.n_rom_blocks = None # type: int
32
+ self.ram_block_status_control = None # type: str
33
+ self.readonly = None # type: ARBoolean
34
+ self.reliability = None # type: str
35
+ self.resistant_to_changed_sw = None # type: ARBoolean
36
+ self.restore_at_start = None # type: ARBoolean
37
+ self.select_block_for_first_init_all = None # type: ARBoolean
38
+ self.store_at_shutdown = None # type: ARBoolean
39
+ self.store_cyclic = None # type: ARBoolean
40
+ self.store_emergency = None # type: ARBoolean
41
+ self.store_immediate = None # type: ARBoolean
42
+ self.store_on_change = None # type: ARBoolean
43
+ self.use_auto_validation_at_shut_down = None # type: ARBoolean
44
+ self.use_crc_comp_mechanism = None # type: ARBoolean
45
+ self.write_only_once = None # type: ARBoolean
46
+ self.write_verification = None # type: ARBoolean
47
+ self.writing_frequency = None # type: ARBoolean
48
+ self.writing_priority = None # type: ARBoolean