armodel 1.7.8__py3-none-any.whl → 1.7.9__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 (40) hide show
  1. armodel/models/M2/AUTOSARTemplates/AutosarTopLevelStructure.py +21 -0
  2. armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswBehavior.py +102 -12
  3. armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswInterfaces.py +80 -9
  4. armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswOverview.py +17 -10
  5. armodel/models/M2/AUTOSARTemplates/CommonStructure/Implementation.py +10 -8
  6. armodel/models/M2/AUTOSARTemplates/CommonStructure/InternalBehavior.py +7 -5
  7. armodel/models/M2/AUTOSARTemplates/CommonStructure/ModeDeclaration.py +38 -3
  8. armodel/models/M2/AUTOSARTemplates/CommonStructure/ServiceNeeds.py +91 -18
  9. armodel/models/M2/AUTOSARTemplates/CommonStructure/StandardizationTemplate/BlueprintDedicated/PortPrototypeBlueprint.py +73 -0
  10. armodel/models/M2/AUTOSARTemplates/CommonStructure/StandardizationTemplate/BlueprintDedicated/__init__.py +0 -0
  11. armodel/models/M2/AUTOSARTemplates/CommonStructure/StandardizationTemplate/Keyword.py +45 -0
  12. armodel/models/M2/AUTOSARTemplates/CommonStructure/StandardizationTemplate/__init__.py +0 -0
  13. armodel/models/M2/AUTOSARTemplates/CommonStructure/TriggerDeclaration.py +27 -0
  14. armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ARPackage.py +33 -4
  15. armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ElementCollection.py +73 -0
  16. armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/PrimitiveTypes.py +35 -14
  17. armodel/models/M2/AUTOSARTemplates/GenericStructure/LifeCycles.py +151 -1
  18. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Components/__init__.py +4 -1
  19. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/PortInterface/__init__.py +55 -12
  20. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SoftwareComponentDocumentation.py +80 -0
  21. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/RTEEvents.py +11 -1
  22. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ServiceMapping.py +16 -2
  23. armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Ethernet/EthernetTopology.py +18 -6
  24. armodel/models/M2/MSR/DataDictionary/DataDefProperties.py +10 -1
  25. armodel/models/M2/MSR/Documentation/BlockElements/Figure.py +163 -0
  26. armodel/models/M2/MSR/Documentation/BlockElements/__init__.py +0 -0
  27. armodel/models/M2/MSR/Documentation/TextModel/BlockElements/ListElements.py +5 -3
  28. armodel/models/M2/MSR/Documentation/TextModel/BlockElements/PaginationAndView.py +22 -1
  29. armodel/models/M2/MSR/Documentation/TextModel/BlockElements/__init__.py +94 -9
  30. armodel/models/__init__.py +2 -0
  31. armodel/parser/abstract_arxml_parser.py +5 -2
  32. armodel/parser/arxml_parser.py +255 -38
  33. armodel/tests/test_armodel/parser/test_sw_components.py +266 -4
  34. armodel/writer/arxml_writer.py +310 -57
  35. {armodel-1.7.8.dist-info → armodel-1.7.9.dist-info}/METADATA +21 -1
  36. {armodel-1.7.8.dist-info → armodel-1.7.9.dist-info}/RECORD +40 -33
  37. {armodel-1.7.8.dist-info → armodel-1.7.9.dist-info}/LICENSE +0 -0
  38. {armodel-1.7.8.dist-info → armodel-1.7.9.dist-info}/WHEEL +0 -0
  39. {armodel-1.7.8.dist-info → armodel-1.7.9.dist-info}/entry_points.txt +0 -0
  40. {armodel-1.7.8.dist-info → armodel-1.7.9.dist-info}/top_level.txt +0 -0
@@ -3,9 +3,10 @@ import re
3
3
  from typing import List
4
4
  from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
5
5
 
6
- class ARType(metaclass = ABCMeta):
6
+
7
+ class ARType(metaclass=ABCMeta):
7
8
  def __init__(self) -> None:
8
- self.timestamp = None # type: str
9
+ self.timestamp = None # type: str
9
10
  self.uuid = None # type: str
10
11
  self._value = None
11
12
 
@@ -28,11 +29,12 @@ class ARType(metaclass = ABCMeta):
28
29
  def getText(self) -> str:
29
30
  return str(self)
30
31
 
32
+
31
33
  class ARNumerical(ARType):
32
34
  def __init__(self) -> None:
33
35
  super().__init__()
34
36
 
35
- self._text = None # type: str
37
+ self._text = None # type: str
36
38
 
37
39
  def _convertStringToNumberValue(self, value: str) -> int:
38
40
  try:
@@ -47,11 +49,11 @@ class ARNumerical(ARType):
47
49
  m = re.match(r'0b([\d]+)', value, re.I)
48
50
  if m:
49
51
  return int(m.group(1), 2)
50
- m = re.match(r"-?\d+\.\d+", value)
52
+ m = re.match(r"^[-+]?(\d+(\.\d*)?|\.\d+)([eE][-+]?\d+)?$", value)
51
53
  if m:
52
54
  return float(value)
53
55
  return int(value)
54
- except:
56
+ except: # noqa E722
55
57
  raise ValueError("Invalid Numerical Type <%s>" % value)
56
58
 
57
59
  @property
@@ -93,7 +95,6 @@ class ARFloat(ARNumerical):
93
95
  self._value = val * 1.0
94
96
  elif isinstance(val, str):
95
97
  self._text = val
96
- #self._value = float(val)
97
98
  self._value = self._convertStringToNumberValue(val)
98
99
  else:
99
100
  raise ValueError("Unsupported Type <%s>", type(val))
@@ -103,7 +104,8 @@ class ARFloat(ARNumerical):
103
104
  return self._text
104
105
  else:
105
106
  return str(self._value)
106
-
107
+
108
+
107
109
  class Float(ARFloat):
108
110
  '''
109
111
  An instance of Float is an element from the set of real numbers.
@@ -113,7 +115,8 @@ class Float(ARFloat):
113
115
  '''
114
116
  def __init__(self):
115
117
  super().__init__()
116
-
118
+
119
+
117
120
  class TimeValue(ARFloat):
118
121
  '''
119
122
  This primitive type is taken for expressing time values. The numerical value is supposed to be interpreted
@@ -150,6 +153,7 @@ class ARLiteral(ARType):
150
153
  def upper(self) -> str:
151
154
  return self.value.upper()
152
155
 
156
+
153
157
  class AREnum(ARLiteral):
154
158
  def __init__(self, enum_values: List[str]):
155
159
  super().__init__()
@@ -168,14 +172,17 @@ class AREnum(ARLiteral):
168
172
  return True
169
173
  return False
170
174
 
175
+
171
176
  class String(ARLiteral):
172
177
  def __init__(self):
173
178
  super().__init__()
174
179
 
180
+
175
181
  class ReferrableSubtypesEnum(ARLiteral):
176
182
  def __init__(self):
177
183
  super().__init__()
178
184
 
185
+
179
186
  class ARPositiveInteger(ARNumerical):
180
187
  def __init__(self) -> None:
181
188
  super().__init__()
@@ -243,6 +250,7 @@ class ARBoolean(ARType):
243
250
  else:
244
251
  return "false"
245
252
 
253
+
246
254
  class NameToken(ARLiteral):
247
255
  '''
248
256
  This is an identifier as used in xml, e.g. xml-names. Typical usages are, for example, the names of type
@@ -259,6 +267,7 @@ class NameToken(ARLiteral):
259
267
  def __init__(self):
260
268
  super().__init__()
261
269
 
270
+
262
271
  class PositiveInteger(ARPositiveInteger):
263
272
  r'''\n
264
273
  This is a positive integer which can be denoted in decimal, binary, octal and hexadecimal. The value is
@@ -273,6 +282,7 @@ class PositiveInteger(ARPositiveInteger):
273
282
  def __init__(self):
274
283
  super().__init__()
275
284
 
285
+
276
286
  class PositiveUnlimitedInteger(ARPositiveInteger):
277
287
  r'''
278
288
  This is a positive unlimited integer which can be denoted in decimal, binary, octal and hexadecimal.
@@ -281,7 +291,8 @@ class PositiveUnlimitedInteger(ARPositiveInteger):
281
291
  * xml.xsd.customType=POSITIVE-UNLIMITED-INTEGER
282
292
  * xml.xsd.pattern=0|[\+]?[1-9][0-9]*|0[xX][0-9a-fA-F]+|0[bB][0-1]+|0[0-7]+
283
293
  * xml.xsd.type=string
284
- '''
294
+ '''
295
+
285
296
 
286
297
  class Integer(ARNumerical):
287
298
  r'''
@@ -298,6 +309,7 @@ class Integer(ARNumerical):
298
309
  def __init__(self):
299
310
  super().__init__()
300
311
 
312
+
301
313
  class UnlimitedInteger(Integer):
302
314
  r'''
303
315
  An instance of UnlimitedInteger is an element in the set of integer numbers ( ..., -2, -1, 0, 1, 2, ...).
@@ -313,6 +325,7 @@ class UnlimitedInteger(Integer):
313
325
  def __init__(self):
314
326
  super().__init__()
315
327
 
328
+
316
329
  class Boolean(ARBoolean):
317
330
  '''
318
331
  A Boolean value denotes a logical condition that is either 'true' or 'false'. It can be one of "0", "1", "true",
@@ -326,6 +339,7 @@ class Boolean(ARBoolean):
326
339
  def __init__(self):
327
340
  super().__init__()
328
341
 
342
+
329
343
  class Identifier(ARLiteral):
330
344
  '''
331
345
  An Identifier is a string with a number of constraints on its appearance, satisfying the requirements typical
@@ -342,6 +356,7 @@ class Identifier(ARLiteral):
342
356
  def __init__(self):
343
357
  super().__init__()
344
358
 
359
+
345
360
  class CIdentifier(ARLiteral):
346
361
  '''
347
362
  This datatype represents a string, that follows the rules of C-identifiers.
@@ -371,6 +386,7 @@ class CIdentifier(ARLiteral):
371
386
  self.namePattern = value
372
387
  return self
373
388
 
389
+
374
390
  class RevisionLabelString(ARLiteral):
375
391
  '''
376
392
  This primitive represents an internal AUTOSAR revision label which identifies an engineering object. It
@@ -406,6 +422,7 @@ class Limit(ARObject):
406
422
  self.value = value
407
423
  return self
408
424
 
425
+
409
426
  class RefType(ARObject):
410
427
  def __init__(self):
411
428
  self.base = None # type: str
@@ -446,13 +463,14 @@ class TRefType(RefType):
446
463
  def __init__(self):
447
464
  super().__init__()
448
465
 
466
+
449
467
  class DiagRequirementIdString(ARLiteral):
450
468
  '''
451
469
  This string denotes an Identifier for a requirement.
452
470
 
453
471
  Tags:
454
472
  * xml.xsd.customType=DIAG-REQUIREMENT-ID-STRING
455
- * xml.xsd.pattern=[0-9a-zA-Z_\-]+
473
+ * xml.xsd.pattern=[0-9a-zA-Z_\-]+ # noqa W605
456
474
  * xml.xsd.type=string
457
475
  '''
458
476
  def __init__(self):
@@ -460,7 +478,7 @@ class DiagRequirementIdString(ARLiteral):
460
478
 
461
479
 
462
480
  class ArgumentDirectionEnum(AREnum):
463
- IN = "in"
481
+ IN = "in"
464
482
  INOUT = "inout"
465
483
  OUT = "out"
466
484
 
@@ -468,7 +486,7 @@ class ArgumentDirectionEnum(AREnum):
468
486
  super().__init__((
469
487
  ArgumentDirectionEnum.IN,
470
488
  ArgumentDirectionEnum.INOUT,
471
- ArgumentDirectionEnum.OUT
489
+ ArgumentDirectionEnum.OUT
472
490
  ))
473
491
 
474
492
 
@@ -478,12 +496,13 @@ class Ip4AddressString(ARLiteral):
478
496
 
479
497
  Tags
480
498
  * xml.xsd.customType=IP4-ADDRESS-STRING
481
- * xml.xsd.pattern=(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)|ANY
499
+ * xml.xsd.pattern=(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)|ANY # noqa E501
482
500
  * xml.xsd.type=string
483
501
  '''
484
502
  def __init__(self):
485
503
  super().__init__()
486
504
 
505
+
487
506
  class Ip6AddressString(ARLiteral):
488
507
  '''
489
508
  This is used to specify an IP6 address. Notation: FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF
@@ -498,6 +517,7 @@ class Ip6AddressString(ARLiteral):
498
517
  def __init__(self):
499
518
  super().__init__()
500
519
 
520
+
501
521
  class MacAddressString(ARLiteral):
502
522
  '''
503
523
  This primitive specifies a Mac Address. Notation: FF:FF:FF:FF:FF:FF
@@ -511,6 +531,7 @@ class MacAddressString(ARLiteral):
511
531
  def __init__(self):
512
532
  super().__init__()
513
533
 
534
+
514
535
  class CategoryString(ARLiteral):
515
536
  '''
516
537
  This represents the pattern applicable to categories.
@@ -523,4 +544,4 @@ class CategoryString(ARLiteral):
523
544
  * xml.xsd.type=string
524
545
  '''
525
546
  def __init__(self):
526
- super().__init__()
547
+ super().__init__()
@@ -1,5 +1,155 @@
1
+ from typing import List
2
+ from xmlrpc.client import DateTime
3
+
4
+ from ....M2.MSR.Documentation.TextModel.BlockElements import DocumentationBlock
5
+ from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
6
+ from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import RefType, RevisionLabelString
1
7
  from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import ARElement
2
8
 
9
+
10
+ class LifeCyclePeriod(ARObject):
11
+ '''
12
+ This meta class represents the ability to specify a point of time within a specified period, e.g. the starting
13
+ or end point, in which a specific life cycle state is valid/applies to.
14
+ '''
15
+ def __init__(self):
16
+ super().__init__()
17
+
18
+ self.arReleaseVersion = None # type: RevisionLabelString
19
+ self.date = None # type: DateTime
20
+ self.productRelease = None # type: RevisionLabelString
21
+
22
+ def getArReleaseVersion(self):
23
+ return self.arReleaseVersion
24
+
25
+ def setArReleaseVersion(self, value):
26
+ if value is not None:
27
+ self.arReleaseVersion = value
28
+ return self
29
+
30
+ def getDate(self):
31
+ return self.date
32
+
33
+ def setDate(self, value):
34
+ if value is not None:
35
+ self.date = value
36
+ return self
37
+
38
+ def getProductRelease(self):
39
+ return self.productRelease
40
+
41
+ def setProductRelease(self, value):
42
+ if value is not None:
43
+ self.productRelease = value
44
+ return self
45
+
46
+
47
+ class LifeCycleInfo(ARObject):
48
+ def __init__(self):
49
+ super().__init__()
50
+
51
+ self.lcObjectRef = None # type: RefType
52
+ self.lcStateRef = None # type: RefType
53
+ self.periodBegin = None # type: LifeCyclePeriod
54
+ self.periodEnd = None # type: LifeCyclePeriod
55
+ self.remark = None # type: DocumentationBlock
56
+ self.useInsteadRefs = [] # type: List[RefType]
57
+
58
+ def getLcObjectRef(self):
59
+ return self.lcObjectRef
60
+
61
+ def setLcObjectRef(self, value):
62
+ if value is not None:
63
+ self.lcObjectRef = value
64
+ return self
65
+
66
+ def getLcStateRef(self):
67
+ return self.lcStateRef
68
+
69
+ def setLcStateRef(self, value):
70
+ if value is not None:
71
+ self.lcStateRef = value
72
+ return self
73
+
74
+ def getPeriodBegin(self):
75
+ return self.periodBegin
76
+
77
+ def setPeriodBegin(self, value):
78
+ if value is not None:
79
+ self.periodBegin = value
80
+ return self
81
+
82
+ def getPeriodEnd(self):
83
+ return self.periodEnd
84
+
85
+ def setPeriodEnd(self, value):
86
+ if value is not None:
87
+ self.periodEnd = value
88
+ return self
89
+
90
+ def getRemark(self):
91
+ return self.remark
92
+
93
+ def setRemark(self, value):
94
+ if value is not None:
95
+ self.remark = value
96
+ return self
97
+
98
+ def getUseInsteadRefs(self):
99
+ return self.useInsteadRefs
100
+
101
+ def addUseInsteadRef(self, value):
102
+ if value is not None:
103
+ self.useInsteadRefs.append(value)
104
+ return self
105
+
106
+
3
107
  class LifeCycleInfoSet(ARElement):
4
108
  def __init__(self, parent, short_name):
5
- super().__init__(parent, short_name)
109
+ super().__init__(parent, short_name)
110
+
111
+ self.defaultLcStateRef = None # type: RefType
112
+ self.defaultPeriodBegin = None # type: LifeCyclePeriod
113
+ self.defaultPeriodEnd = None # type: LifeCyclePeriod
114
+ self.lifeCycleInfos = [] # type: List[LifeCycleInfo]
115
+ self.usedLifeCycleStateDefinitionGroupRef = None # type: RefType
116
+
117
+ def getDefaultLcStateRef(self):
118
+ return self.defaultLcStateRef
119
+
120
+ def setDefaultLcStateRef(self, value):
121
+ if value is not None:
122
+ self.defaultLcStateRef = value
123
+ return self
124
+
125
+ def getDefaultPeriodBegin(self):
126
+ return self.defaultPeriodBegin
127
+
128
+ def setDefaultPeriodBegin(self, value):
129
+ if value is not None:
130
+ self.defaultPeriodBegin = value
131
+ return self
132
+
133
+ def getDefaultPeriodEnd(self):
134
+ return self.defaultPeriodEnd
135
+
136
+ def setDefaultPeriodEnd(self, value):
137
+ if value is not None:
138
+ self.defaultPeriodEnd = value
139
+ return self
140
+
141
+ def getLifeCycleInfos(self):
142
+ return self.lifeCycleInfos
143
+
144
+ def addLifeCycleInfo(self, value):
145
+ if value is not None:
146
+ self.lifeCycleInfos.append(value)
147
+ return self
148
+
149
+ def getUsedLifeCycleStateDefinitionGroupRef(self):
150
+ return self.usedLifeCycleStateDefinitionGroupRef
151
+
152
+ def setUsedLifeCycleStateDefinitionGroupRef(self, value):
153
+ if value is not None:
154
+ self.usedLifeCycleStateDefinitionGroupRef = value
155
+ return self
@@ -442,8 +442,11 @@ class CompositionSwComponentType(SwComponentType):
442
442
  def getDelegationSwConnectors(self) -> List[DelegationSwConnector]:
443
443
  return list(sorted(filter(lambda e: isinstance(e, DelegationSwConnector), self.elements.values()), key=lambda c: c.short_name))
444
444
 
445
+ # def getSwConnectors(self) -> List[SwConnector]:
446
+ # return list(sorted(filter(lambda e: isinstance(e, SwConnector), self.elements.values()), key=lambda c: c.short_name))
447
+
445
448
  def getSwConnectors(self) -> List[SwConnector]:
446
- return list(sorted(filter(lambda e: isinstance(e, SwConnector), self.elements.values()), key=lambda c: c.short_name))
449
+ return list(filter(lambda e: isinstance(e, SwConnector), self.elements.values()))
447
450
 
448
451
  def createSwComponentPrototype(self, short_name: str) -> SwComponentPrototype:
449
452
  if (not self.IsElementExists(short_name)):
@@ -9,7 +9,7 @@ from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveT
9
9
  from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import PositiveInteger
10
10
  from .....M2.AUTOSARTemplates.SWComponentTemplate.Datatype.DataPrototypes import ParameterDataPrototype, VariableDataPrototype, AutosarDataPrototype
11
11
  from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARBoolean
12
- from .....M2.AUTOSARTemplates.CommonStructure.ModeDeclaration import ModeDeclarationGroupPrototype
12
+ from .....M2.AUTOSARTemplates.CommonStructure.ModeDeclaration import ModeDeclarationGroupPrototype, ModeDeclarationGroupPrototypeMapping
13
13
  from .....M2.AUTOSARTemplates.GenericStructure.AbstractStructure import AtpType
14
14
  from .....M2.AUTOSARTemplates.GenericStructure.AbstractStructure import AtpFeature
15
15
  from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import RefType
@@ -452,23 +452,23 @@ class ClientServerInterfaceMapping(PortInterfaceMapping):
452
452
  def __init__(self, parent: ARObject, short_name: str):
453
453
  super().__init__(parent, short_name)
454
454
 
455
- # type: ClientServerApplicationErrorMapping
456
- self.errorMappings = []
457
- # type: ClientServerOperationMapping
458
- self.operationMappings = []
455
+ self.errorMappings = [] # type: List[ClientServerApplicationErrorMapping]
456
+ self.operationMappings = [] # type: List[ClientServerOperationMapping]
459
457
 
460
458
  def getErrorMappings(self):
461
459
  return self.errorMappings
462
460
 
463
- def setErrorMappings(self, value):
464
- self.errorMappings = value
461
+ def addErrorMapping(self, value):
462
+ if value is not None:
463
+ self.errorMappings.append(value)
465
464
  return self
466
465
 
467
466
  def getOperationMappings(self):
468
467
  return self.operationMappings
469
468
 
470
- def setOperationMappings(self, value):
471
- self.operationMappings = value
469
+ def addOperationMapping(self, value):
470
+ if value is not None:
471
+ self.operationMappings.append(value)
472
472
  return self
473
473
 
474
474
 
@@ -485,7 +485,29 @@ class VariableAndParameterInterfaceMapping(PortInterfaceMapping):
485
485
  self.dataMappings.append(value)
486
486
  return self
487
487
 
488
-
488
+
489
+ class ModeInterfaceMapping(PortInterfaceMapping):
490
+ def __init__(self, parent: ARObject, short_name: str):
491
+ super().__init__(parent, short_name)
492
+
493
+ self.modeMapping = None # type: ModeDeclarationGroupPrototypeMapping
494
+
495
+ def getModeMapping(self):
496
+ return self.modeMapping
497
+
498
+ def setModeMapping(self, value):
499
+ if value is not None:
500
+ self.modeMapping = value
501
+ return self
502
+
503
+
504
+ class TriggerInterfaceMapping(PortInterfaceMapping):
505
+ def __init__(self, parent: ARObject, short_name: str):
506
+ super().__init__(parent, short_name)
507
+
508
+ self.triggerMapping = [] # type: List[TriggerMapping]
509
+
510
+
489
511
  class PortInterfaceMappingSet(ARElement):
490
512
  def __init__(self, parent: ARObject, short_name: str):
491
513
  super().__init__(parent, short_name)
@@ -495,12 +517,33 @@ class PortInterfaceMappingSet(ARElement):
495
517
  def getPortInterfaceMappings(self):
496
518
  return self.portInterfaceMappings
497
519
 
498
- def createVariableAndParameterInterfaceMapping(self, short_name):
499
- if (short_name not in self.elements):
520
+ def createVariableAndParameterInterfaceMapping(self, short_name: str):
521
+ if (not self.IsElementExists(short_name)):
500
522
  mapping = VariableAndParameterInterfaceMapping(self, short_name)
501
523
  self.addElement(mapping)
502
524
  self.portInterfaceMappings.append(mapping)
503
525
  return self.getElement(short_name)
526
+
527
+ def createClientServerInterfaceMapping(self, short_name: str):
528
+ if (not self.IsElementExists(short_name)):
529
+ mapping = ClientServerInterfaceMapping(self, short_name)
530
+ self.addElement(mapping)
531
+ self.portInterfaceMappings.append(mapping)
532
+ return self.getElement(short_name)
533
+
534
+ def createModeInterfaceMapping(self, short_name: str):
535
+ if (not self.IsElementExists(short_name)):
536
+ mapping = ModeInterfaceMapping(self, short_name)
537
+ self.addElement(mapping)
538
+ self.portInterfaceMappings.append(mapping)
539
+ return self.getElement(short_name)
540
+
541
+ def createTriggerInterfaceMapping(self, short_name: str):
542
+ if (not self.IsElementExists(short_name)):
543
+ mapping = TriggerInterfaceMapping(self, short_name)
544
+ self.addElement(mapping)
545
+ self.portInterfaceMappings.append(mapping)
546
+ return self.getElement(short_name)
504
547
 
505
548
 
506
549
  class TextTableMapping(ARObject):
@@ -0,0 +1,80 @@
1
+ from typing import List
2
+ from .....models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
3
+
4
+
5
+ class SwComponentDocumentation(ARObject):
6
+ def __init__(self):
7
+ super().__init__()
8
+
9
+ self.chapters = [] # type: List[Chapter]
10
+ self.swCalibrationNotes = None # type: Chapter
11
+ self.swCarbDoc = None # type: Chapter
12
+ self.swDiagnosticsNotes = None # type: Chapter
13
+ self.swFeatureDef = None # type: Chapter
14
+ self.swFeatureDesc = None # type: Chapter
15
+ self.swMaintenanceNotes = None # type: Chapter
16
+ self.swTestDesc = None # type: sChapter
17
+
18
+ def getChapters(self):
19
+ return self.chapters
20
+
21
+ def addChapter(self, value):
22
+ if value is not None:
23
+ self.chapters.append(value)
24
+ return self
25
+
26
+ def getSwCalibrationNotes(self):
27
+ return self.swCalibrationNotes
28
+
29
+ def setSwCalibrationNotes(self, value):
30
+ if value is not None:
31
+ self.swCalibrationNotes = value
32
+ return self
33
+
34
+ def getSwCarbDoc(self):
35
+ return self.swCarbDoc
36
+
37
+ def setSwCarbDoc(self, value):
38
+ if value is not None:
39
+ self.swCarbDoc = value
40
+ return self
41
+
42
+ def getSwDiagnosticsNotes(self):
43
+ return self.swDiagnosticsNotes
44
+
45
+ def setSwDiagnosticsNotes(self, value):
46
+ if value is not None:
47
+ self.swDiagnosticsNotes = value
48
+ return self
49
+
50
+ def getSwFeatureDef(self):
51
+ return self.swFeatureDef
52
+
53
+ def setSwFeatureDef(self, value):
54
+ if value is not None:
55
+ self.swFeatureDef = value
56
+ return self
57
+
58
+ def getSwFeatureDesc(self):
59
+ return self.swFeatureDesc
60
+
61
+ def setSwFeatureDesc(self, value):
62
+ if value is not None:
63
+ self.swFeatureDesc = value
64
+ return self
65
+
66
+ def getSwMaintenanceNotes(self):
67
+ return self.swMaintenanceNotes
68
+
69
+ def setSwMaintenanceNotes(self, value):
70
+ if value is not None:
71
+ self.swMaintenanceNotes = value
72
+ return self
73
+
74
+ def getSwTestDesc(self):
75
+ return self.swTestDesc
76
+
77
+ def setSwTestDesc(self, value):
78
+ if value is not None:
79
+ self.swTestDesc = value
80
+ return self
@@ -5,6 +5,7 @@ from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject i
5
5
  from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import RefType, TimeValue
6
6
  from typing import List
7
7
 
8
+
8
9
  class RTEEvent(AbstractEvent):
9
10
  def __init__(self, parent: ARObject, short_name: str):
10
11
  super().__init__(parent, short_name)
@@ -26,6 +27,7 @@ class RTEEvent(AbstractEvent):
26
27
  self.startOnEventRef = value
27
28
  return self
28
29
 
30
+
29
31
  class AsynchronousServerCallReturnsEvent(RTEEvent):
30
32
  def __init__(self, parent: ARObject, short_name: str):
31
33
  super().__init__(parent, short_name)
@@ -53,6 +55,7 @@ class DataSendCompletedEvent(RTEEvent):
53
55
  self.eventSourceRef = value
54
56
  return self
55
57
 
58
+
56
59
  class DataWriteCompletedEvent(RTEEvent):
57
60
  def __init__(self, parent: ARObject, short_name: str):
58
61
  super().__init__(parent, short_name)
@@ -66,6 +69,7 @@ class DataWriteCompletedEvent(RTEEvent):
66
69
  self.eventSourceRef = value
67
70
  return self
68
71
 
72
+
69
73
  class DataReceivedEvent(RTEEvent):
70
74
  def __init__(self, parent: ARObject, short_name: str):
71
75
  super().__init__(parent, short_name)
@@ -101,11 +105,12 @@ class SwcModeSwitchEvent(RTEEvent):
101
105
  self.modeIRefs.append(value)
102
106
  return self
103
107
 
108
+
104
109
  class DataReceiveErrorEvent(RTEEvent):
105
110
  def __init__(self, parent: ARObject, short_name: str):
106
111
  super().__init__(parent, short_name)
107
112
 
108
- self.dataIRef = None
113
+ self.dataIRef = None
109
114
 
110
115
  def getDataIRef(self):
111
116
  return self.dataIRef
@@ -114,6 +119,7 @@ class DataReceiveErrorEvent(RTEEvent):
114
119
  self.dataIRef = value
115
120
  return self
116
121
 
122
+
117
123
  class OperationInvokedEvent(RTEEvent):
118
124
  def __init__(self, parent: ARObject, short_name: str):
119
125
  super().__init__(parent, short_name)
@@ -128,6 +134,7 @@ class OperationInvokedEvent(RTEEvent):
128
134
  self.operationIRef = value
129
135
  return self
130
136
 
137
+
131
138
  class InitEvent(RTEEvent):
132
139
  def __init__(self, parent: ARObject, short_name: str):
133
140
  super().__init__(parent, short_name)
@@ -163,6 +170,7 @@ class TimingEvent(RTEEvent):
163
170
  self.period = value
164
171
  return self
165
172
 
173
+
166
174
  class InternalTriggerOccurredEvent(RTEEvent):
167
175
  def __init__(self, parent: ARObject, short_name: str):
168
176
  super().__init__(parent, short_name)
@@ -177,10 +185,12 @@ class InternalTriggerOccurredEvent(RTEEvent):
177
185
  self.eventSourceRef = value
178
186
  return self
179
187
 
188
+
180
189
  class BackgroundEvent(RTEEvent):
181
190
  def __init__(self, parent: ARObject, short_name: str):
182
191
  super().__init__(parent, short_name)
183
192
 
193
+
184
194
  class ModeSwitchedAckEvent(RTEEvent):
185
195
  def __init__(self, parent: ARObject, short_name: str):
186
196
  super().__init__(parent, short_name)