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.
- armodel/models/M2/AUTOSARTemplates/AutosarTopLevelStructure.py +21 -0
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswBehavior.py +102 -12
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswInterfaces.py +80 -9
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswOverview.py +17 -10
- armodel/models/M2/AUTOSARTemplates/CommonStructure/Implementation.py +10 -8
- armodel/models/M2/AUTOSARTemplates/CommonStructure/InternalBehavior.py +7 -5
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ModeDeclaration.py +38 -3
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ServiceNeeds.py +91 -18
- armodel/models/M2/AUTOSARTemplates/CommonStructure/StandardizationTemplate/BlueprintDedicated/PortPrototypeBlueprint.py +73 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/StandardizationTemplate/BlueprintDedicated/__init__.py +0 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/StandardizationTemplate/Keyword.py +45 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/StandardizationTemplate/__init__.py +0 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/TriggerDeclaration.py +27 -0
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ARPackage.py +33 -4
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ElementCollection.py +73 -0
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/PrimitiveTypes.py +35 -14
- armodel/models/M2/AUTOSARTemplates/GenericStructure/LifeCycles.py +151 -1
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Components/__init__.py +4 -1
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/PortInterface/__init__.py +55 -12
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SoftwareComponentDocumentation.py +80 -0
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/RTEEvents.py +11 -1
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ServiceMapping.py +16 -2
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Ethernet/EthernetTopology.py +18 -6
- armodel/models/M2/MSR/DataDictionary/DataDefProperties.py +10 -1
- armodel/models/M2/MSR/Documentation/BlockElements/Figure.py +163 -0
- armodel/models/M2/MSR/Documentation/BlockElements/__init__.py +0 -0
- armodel/models/M2/MSR/Documentation/TextModel/BlockElements/ListElements.py +5 -3
- armodel/models/M2/MSR/Documentation/TextModel/BlockElements/PaginationAndView.py +22 -1
- armodel/models/M2/MSR/Documentation/TextModel/BlockElements/__init__.py +94 -9
- armodel/models/__init__.py +2 -0
- armodel/parser/abstract_arxml_parser.py +5 -2
- armodel/parser/arxml_parser.py +255 -38
- armodel/tests/test_armodel/parser/test_sw_components.py +266 -4
- armodel/writer/arxml_writer.py +310 -57
- {armodel-1.7.8.dist-info → armodel-1.7.9.dist-info}/METADATA +21 -1
- {armodel-1.7.8.dist-info → armodel-1.7.9.dist-info}/RECORD +40 -33
- {armodel-1.7.8.dist-info → armodel-1.7.9.dist-info}/LICENSE +0 -0
- {armodel-1.7.8.dist-info → armodel-1.7.9.dist-info}/WHEEL +0 -0
- {armodel-1.7.8.dist-info → armodel-1.7.9.dist-info}/entry_points.txt +0 -0
- {armodel-1.7.8.dist-info → armodel-1.7.9.dist-info}/top_level.txt +0 -0
|
@@ -4,7 +4,10 @@ from ....M2.AUTOSARTemplates.SWComponentTemplate.SwcInternalBehavior.InstanceRef
|
|
|
4
4
|
from ....M2.AUTOSARTemplates.SWComponentTemplate.SwcInternalBehavior.AutosarVariableRef import AutosarVariableRef
|
|
5
5
|
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
6
6
|
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Identifiable
|
|
7
|
-
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import Identifier, RefType, AREnum, Boolean, ARLiteral
|
|
7
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import Identifier, RefType, AREnum, Boolean, ARLiteral
|
|
8
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import DiagRequirementIdString, Integer, PositiveInteger
|
|
9
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import String, TimeValue
|
|
10
|
+
|
|
8
11
|
|
|
9
12
|
class RoleBasedDataAssignment(ARObject):
|
|
10
13
|
def __init__(self):
|
|
@@ -44,14 +47,14 @@ class RoleBasedDataAssignment(ARObject):
|
|
|
44
47
|
return self
|
|
45
48
|
|
|
46
49
|
|
|
47
|
-
|
|
48
|
-
class ServiceNeeds(Identifiable, metaclass = ABCMeta):
|
|
50
|
+
class ServiceNeeds(Identifiable, metaclass=ABCMeta):
|
|
49
51
|
def __init__(self, parent: ARObject, short_name: str):
|
|
50
|
-
if type(self)
|
|
52
|
+
if type(self) is ServiceNeeds:
|
|
51
53
|
raise NotImplementedError("ServiceNeeds is an abstract class.")
|
|
52
54
|
|
|
53
55
|
super().__init__(parent, short_name)
|
|
54
56
|
|
|
57
|
+
|
|
55
58
|
class RamBlockStatusControlEnum(AREnum):
|
|
56
59
|
API = "api"
|
|
57
60
|
NV_RAM_MANAGER = "nvRamManager"
|
|
@@ -62,6 +65,7 @@ class RamBlockStatusControlEnum(AREnum):
|
|
|
62
65
|
RamBlockStatusControlEnum.NV_RAM_MANAGER,
|
|
63
66
|
))
|
|
64
67
|
|
|
68
|
+
|
|
65
69
|
class NvBlockNeedsReliabilityEnum(AREnum):
|
|
66
70
|
ERROR_CORRECTION = "errorCorrection"
|
|
67
71
|
ERROR_DETECTION = "errorDetection"
|
|
@@ -87,6 +91,7 @@ class NvBlockNeedsWritingPriorityEnum(AREnum):
|
|
|
87
91
|
NvBlockNeedsWritingPriorityEnum.MEDIUM,
|
|
88
92
|
))
|
|
89
93
|
|
|
94
|
+
|
|
90
95
|
class NvBlockNeeds(ServiceNeeds):
|
|
91
96
|
def __init__(self, parent: ARObject, short_name: str):
|
|
92
97
|
super().__init__(parent, short_name)
|
|
@@ -96,11 +101,9 @@ class NvBlockNeeds(ServiceNeeds):
|
|
|
96
101
|
self.cyclicWritingPeriod = None # type: TimeValue
|
|
97
102
|
self.nDataSets = None # type: PositiveInteger
|
|
98
103
|
self.nRomBlocks = None # type: PositiveInteger
|
|
99
|
-
# type: RamBlockStatusControlEnum
|
|
100
|
-
self.ramBlockStatusControl = None
|
|
104
|
+
self.ramBlockStatusControl = None # type: RamBlockStatusControlEnum
|
|
101
105
|
self.readonly = None # type: Boolean
|
|
102
|
-
# type: NvBlockNeedsReliabilityEnum
|
|
103
|
-
self.reliability = None
|
|
106
|
+
self.reliability = None # type: NvBlockNeedsReliabilityEnum
|
|
104
107
|
self.resistantToChangedSw = None # type: Boolean
|
|
105
108
|
self.restoreAtStart = None # type: Boolean
|
|
106
109
|
self.selectBlockForFirstInitAll = None # type: Boolean
|
|
@@ -114,8 +117,7 @@ class NvBlockNeeds(ServiceNeeds):
|
|
|
114
117
|
self.writeOnlyOnce = None # type: Boolean
|
|
115
118
|
self.writeVerification = None # type: Boolean
|
|
116
119
|
self.writingFrequency = None # type: PositiveInteger
|
|
117
|
-
# type: NvBlockNeedsWritingPriorityEnum
|
|
118
|
-
self.writingPriority = None
|
|
120
|
+
self.writingPriority = None # type: NvBlockNeedsWritingPriorityEnum
|
|
119
121
|
|
|
120
122
|
def getCalcRamBlockCrc(self):
|
|
121
123
|
return self.calcRamBlockCrc
|
|
@@ -293,6 +295,12 @@ class RoleBasedDataTypeAssignment(ARObject):
|
|
|
293
295
|
self.usedImplementationDataTypeRef = value
|
|
294
296
|
return self
|
|
295
297
|
|
|
298
|
+
|
|
299
|
+
class ServiceDiagnosticRelevanceEnum(AREnum):
|
|
300
|
+
def __init__(self):
|
|
301
|
+
super().__init__([])
|
|
302
|
+
|
|
303
|
+
|
|
296
304
|
class ServiceDependency(Identifiable):
|
|
297
305
|
def __init__(self, parent: ARObject, short_name: str):
|
|
298
306
|
super().__init__(parent, short_name)
|
|
@@ -322,6 +330,7 @@ class ServiceDependency(Identifiable):
|
|
|
322
330
|
self.symbolicNameProps = value
|
|
323
331
|
return self
|
|
324
332
|
|
|
333
|
+
|
|
325
334
|
class DiagnosticAudienceEnum(AREnum):
|
|
326
335
|
AFTER_MARKET = "aftermarket"
|
|
327
336
|
AFTER_SALES = "afterSales"
|
|
@@ -338,6 +347,7 @@ class DiagnosticAudienceEnum(AREnum):
|
|
|
338
347
|
DiagnosticAudienceEnum.SUPPLIER,
|
|
339
348
|
))
|
|
340
349
|
|
|
350
|
+
|
|
341
351
|
class DiagnosticServiceRequestCallbackTypeEnum(AREnum):
|
|
342
352
|
REQUEST_CALLBACK_TYPE_MANUFACTURER = "requestCallbackTypeManufacturer"
|
|
343
353
|
REQUEST_CALLBACK_TYPE_SUPPLIER = "requestCallbackTypeSupplier"
|
|
@@ -348,9 +358,10 @@ class DiagnosticServiceRequestCallbackTypeEnum(AREnum):
|
|
|
348
358
|
DiagnosticServiceRequestCallbackTypeEnum.REQUEST_CALLBACK_TYPE_SUPPLIER,
|
|
349
359
|
))
|
|
350
360
|
|
|
351
|
-
|
|
361
|
+
|
|
362
|
+
class DiagnosticCapabilityElement(ServiceNeeds, metaclass=ABCMeta):
|
|
352
363
|
def __init__(self, parent: ARObject, short_name: str):
|
|
353
|
-
if type(self)
|
|
364
|
+
if type(self) is DiagnosticCapabilityElement:
|
|
354
365
|
raise NotImplementedError("DiagnosticCapabilityElement is an abstract class.")
|
|
355
366
|
|
|
356
367
|
super().__init__(parent, short_name)
|
|
@@ -380,6 +391,7 @@ class DiagnosticCapabilityElement(ServiceNeeds, metaclass = ABCMeta):
|
|
|
380
391
|
self.securityAccessLevel = value
|
|
381
392
|
return self
|
|
382
393
|
|
|
394
|
+
|
|
383
395
|
class DiagnosticRoutineTypeEnum(AREnum):
|
|
384
396
|
ASYNCHRONOUS = "asynchronous"
|
|
385
397
|
SYNCHRONOUS = "synchronous"
|
|
@@ -390,6 +402,7 @@ class DiagnosticRoutineTypeEnum(AREnum):
|
|
|
390
402
|
DiagnosticRoutineTypeEnum.SYNCHRONOUS,
|
|
391
403
|
))
|
|
392
404
|
|
|
405
|
+
|
|
393
406
|
class DiagnosticCommunicationManagerNeeds(DiagnosticCapabilityElement):
|
|
394
407
|
def __init__(self, parent: ARObject, short_name: str):
|
|
395
408
|
super().__init__(parent, short_name)
|
|
@@ -403,6 +416,7 @@ class DiagnosticCommunicationManagerNeeds(DiagnosticCapabilityElement):
|
|
|
403
416
|
self.serviceRequestCallbackType = value
|
|
404
417
|
return self
|
|
405
418
|
|
|
419
|
+
|
|
406
420
|
class DiagnosticRoutineNeeds(DiagnosticCapabilityElement):
|
|
407
421
|
def __init__(self, parent: ARObject, short_name: str):
|
|
408
422
|
super().__init__(parent, short_name)
|
|
@@ -437,6 +451,7 @@ class DiagnosticValueAccessEnum(AREnum):
|
|
|
437
451
|
DiagnosticValueAccessEnum.WRITE_ONLY,
|
|
438
452
|
))
|
|
439
453
|
|
|
454
|
+
|
|
440
455
|
class DiagnosticProcessingStyleEnum(AREnum):
|
|
441
456
|
PROCESSING_STYLE_ASYNCHRONOUS = "processingStyleAsynchronous"
|
|
442
457
|
PROCESSING_STYLE_ASYNCHRONOUS_WITH_ERROR = "processingStyleAsynchronousWithError"
|
|
@@ -447,7 +462,8 @@ class DiagnosticProcessingStyleEnum(AREnum):
|
|
|
447
462
|
DiagnosticProcessingStyleEnum.PROCESSING_STYLE_ASYNCHRONOUS,
|
|
448
463
|
DiagnosticProcessingStyleEnum.PROCESSING_STYLE_ASYNCHRONOUS_WITH_ERROR,
|
|
449
464
|
DiagnosticProcessingStyleEnum.PROCESSING_STYLE_SYNCHRONOUS,
|
|
450
|
-
))
|
|
465
|
+
))
|
|
466
|
+
|
|
451
467
|
|
|
452
468
|
class DiagnosticValueNeeds(DiagnosticCapabilityElement):
|
|
453
469
|
def __init__(self, parent: ARObject, short_name: str):
|
|
@@ -493,14 +509,16 @@ class DiagnosticValueNeeds(DiagnosticCapabilityElement):
|
|
|
493
509
|
def setProcessingStyle(self, value):
|
|
494
510
|
self.processingStyle = value
|
|
495
511
|
return self
|
|
496
|
-
|
|
497
|
-
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
class DiagEventDebounceAlgorithm(Identifiable, metaclass=ABCMeta):
|
|
498
515
|
def __init__(self, parent: ARObject, short_name: str):
|
|
499
|
-
if type(self)
|
|
516
|
+
if type(self) is DiagEventDebounceAlgorithm:
|
|
500
517
|
raise NotImplementedError("DiagEventDebounceAlgorithm is an abstract class.")
|
|
501
518
|
|
|
502
519
|
super().__init__(parent, short_name)
|
|
503
520
|
|
|
521
|
+
|
|
504
522
|
class DiagEventDebounceCounterBased(DiagEventDebounceAlgorithm):
|
|
505
523
|
def __init__(self, parent: ARObject, short_name: str):
|
|
506
524
|
super().__init__(parent, short_name)
|
|
@@ -583,6 +601,7 @@ class DiagEventDebounceMonitorInternal(DiagEventDebounceAlgorithm):
|
|
|
583
601
|
def __init__(self, parent: ARObject, short_name: str):
|
|
584
602
|
super().__init__(parent, short_name)
|
|
585
603
|
|
|
604
|
+
|
|
586
605
|
class DiagEventDebounceTimeBased(DiagEventDebounceAlgorithm):
|
|
587
606
|
def __init__(self, parent: ARObject, short_name: str):
|
|
588
607
|
super().__init__(parent, short_name)
|
|
@@ -612,27 +631,79 @@ class DiagEventDebounceTimeBased(DiagEventDebounceAlgorithm):
|
|
|
612
631
|
self.timePassedThreshold = value
|
|
613
632
|
return self
|
|
614
633
|
|
|
634
|
+
|
|
635
|
+
class DtcKindEnum(AREnum):
|
|
636
|
+
def __init__(self):
|
|
637
|
+
super().__init__([])
|
|
638
|
+
|
|
639
|
+
|
|
615
640
|
class DiagnosticEventInfoNeeds(DiagnosticCapabilityElement):
|
|
616
641
|
def __init__(self, parent: ARObject, short_name: str):
|
|
617
642
|
super().__init__(parent, short_name)
|
|
618
643
|
|
|
644
|
+
self.dtcKind = None # type: DtcKindEnum
|
|
619
645
|
self.obdDtcNumber = None # type: PositiveInteger
|
|
620
646
|
self.udsDtcNumber = None # type: PositiveInteger
|
|
621
647
|
|
|
648
|
+
def getDtcKind(self):
|
|
649
|
+
return self.dtcKind
|
|
650
|
+
|
|
651
|
+
def setDtcKind(self, value):
|
|
652
|
+
if value is not None:
|
|
653
|
+
self.dtcKind = value
|
|
654
|
+
return self
|
|
655
|
+
|
|
622
656
|
def getObdDtcNumber(self):
|
|
623
657
|
return self.obdDtcNumber
|
|
624
658
|
|
|
625
659
|
def setObdDtcNumber(self, value):
|
|
626
|
-
|
|
660
|
+
if value is not None:
|
|
661
|
+
self.obdDtcNumber = value
|
|
627
662
|
return self
|
|
628
663
|
|
|
629
664
|
def getUdsDtcNumber(self):
|
|
630
665
|
return self.udsDtcNumber
|
|
631
666
|
|
|
632
667
|
def setUdsDtcNumber(self, value):
|
|
633
|
-
|
|
668
|
+
if value is not None:
|
|
669
|
+
self.udsDtcNumber = value
|
|
670
|
+
return self
|
|
671
|
+
|
|
672
|
+
|
|
673
|
+
class DiagnosticClearDtcNotificationEnum(AREnum):
|
|
674
|
+
def __init__(self):
|
|
675
|
+
super().__init__([])
|
|
676
|
+
|
|
677
|
+
|
|
678
|
+
class DtcFormatTypeEnum(AREnum):
|
|
679
|
+
def __init__(self):
|
|
680
|
+
super().__init__([])
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
class DtcStatusChangeNotificationNeeds(DiagnosticCapabilityElement):
|
|
684
|
+
def __init__(self, parent, short_name):
|
|
685
|
+
super().__init__(parent, short_name)
|
|
686
|
+
|
|
687
|
+
self.dtcFormatType = None # type: DtcFormatTypeEnum # AUTOSAR 4.3.1
|
|
688
|
+
self.notificationTime = None # type: DiagnosticClearDtcNotificationEnum
|
|
689
|
+
|
|
690
|
+
def getDtcFormatType(self):
|
|
691
|
+
return self.dtcFormatType
|
|
692
|
+
|
|
693
|
+
def setDtcFormatType(self, value):
|
|
694
|
+
if value is not None:
|
|
695
|
+
self.dtcFormatType = value
|
|
634
696
|
return self
|
|
635
697
|
|
|
698
|
+
def getNotificationTime(self):
|
|
699
|
+
return self.notificationTime
|
|
700
|
+
|
|
701
|
+
def setNotificationTime(self, value):
|
|
702
|
+
if value is not None:
|
|
703
|
+
self.notificationTime = value
|
|
704
|
+
return self
|
|
705
|
+
|
|
706
|
+
|
|
636
707
|
class DiagnosticEventNeeds(DiagnosticCapabilityElement):
|
|
637
708
|
def __init__(self, parent: ARObject, short_name: str):
|
|
638
709
|
super().__init__(parent, short_name)
|
|
@@ -719,6 +790,7 @@ class DiagnosticEventNeeds(DiagnosticCapabilityElement):
|
|
|
719
790
|
self.udsDtcNumber = value
|
|
720
791
|
return self
|
|
721
792
|
|
|
793
|
+
|
|
722
794
|
class CryptoServiceNeeds(ServiceNeeds):
|
|
723
795
|
def __init__(self, parent: ARObject, short_name: str):
|
|
724
796
|
super().__init__(parent, short_name)
|
|
@@ -756,6 +828,7 @@ class CryptoServiceNeeds(ServiceNeeds):
|
|
|
756
828
|
self.maximumKeyLength = value
|
|
757
829
|
return self
|
|
758
830
|
|
|
831
|
+
|
|
759
832
|
class EcuStateMgrUserNeeds(ServiceNeeds):
|
|
760
833
|
def __init__(self, parent: ARObject, short_name: str):
|
|
761
834
|
super().__init__(parent, short_name)
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
from typing import List
|
|
2
|
+
|
|
3
|
+
from ......M2.AUTOSARTemplates.CommonStructure import ValueSpecification
|
|
4
|
+
from ......M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
5
|
+
from ......M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import RefType
|
|
6
|
+
from ......M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import ARElement
|
|
7
|
+
from ......M2.AUTOSARTemplates.SWComponentTemplate.Communication import PPortComSpec
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class PortPrototypeBlueprintInitValue(ARObject):
|
|
11
|
+
def __init__(self):
|
|
12
|
+
super().__init__()
|
|
13
|
+
|
|
14
|
+
self.dataPrototypeRef = None # type: RefType
|
|
15
|
+
self.value = None # type: ValueSpecification
|
|
16
|
+
|
|
17
|
+
def getDataPrototypeRef(self):
|
|
18
|
+
return self.dataPrototypeRef
|
|
19
|
+
|
|
20
|
+
def setDataPrototypeRef(self, value):
|
|
21
|
+
if value is not None:
|
|
22
|
+
self.dataPrototypeRef = value
|
|
23
|
+
return self
|
|
24
|
+
|
|
25
|
+
def getValue(self):
|
|
26
|
+
return self.value
|
|
27
|
+
|
|
28
|
+
def setValue(self, value):
|
|
29
|
+
if value is not None:
|
|
30
|
+
self.value = value
|
|
31
|
+
return self
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class PortPrototypeBlueprint(ARElement):
|
|
35
|
+
def __init__(self, parent, short_name):
|
|
36
|
+
super().__init__(parent, short_name)
|
|
37
|
+
|
|
38
|
+
self.initValues = [] # type: List[PortPrototypeBlueprintInitValue]
|
|
39
|
+
self.interfaceRef = None # type: RefType
|
|
40
|
+
self.providedComSpecs = [] # type: List[PPortComSpec]
|
|
41
|
+
self.requiredComSpecs = [] # type: List[RPortComSpec]
|
|
42
|
+
|
|
43
|
+
def getInitValues(self):
|
|
44
|
+
return self.initValues
|
|
45
|
+
|
|
46
|
+
def setInitValues(self, value):
|
|
47
|
+
if value is not None:
|
|
48
|
+
self.initValues = value
|
|
49
|
+
return self
|
|
50
|
+
|
|
51
|
+
def getInterfaceRef(self):
|
|
52
|
+
return self.interfaceRef
|
|
53
|
+
|
|
54
|
+
def setInterfaceRef(self, value):
|
|
55
|
+
if value is not None:
|
|
56
|
+
self.interfaceRef = value
|
|
57
|
+
return self
|
|
58
|
+
|
|
59
|
+
def getProvidedComSpecs(self):
|
|
60
|
+
return self.providedComSpecs
|
|
61
|
+
|
|
62
|
+
def setProvidedComSpecs(self, value):
|
|
63
|
+
if value is not None:
|
|
64
|
+
self.providedComSpecs = value
|
|
65
|
+
return self
|
|
66
|
+
|
|
67
|
+
def getRequiredComSpecs(self):
|
|
68
|
+
return self.requiredComSpecs
|
|
69
|
+
|
|
70
|
+
def setRequiredComSpecs(self, value):
|
|
71
|
+
if value is not None:
|
|
72
|
+
self.requiredComSpecs = value
|
|
73
|
+
return self
|
|
File without changes
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
from typing import List
|
|
2
|
+
|
|
3
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import NameToken
|
|
4
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import ARElement, Identifiable
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Keyword(Identifiable):
|
|
8
|
+
def __init__(self, parent, short_name):
|
|
9
|
+
super().__init__(parent, short_name)
|
|
10
|
+
|
|
11
|
+
self.abbrName = None # type: NameToken
|
|
12
|
+
self.classifications = [] # type: List[NameToken]
|
|
13
|
+
|
|
14
|
+
def getAbbrName(self):
|
|
15
|
+
return self.abbrName
|
|
16
|
+
|
|
17
|
+
def setAbbrName(self, value):
|
|
18
|
+
if value is not None:
|
|
19
|
+
self.abbrName = value
|
|
20
|
+
return self
|
|
21
|
+
|
|
22
|
+
def getClassifications(self):
|
|
23
|
+
return self.classifications
|
|
24
|
+
|
|
25
|
+
def addClassification(self, value):
|
|
26
|
+
if value is not None:
|
|
27
|
+
self.classifications.append(value)
|
|
28
|
+
return self
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class KeywordSet(ARElement):
|
|
32
|
+
def __init__(self, parent, short_name):
|
|
33
|
+
super().__init__(parent, short_name)
|
|
34
|
+
|
|
35
|
+
self.keywords = [] # type: List[Keyword]
|
|
36
|
+
|
|
37
|
+
def getKeywords(self):
|
|
38
|
+
return self.keywords
|
|
39
|
+
|
|
40
|
+
def createKeyword(self, short_name: str) -> Keyword:
|
|
41
|
+
if (not self.IsElementExists(short_name)):
|
|
42
|
+
keyword = Keyword(self, short_name)
|
|
43
|
+
self.addElement(keyword)
|
|
44
|
+
self.keywords.append(keyword)
|
|
45
|
+
return self.getElement(short_name)
|
|
File without changes
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import RefType
|
|
2
|
+
from ....M2.MSR.DataDictionary.DataDefProperties import SwImplPolicyEnum
|
|
1
3
|
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
2
4
|
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Identifiable
|
|
3
5
|
|
|
6
|
+
|
|
4
7
|
class Trigger(Identifiable):
|
|
5
8
|
def __init__(self, parent: ARObject, short_name: str):
|
|
6
9
|
super().__init__(parent, short_name)
|
|
@@ -23,3 +26,27 @@ class Trigger(Identifiable):
|
|
|
23
26
|
if value is not None:
|
|
24
27
|
self.triggerPeriod = value
|
|
25
28
|
return self
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class TriggerMapping(ARObject):
|
|
32
|
+
def __init__(self):
|
|
33
|
+
super().__init__()
|
|
34
|
+
|
|
35
|
+
self.firstTriggerRef = None # type: RefType
|
|
36
|
+
self.secondTriggerRef = None # type: RefType
|
|
37
|
+
|
|
38
|
+
def getFirstTriggerRef(self):
|
|
39
|
+
return self.firstTriggerRef
|
|
40
|
+
|
|
41
|
+
def setFirstTriggerRef(self, value):
|
|
42
|
+
if value is not None:
|
|
43
|
+
self.firstTriggerRef = value
|
|
44
|
+
return self
|
|
45
|
+
|
|
46
|
+
def getSecondTriggerRef(self):
|
|
47
|
+
return self.secondTriggerRef
|
|
48
|
+
|
|
49
|
+
def setSecondTriggerRef(self, value):
|
|
50
|
+
if value is not None:
|
|
51
|
+
self.secondTriggerRef = value
|
|
52
|
+
return self
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
from typing import Dict, List
|
|
2
2
|
|
|
3
|
-
from .....M2.AUTOSARTemplates.SWComponentTemplate.Components import CompositionSwComponentType, ServiceSwComponentType, SwComponentType
|
|
4
|
-
from .....M2.AUTOSARTemplates.SWComponentTemplate.Components import ApplicationSwComponentType, AtomicSwComponentType
|
|
5
|
-
from .....M2.AUTOSARTemplates.SWComponentTemplate.Components import ComplexDeviceDriverSwComponentType, EcuAbstractionSwComponentType
|
|
6
3
|
from .....M2.AUTOSARTemplates.SWComponentTemplate.Components import SensorActuatorSwComponentType
|
|
7
|
-
|
|
8
4
|
from .....M2.MSR.AsamHdo.BaseTypes import SwBaseType
|
|
9
5
|
from .....M2.MSR.AsamHdo.Units import PhysicalDimension, Unit
|
|
10
6
|
from .....M2.MSR.AsamHdo.Constraints.GlobalConstraints import DataConstr
|
|
@@ -21,15 +17,21 @@ from .....M2.AUTOSARTemplates.CommonStructure.Implementation import Implementati
|
|
|
21
17
|
from .....M2.AUTOSARTemplates.CommonStructure.FlatMap import FlatMap
|
|
22
18
|
from .....M2.AUTOSARTemplates.CommonStructure.ModeDeclaration import ModeDeclarationGroup
|
|
23
19
|
from .....M2.AUTOSARTemplates.CommonStructure.SwcBswMapping import SwcBswMapping
|
|
20
|
+
from .....M2.AUTOSARTemplates.CommonStructure.StandardizationTemplate.BlueprintDedicated.PortPrototypeBlueprint import PortPrototypeBlueprint
|
|
21
|
+
from .....M2.AUTOSARTemplates.CommonStructure.StandardizationTemplate.Keyword import KeywordSet
|
|
24
22
|
from .....M2.AUTOSARTemplates.CommonStructure.Timing.TimingConstraint.TimingExtensions import SwcTiming
|
|
25
23
|
from .....M2.AUTOSARTemplates.DiagnosticExtract.DiagnosticContribution import DiagnosticServiceTable
|
|
26
24
|
from .....M2.AUTOSARTemplates.ECUCDescriptionTemplate import EcucModuleConfigurationValues, EcucValueCollection
|
|
27
25
|
from .....M2.AUTOSARTemplates.EcuResourceTemplate import HwElement
|
|
28
26
|
from .....M2.AUTOSARTemplates.EcuResourceTemplate.HwElementCategory import HwCategory, HwType
|
|
29
27
|
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
28
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ElementCollection import Collection
|
|
30
29
|
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import CollectableElement, Identifiable, Referrable
|
|
31
30
|
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import Boolean, Identifier, RefType, ReferrableSubtypesEnum
|
|
32
31
|
from .....M2.AUTOSARTemplates.GenericStructure.LifeCycles import LifeCycleInfoSet
|
|
32
|
+
from .....M2.AUTOSARTemplates.SWComponentTemplate.Components import CompositionSwComponentType, ServiceSwComponentType, SwComponentType
|
|
33
|
+
from .....M2.AUTOSARTemplates.SWComponentTemplate.Components import ApplicationSwComponentType, AtomicSwComponentType
|
|
34
|
+
from .....M2.AUTOSARTemplates.SWComponentTemplate.Components import ComplexDeviceDriverSwComponentType, EcuAbstractionSwComponentType
|
|
33
35
|
from .....M2.AUTOSARTemplates.SWComponentTemplate.Datatype.Datatypes import ApplicationArrayDataType, ApplicationDataType
|
|
34
36
|
from .....M2.AUTOSARTemplates.SWComponentTemplate.Datatype.Datatypes import ApplicationPrimitiveDataType, ApplicationRecordDataType
|
|
35
37
|
from .....M2.AUTOSARTemplates.SWComponentTemplate.Datatype.Datatypes import DataTypeMappingSet
|
|
@@ -599,6 +601,24 @@ class ARPackage(Identifiable, CollectableElement):
|
|
|
599
601
|
transform_set = DataTransformationSet(self, short_name)
|
|
600
602
|
self.addElement(transform_set)
|
|
601
603
|
return self.getElement(short_name)
|
|
604
|
+
|
|
605
|
+
def createCollection(self, short_name: str) -> Collection:
|
|
606
|
+
if (not self.IsElementExists(short_name)):
|
|
607
|
+
collection = Collection(self, short_name)
|
|
608
|
+
self.addElement(collection)
|
|
609
|
+
return self.getElement(short_name)
|
|
610
|
+
|
|
611
|
+
def createKeywordSet(self, short_name: str) -> KeywordSet:
|
|
612
|
+
if (not self.IsElementExists(short_name)):
|
|
613
|
+
keyword_set = KeywordSet(self, short_name)
|
|
614
|
+
self.addElement(keyword_set)
|
|
615
|
+
return self.getElement(short_name)
|
|
616
|
+
|
|
617
|
+
def createPortPrototypeBlueprint(self, short_name: str) -> PortPrototypeBlueprint:
|
|
618
|
+
if (not self.IsElementExists(short_name)):
|
|
619
|
+
keyword_set = PortPrototypeBlueprint(self, short_name)
|
|
620
|
+
self.addElement(keyword_set)
|
|
621
|
+
return self.getElement(short_name)
|
|
602
622
|
|
|
603
623
|
def getApplicationPrimitiveDataTypes(self) -> List[ApplicationPrimitiveDataType]:
|
|
604
624
|
return list(sorted(filter(lambda a: isinstance(a, ApplicationPrimitiveDataType), self.elements.values()), key=lambda o: o.short_name))
|
|
@@ -765,6 +785,15 @@ class ARPackage(Identifiable, CollectableElement):
|
|
|
765
785
|
def getDataTransformationSets(self) -> List[DataTransformationSet]:
|
|
766
786
|
return list(sorted(filter(lambda a: isinstance(a, DataTransformationSet), self.elements.values()), key=lambda a: a.short_name))
|
|
767
787
|
|
|
788
|
+
def getCollections(self) -> List[Collection]:
|
|
789
|
+
return list(sorted(filter(lambda a: isinstance(a, Collection), self.elements.values()), key=lambda a: a.short_name))
|
|
790
|
+
|
|
791
|
+
def getKeywordSets(self) -> List[KeywordSet]:
|
|
792
|
+
return list(sorted(filter(lambda a: isinstance(a, KeywordSet), self.elements.values()), key=lambda a: a.short_name))
|
|
793
|
+
|
|
794
|
+
def getPortPrototypeBlueprints(self) -> List[PortPrototypeBlueprint]:
|
|
795
|
+
return list(sorted(filter(lambda a: isinstance(a, PortPrototypeBlueprint), self.elements.values()), key=lambda a: a.short_name))
|
|
796
|
+
|
|
768
797
|
def getReferenceBases(self):
|
|
769
798
|
return self.referenceBases
|
|
770
799
|
|
armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ElementCollection.py
CHANGED
|
@@ -1 +1,74 @@
|
|
|
1
|
+
from typing import List
|
|
1
2
|
|
|
3
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import Identifier, NameToken, RefType
|
|
4
|
+
from .....M2.AUTOSARTemplates.GenericStructure.AbstractStructure import AnyInstanceRef
|
|
5
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import ARElement
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class Collection(ARElement):
|
|
9
|
+
def __init__(self, parent, short_name):
|
|
10
|
+
super().__init__(parent, short_name)
|
|
11
|
+
|
|
12
|
+
self.autoCollect = None # type: AutoCollectEnum
|
|
13
|
+
self.collectedInstances = [] # type: List[AnyInstanceRef]
|
|
14
|
+
self.collectionSemantics = None # type: NameToken
|
|
15
|
+
self.elementRefs = [] # type: List[RefType]
|
|
16
|
+
self.elementRole = None # type: Identifier
|
|
17
|
+
self.sourceElementRefs = [] # type: List[RefType]
|
|
18
|
+
self.sourceInstances = [] # type: List[AnyInstanceRef]
|
|
19
|
+
|
|
20
|
+
def getAutoCollect(self):
|
|
21
|
+
return self.autoCollect
|
|
22
|
+
|
|
23
|
+
def setAutoCollect(self, value):
|
|
24
|
+
if value is not None:
|
|
25
|
+
self.autoCollect = value
|
|
26
|
+
return self
|
|
27
|
+
|
|
28
|
+
def getCollectedInstances(self):
|
|
29
|
+
return self.collectedInstances
|
|
30
|
+
|
|
31
|
+
def setCollectedInstances(self, value):
|
|
32
|
+
if value is not None:
|
|
33
|
+
self.collectedInstances = value
|
|
34
|
+
return self
|
|
35
|
+
|
|
36
|
+
def getCollectionSemantics(self):
|
|
37
|
+
return self.collectionSemantics
|
|
38
|
+
|
|
39
|
+
def setCollectionSemantics(self, value):
|
|
40
|
+
if value is not None:
|
|
41
|
+
self.collectionSemantics = value
|
|
42
|
+
return self
|
|
43
|
+
|
|
44
|
+
def getElementRefs(self):
|
|
45
|
+
return self.elementRefs
|
|
46
|
+
|
|
47
|
+
def addElementRef(self, value):
|
|
48
|
+
if value is not None:
|
|
49
|
+
self.elementRefs.append(value)
|
|
50
|
+
return self
|
|
51
|
+
|
|
52
|
+
def getElementRole(self):
|
|
53
|
+
return self.elementRole
|
|
54
|
+
|
|
55
|
+
def setElementRole(self, value):
|
|
56
|
+
if value is not None:
|
|
57
|
+
self.elementRole = value
|
|
58
|
+
return self
|
|
59
|
+
|
|
60
|
+
def getSourceElementRefs(self):
|
|
61
|
+
return self.sourceElementRefs
|
|
62
|
+
|
|
63
|
+
def addSourceElementRef(self, value):
|
|
64
|
+
if value is not None:
|
|
65
|
+
self.sourceElementRefs.append(value)
|
|
66
|
+
return self
|
|
67
|
+
|
|
68
|
+
def getSourceInstances(self):
|
|
69
|
+
return self.sourceInstances
|
|
70
|
+
|
|
71
|
+
def setSourceInstances(self, value):
|
|
72
|
+
if value is not None:
|
|
73
|
+
self.sourceInstances = value
|
|
74
|
+
return self
|