armodel 1.7.2__py3-none-any.whl → 1.7.4__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/cli/arxml_dump_cli.py +1 -1
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswBehavior.py +44 -20
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswInterfaces.py +104 -30
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswOverview.py +12 -16
- armodel/models/M2/AUTOSARTemplates/CommonStructure/FlatMap.py +70 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/Implementation.py +12 -9
- armodel/models/M2/AUTOSARTemplates/CommonStructure/InternalBehavior.py +29 -22
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ResourceConsumption/HardwareConfiguration.py +33 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ResourceConsumption/HeapUsage.py +10 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ResourceConsumption/SoftwareContext.py +23 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ResourceConsumption/StackUsage.py +93 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ResourceConsumption/__init__.py +39 -5
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ServiceNeeds.py +28 -5
- armodel/models/M2/AUTOSARTemplates/CommonStructure/SwcBswMapping.py +48 -6
- armodel/models/M2/AUTOSARTemplates/GenericStructure/AbstractStructure.py +5 -5
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ARPackage.py +27 -1
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/PrimitiveTypes.py +39 -0
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Communication.py +17 -1
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Composition/__init__.py +8 -0
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/PortInterface/__init__.py +196 -5
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/AutosarVariableRef.py +31 -0
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/DataElements.py +4 -3
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/InstanceRefsUsage.py +17 -32
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/RTEEvents.py +4 -0
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ServiceMapping.py +17 -2
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/__init__.py +81 -34
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/DataMapping.py +10 -1
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Ethernet/EthernetCommunication.py +229 -0
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Ethernet/EthernetTopology.py +167 -0
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Ethernet/NetworkEndpoint.py +225 -0
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/Fibex4Ethernet/ServiceInstances.py +96 -7
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/FibexCore/CoreTopology.py +47 -4
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/FibexCore/EcuInstance.py +18 -5
- armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/FibexCore/Timing.py +7 -12
- armodel/models/M2/MSR/AsamHdo/BaseTypes.py +0 -1
- armodel/models/M2/MSR/AsamHdo/ComputationMethod.py +16 -1
- armodel/models/M2/MSR/CalibrationData/CalibrationValue.py +34 -3
- armodel/models/M2/MSR/DataDictionary/DataDefProperties.py +7 -0
- armodel/models/M2/MSR/DataDictionary/ServiceProcessTask.py +33 -0
- armodel/models/__init__.py +6 -0
- armodel/parser/abstract_arxml_parser.py +4 -14
- armodel/parser/arxml_parser.py +567 -224
- armodel/tests/test_armodel/models/test_ar_object.py +6 -2
- armodel/tests/test_armodel/models/test_ar_ref.py +2 -2
- armodel/tests/test_armodel/models/test_port_interface.py +4 -4
- armodel/tests/test_armodel/parser/test_parse_bswmd.py +48 -48
- armodel/writer/abstract_arxml_writer.py +2 -3
- armodel/writer/arxml_writer.py +566 -288
- {armodel-1.7.2.dist-info → armodel-1.7.4.dist-info}/METADATA +30 -2
- {armodel-1.7.2.dist-info → armodel-1.7.4.dist-info}/RECORD +54 -44
- {armodel-1.7.2.dist-info → armodel-1.7.4.dist-info}/LICENSE +0 -0
- {armodel-1.7.2.dist-info → armodel-1.7.4.dist-info}/WHEEL +0 -0
- {armodel-1.7.2.dist-info → armodel-1.7.4.dist-info}/entry_points.txt +0 -0
- {armodel-1.7.2.dist-info → armodel-1.7.4.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
from abc import ABCMeta
|
|
2
|
+
from .....M2.AUTOSARTemplates.CommonStructure.ResourceConsumption import SoftwareContext
|
|
3
|
+
from .....M2.AUTOSARTemplates.CommonStructure.ResourceConsumption.HardwareConfiguration import HardwareConfiguration
|
|
4
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import PositiveInteger, RefType
|
|
5
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
6
|
+
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Identifiable
|
|
7
|
+
|
|
8
|
+
class StackUsage(Identifiable, metaclass = ABCMeta):
|
|
9
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
10
|
+
if type(self) == StackUsage:
|
|
11
|
+
raise NotImplementedError("StackUsage is an abstract class.")
|
|
12
|
+
|
|
13
|
+
super().__init__(parent, short_name)
|
|
14
|
+
|
|
15
|
+
self.executableEntityRef = None # type: RefType
|
|
16
|
+
self.hardwareConfiguration = None # type: HardwareConfiguration
|
|
17
|
+
self.hwElementRef = None # type: RefType
|
|
18
|
+
self.softwareContext = None # type: SoftwareContext
|
|
19
|
+
|
|
20
|
+
def getExecutableEntityRef(self):
|
|
21
|
+
return self.executableEntityRef
|
|
22
|
+
|
|
23
|
+
def setExecutableEntityRef(self, value):
|
|
24
|
+
self.executableEntityRef = value
|
|
25
|
+
return self
|
|
26
|
+
|
|
27
|
+
def getHardwareConfiguration(self):
|
|
28
|
+
return self.hardwareConfiguration
|
|
29
|
+
|
|
30
|
+
def setHardwareConfiguration(self, value):
|
|
31
|
+
self.hardwareConfiguration = value
|
|
32
|
+
return self
|
|
33
|
+
|
|
34
|
+
def getHwElementRef(self):
|
|
35
|
+
return self.hwElementRef
|
|
36
|
+
|
|
37
|
+
def setHwElementRef(self, value):
|
|
38
|
+
self.hwElementRef = value
|
|
39
|
+
return self
|
|
40
|
+
|
|
41
|
+
def getSoftwareContext(self):
|
|
42
|
+
return self.softwareContext
|
|
43
|
+
|
|
44
|
+
def setSoftwareContext(self, value):
|
|
45
|
+
self.softwareContext = value
|
|
46
|
+
return self
|
|
47
|
+
|
|
48
|
+
class MeasuredStackUsage(StackUsage):
|
|
49
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
50
|
+
super().__init__(parent, short_name)
|
|
51
|
+
|
|
52
|
+
self.averageMemoryConsumption = None # type: PositiveInteger
|
|
53
|
+
self.maximumMemoryConsumption = None # type: PositiveInteger
|
|
54
|
+
|
|
55
|
+
def getAverageMemoryConsumption(self):
|
|
56
|
+
return self.averageMemoryConsumption
|
|
57
|
+
|
|
58
|
+
def setAverageMemoryConsumption(self, value):
|
|
59
|
+
self.averageMemoryConsumption = value
|
|
60
|
+
return self
|
|
61
|
+
|
|
62
|
+
def getMaximumMemoryConsumption(self):
|
|
63
|
+
return self.maximumMemoryConsumption
|
|
64
|
+
|
|
65
|
+
def setMaximumMemoryConsumption(self, value):
|
|
66
|
+
self.maximumMemoryConsumption = value
|
|
67
|
+
return self
|
|
68
|
+
|
|
69
|
+
class RoughEstimateStackUsage(StackUsage):
|
|
70
|
+
def __init__(self, parent, short_name):
|
|
71
|
+
super().__init__(parent, short_name)
|
|
72
|
+
|
|
73
|
+
self.memoryConsumption = None # type: PositiveInteger
|
|
74
|
+
|
|
75
|
+
def getMemoryConsumption(self):
|
|
76
|
+
return self.memoryConsumption
|
|
77
|
+
|
|
78
|
+
def setMemoryConsumption(self, value):
|
|
79
|
+
self.memoryConsumption = value
|
|
80
|
+
return self
|
|
81
|
+
|
|
82
|
+
class WorstCaseStackUsage(StackUsage):
|
|
83
|
+
def __init__(self, parent, short_name):
|
|
84
|
+
super().__init__(parent, short_name)
|
|
85
|
+
|
|
86
|
+
self.memoryConsumption = None # type: PositiveInteger
|
|
87
|
+
|
|
88
|
+
def getMemoryConsumption(self):
|
|
89
|
+
return self.memoryConsumption
|
|
90
|
+
|
|
91
|
+
def setMemoryConsumption(self, value):
|
|
92
|
+
self.memoryConsumption = value
|
|
93
|
+
return self
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from .....M2.AUTOSARTemplates.CommonStructure.ResourceConsumption.StackUsage import MeasuredStackUsage, RoughEstimateStackUsage, StackUsage, WorstCaseStackUsage
|
|
2
|
+
from .....M2.AUTOSARTemplates.CommonStructure.ResourceConsumption.HeapUsage import HeapUsage
|
|
1
3
|
from .....M2.AUTOSARTemplates.CommonStructure.ResourceConsumption.MemorySectionUsage import MemorySection
|
|
2
4
|
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
3
5
|
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Identifiable
|
|
@@ -7,14 +9,46 @@ class ResourceConsumption(Identifiable):
|
|
|
7
9
|
def __init__(self, parent: ARObject, short_name: str):
|
|
8
10
|
super().__init__(parent, short_name)
|
|
9
11
|
|
|
12
|
+
self.accessCountSets = [] # type: List[AccessCountSet]
|
|
13
|
+
self.executionTimes = [] # type: List[ExecutionTime]
|
|
14
|
+
self.heapUsages = [] # type: List[HeapUsage]
|
|
15
|
+
self.memorySections = []
|
|
16
|
+
self.sectionNamePrefixs = [] # type: List[SectionNamePrefix]
|
|
17
|
+
self.stackUsages = [] # type: List[StackUsage]
|
|
18
|
+
|
|
10
19
|
def createMemorySection(self, short_name: str) -> MemorySection:
|
|
11
20
|
if (short_name not in self.elements):
|
|
12
|
-
|
|
13
|
-
self.
|
|
14
|
-
|
|
21
|
+
section = MemorySection(self, short_name)
|
|
22
|
+
self.addElement(section)
|
|
23
|
+
self.memorySections.append(section)
|
|
24
|
+
return self.getElement(short_name)
|
|
15
25
|
|
|
16
26
|
def getMemorySections(self) -> List[MemorySection]:
|
|
17
|
-
return list(filter(lambda a
|
|
27
|
+
return list(sorted(filter(lambda a: isinstance(a, MemorySection), self.elements.values()), key= lambda o:o.short_name))
|
|
18
28
|
|
|
19
29
|
def getMemorySection(self, short_name: str) -> MemorySection:
|
|
20
|
-
return next(filter(lambda o: isinstance(o, MemorySection) and (o.short_name == short_name), self.elements.values()), None)
|
|
30
|
+
return next(filter(lambda o: isinstance(o, MemorySection) and (o.short_name == short_name), self.elements.values()), None)
|
|
31
|
+
|
|
32
|
+
def createMeasuredStackUsage(self, short_name: str) -> MeasuredStackUsage:
|
|
33
|
+
if (short_name not in self.elements):
|
|
34
|
+
section = MeasuredStackUsage(self, short_name)
|
|
35
|
+
self.addElement(section)
|
|
36
|
+
self.stackUsages.append(section)
|
|
37
|
+
return self.getElement(short_name)
|
|
38
|
+
|
|
39
|
+
def createRoughEstimateStackUsage(self, short_name: str) -> RoughEstimateStackUsage:
|
|
40
|
+
if (short_name not in self.elements):
|
|
41
|
+
section = RoughEstimateStackUsage(self, short_name)
|
|
42
|
+
self.addElement(section)
|
|
43
|
+
self.stackUsages.append(section)
|
|
44
|
+
return self.getElement(short_name)
|
|
45
|
+
|
|
46
|
+
def createWorstCaseStackUsage(self, short_name: str) -> WorstCaseStackUsage:
|
|
47
|
+
if (short_name not in self.elements):
|
|
48
|
+
section = WorstCaseStackUsage(self, short_name)
|
|
49
|
+
self.addElement(section)
|
|
50
|
+
self.stackUsages.append(section)
|
|
51
|
+
return self.getElement(short_name)
|
|
52
|
+
|
|
53
|
+
def getStackUsages(self) -> List[StackUsage]:
|
|
54
|
+
return list(sorted(filter(lambda a: isinstance(a, StackUsage), self.elements.values()), key= lambda o:o.short_name))
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from abc import ABCMeta
|
|
2
2
|
from typing import List
|
|
3
|
-
|
|
3
|
+
from ....M2.AUTOSARTemplates.SWComponentTemplate.SwcInternalBehavior.InstanceRefsUsage import AutosarParameterRef
|
|
4
|
+
from ....M2.AUTOSARTemplates.SWComponentTemplate.SwcInternalBehavior.AutosarVariableRef import AutosarVariableRef
|
|
4
5
|
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
5
6
|
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Identifiable
|
|
6
7
|
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import Identifier, RefType, AREnum, Boolean, ARLiteral, DiagRequirementIdString, Integer, PositiveInteger, RefType, String, TimeValue
|
|
@@ -10,8 +11,8 @@ class RoleBasedDataAssignment(ARObject):
|
|
|
10
11
|
super().__init__()
|
|
11
12
|
|
|
12
13
|
self.role = None # type: ARLiteral
|
|
13
|
-
self.usedDataElement = None # type:
|
|
14
|
-
self.usedParameterElement = None # type:
|
|
14
|
+
self.usedDataElement = None # type: AutosarVariableRef
|
|
15
|
+
self.usedParameterElement = None # type: AutosarParameterRef
|
|
15
16
|
self.usedPimRef = None # type: RefType
|
|
16
17
|
|
|
17
18
|
def getRole(self):
|
|
@@ -611,6 +612,26 @@ class DiagEventDebounceTimeBased(DiagEventDebounceAlgorithm):
|
|
|
611
612
|
self.timePassedThreshold = value
|
|
612
613
|
return self
|
|
613
614
|
|
|
615
|
+
class DiagnosticEventInfoNeeds(DiagnosticCapabilityElement):
|
|
616
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
617
|
+
super().__init__(parent, short_name)
|
|
618
|
+
|
|
619
|
+
self.obdDtcNumber = None # type: PositiveInteger
|
|
620
|
+
self.udsDtcNumber = None # type: PositiveInteger
|
|
621
|
+
|
|
622
|
+
def getObdDtcNumber(self):
|
|
623
|
+
return self.obdDtcNumber
|
|
624
|
+
|
|
625
|
+
def setObdDtcNumber(self, value):
|
|
626
|
+
self.obdDtcNumber = value
|
|
627
|
+
return self
|
|
628
|
+
|
|
629
|
+
def getUdsDtcNumber(self):
|
|
630
|
+
return self.udsDtcNumber
|
|
631
|
+
|
|
632
|
+
def setUdsDtcNumber(self, value):
|
|
633
|
+
self.udsDtcNumber = value
|
|
634
|
+
return self
|
|
614
635
|
|
|
615
636
|
class DiagnosticEventNeeds(DiagnosticCapabilityElement):
|
|
616
637
|
def __init__(self, parent: ARObject, short_name: str):
|
|
@@ -698,8 +719,6 @@ class DiagnosticEventNeeds(DiagnosticCapabilityElement):
|
|
|
698
719
|
self.udsDtcNumber = value
|
|
699
720
|
return self
|
|
700
721
|
|
|
701
|
-
|
|
702
|
-
|
|
703
722
|
class CryptoServiceNeeds(ServiceNeeds):
|
|
704
723
|
def __init__(self, parent: ARObject, short_name: str):
|
|
705
724
|
super().__init__(parent, short_name)
|
|
@@ -736,3 +755,7 @@ class CryptoServiceNeeds(ServiceNeeds):
|
|
|
736
755
|
def setMaximumKeyLength(self, value):
|
|
737
756
|
self.maximumKeyLength = value
|
|
738
757
|
return self
|
|
758
|
+
|
|
759
|
+
class EcuStateMgrUserNeeds(ServiceNeeds):
|
|
760
|
+
def __init__(self, parent: ARObject, short_name: str):
|
|
761
|
+
super().__init__(parent, short_name)
|
|
@@ -14,22 +14,64 @@ class SwcBswRunnableMapping(ARObject):
|
|
|
14
14
|
'''
|
|
15
15
|
super().__init__()
|
|
16
16
|
|
|
17
|
-
self.bswEntityRef
|
|
17
|
+
self.bswEntityRef = None # type: RefType
|
|
18
18
|
self.swcRunnableRef = None # type: RefType
|
|
19
19
|
|
|
20
|
+
def getBswEntityRef(self):
|
|
21
|
+
return self.bswEntityRef
|
|
22
|
+
|
|
23
|
+
def setBswEntityRef(self, value):
|
|
24
|
+
self.bswEntityRef = value
|
|
25
|
+
return self
|
|
26
|
+
|
|
27
|
+
def getSwcRunnableRef(self):
|
|
28
|
+
return self.swcRunnableRef
|
|
29
|
+
|
|
30
|
+
def setSwcRunnableRef(self, value):
|
|
31
|
+
self.swcRunnableRef = value
|
|
32
|
+
return self
|
|
20
33
|
|
|
21
34
|
class SwcBswMapping(Identifiable):
|
|
22
35
|
def __init__(self, parent: ARObject, short_name: str):
|
|
23
36
|
super().__init__(parent, short_name)
|
|
24
37
|
|
|
25
38
|
self.bswBehaviorRef = None # type: RefType
|
|
26
|
-
self.
|
|
39
|
+
self.runnableMappings = [] # type: List[SwcBswRunnableMapping]
|
|
27
40
|
self.swcBehaviorRef = None # type: RefType
|
|
28
41
|
self.synchronizedModeGroups = []
|
|
29
42
|
self.synchronizedTriggers = []
|
|
30
43
|
|
|
31
|
-
def
|
|
32
|
-
self.
|
|
44
|
+
def getBswBehaviorRef(self):
|
|
45
|
+
return self.bswBehaviorRef
|
|
46
|
+
|
|
47
|
+
def setBswBehaviorRef(self, value):
|
|
48
|
+
self.bswBehaviorRef = value
|
|
49
|
+
return self
|
|
50
|
+
|
|
51
|
+
def getRunnableMappings(self):
|
|
52
|
+
return self.runnableMappings
|
|
53
|
+
|
|
54
|
+
def addRunnableMapping(self, value):
|
|
55
|
+
self.runnableMappings.append(value)
|
|
56
|
+
return self
|
|
57
|
+
|
|
58
|
+
def getSwcBehaviorRef(self):
|
|
59
|
+
return self.swcBehaviorRef
|
|
60
|
+
|
|
61
|
+
def setSwcBehaviorRef(self, value):
|
|
62
|
+
self.swcBehaviorRef = value
|
|
63
|
+
return self
|
|
64
|
+
|
|
65
|
+
def getSynchronizedModeGroups(self):
|
|
66
|
+
return self.synchronizedModeGroups
|
|
67
|
+
|
|
68
|
+
def setSynchronizedModeGroups(self, value):
|
|
69
|
+
self.synchronizedModeGroups = value
|
|
70
|
+
return self
|
|
71
|
+
|
|
72
|
+
def getSynchronizedTriggers(self):
|
|
73
|
+
return self.synchronizedTriggers
|
|
33
74
|
|
|
34
|
-
def
|
|
35
|
-
|
|
75
|
+
def setSynchronizedTriggers(self, value):
|
|
76
|
+
self.synchronizedTriggers = value
|
|
77
|
+
return self
|
|
@@ -42,7 +42,7 @@ class AnyInstanceRef(ARObject):
|
|
|
42
42
|
super().__init__()
|
|
43
43
|
|
|
44
44
|
self.baseRef = None # type: RefType
|
|
45
|
-
self.
|
|
45
|
+
self.contextElementRefs = [] # type: List[RefType]
|
|
46
46
|
self.targetRef = None # type: RefType
|
|
47
47
|
|
|
48
48
|
def getBaseRef(self) -> RefType:
|
|
@@ -52,11 +52,11 @@ class AnyInstanceRef(ARObject):
|
|
|
52
52
|
self.baseRef = value
|
|
53
53
|
return self
|
|
54
54
|
|
|
55
|
-
def
|
|
56
|
-
return self.
|
|
55
|
+
def getContextElementRefs(self) -> List[RefType]:
|
|
56
|
+
return self.contextElementRefs
|
|
57
57
|
|
|
58
|
-
def
|
|
59
|
-
self.
|
|
58
|
+
def addContextElementRef(self, value: RefType):
|
|
59
|
+
self.contextElementRefs.append(value)
|
|
60
60
|
return self
|
|
61
61
|
|
|
62
62
|
def getTargetRef(self) -> RefType:
|
|
@@ -13,6 +13,7 @@ from .....M2.MSR.DataDictionary.RecordLayout import SwRecordLayout
|
|
|
13
13
|
from .....M2.AUTOSARTemplates.BswModuleTemplate.BswOverview import BswModuleDescription
|
|
14
14
|
from .....M2.AUTOSARTemplates.BswModuleTemplate.BswInterfaces import BswModuleEntry
|
|
15
15
|
from .....M2.AUTOSARTemplates.CommonStructure.Implementation import Implementation
|
|
16
|
+
from .....M2.AUTOSARTemplates.CommonStructure.FlatMap import FlatMap
|
|
16
17
|
from .....M2.AUTOSARTemplates.BswModuleTemplate.BswImplementation import BswImplementation
|
|
17
18
|
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
18
19
|
from .....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import CollectableElement, Identifiable, Referrable
|
|
@@ -26,12 +27,13 @@ from .....M2.AUTOSARTemplates.SystemTemplate.Fibex.Fibex4Multiplatform import Ga
|
|
|
26
27
|
from .....M2.AUTOSARTemplates.SystemTemplate.Fibex.FibexCore.CoreCommunication import DcmIPdu, ISignal, ISignalGroup, ISignalIPdu, ISignalIPduGroup, NPdu, NmPdu, SecuredIPdu, SystemSignal, SystemSignalGroup
|
|
27
28
|
from .....M2.AUTOSARTemplates.SystemTemplate.Fibex.FibexCore.CoreTopology import CanCluster, LinCluster
|
|
28
29
|
from .....M2.AUTOSARTemplates.SystemTemplate.Fibex.Fibex4Lin.LinCommunication import LinUnconditionalFrame
|
|
30
|
+
from .....M2.AUTOSARTemplates.SystemTemplate.Fibex.Fibex4Ethernet.EthernetTopology import EthernetCluster
|
|
29
31
|
from .....M2.AUTOSARTemplates.CommonStructure.SwcBswMapping import SwcBswMapping
|
|
30
32
|
from .....M2.AUTOSARTemplates.SWComponentTemplate.SwcImplementation import SwcImplementation
|
|
31
33
|
from .....M2.AUTOSARTemplates.CommonStructure import ConstantSpecification
|
|
32
34
|
from .....M2.AUTOSARTemplates.CommonStructure.ImplementationDataTypes import ImplementationDataType
|
|
33
35
|
from .....M2.AUTOSARTemplates.ECUCDescriptionTemplate import EcucModuleConfigurationValues, EcucValueCollection
|
|
34
|
-
from .....M2.AUTOSARTemplates.SWComponentTemplate.PortInterface import ClientServerInterface, ModeSwitchInterface, ParameterInterface, SenderReceiverInterface, TriggerInterface
|
|
36
|
+
from .....M2.AUTOSARTemplates.SWComponentTemplate.PortInterface import ClientServerInterface, ModeSwitchInterface, ParameterInterface, PortInterfaceMappingSet, SenderReceiverInterface, TriggerInterface
|
|
35
37
|
from .....M2.AUTOSARTemplates.SystemTemplate import System
|
|
36
38
|
from .....M2.AUTOSARTemplates.SystemTemplate.NetworkManagement import NmConfig
|
|
37
39
|
from .....M2.AUTOSARTemplates.SystemTemplate.TransportProtocols import CanTpConfig
|
|
@@ -186,6 +188,12 @@ class ARPackage(Identifiable, CollectableElement):
|
|
|
186
188
|
set = LifeCycleInfoSet(self, short_name)
|
|
187
189
|
self.addElement(set)
|
|
188
190
|
return self.getElement(short_name)
|
|
191
|
+
|
|
192
|
+
def createFlatMap(self, short_name: str) -> FlatMap:
|
|
193
|
+
if (short_name not in self.elements):
|
|
194
|
+
set = FlatMap(self, short_name)
|
|
195
|
+
self.addElement(set)
|
|
196
|
+
return self.getElement(short_name)
|
|
189
197
|
|
|
190
198
|
def createClientServerInterface(self, short_name: str) -> ClientServerInterface:
|
|
191
199
|
if (short_name not in self.elements):
|
|
@@ -456,6 +464,24 @@ class ARPackage(Identifiable, CollectableElement):
|
|
|
456
464
|
element = System(self, short_name)
|
|
457
465
|
self.addElement(element)
|
|
458
466
|
return self.getElement(short_name)
|
|
467
|
+
|
|
468
|
+
def createFlatMap(self, short_name: str) -> FlatMap:
|
|
469
|
+
if (short_name not in self.elements):
|
|
470
|
+
map = FlatMap(self, short_name)
|
|
471
|
+
self.addElement(map)
|
|
472
|
+
return self.getElement(short_name)
|
|
473
|
+
|
|
474
|
+
def createPortInterfaceMappingSet(self, short_name: str) -> PortInterfaceMappingSet:
|
|
475
|
+
if (short_name not in self.elements):
|
|
476
|
+
map = PortInterfaceMappingSet(self, short_name)
|
|
477
|
+
self.addElement(map)
|
|
478
|
+
return self.getElement(short_name)
|
|
479
|
+
|
|
480
|
+
def createEthernetCluster(self, short_name: str) -> EthernetCluster:
|
|
481
|
+
if (short_name not in self.elements):
|
|
482
|
+
cluster = EthernetCluster(self, short_name)
|
|
483
|
+
self.addElement(cluster)
|
|
484
|
+
return self.getElement(short_name)
|
|
459
485
|
|
|
460
486
|
def getApplicationPrimitiveDataTypes(self) -> List[ApplicationPrimitiveDataType]:
|
|
461
487
|
return list(sorted(filter(lambda a: isinstance(a, ApplicationPrimitiveDataType), self.elements.values()), key= lambda o:o.short_name))
|
armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/PrimitiveTypes.py
CHANGED
|
@@ -447,3 +447,42 @@ class DiagRequirementIdString(ARLiteral):
|
|
|
447
447
|
def __init__(self):
|
|
448
448
|
super().__init__()
|
|
449
449
|
|
|
450
|
+
|
|
451
|
+
class ArgumentDirectionEnum(AREnum):
|
|
452
|
+
IN = "in"
|
|
453
|
+
INOUT = "inout"
|
|
454
|
+
OUT = "out"
|
|
455
|
+
|
|
456
|
+
def __init__(self):
|
|
457
|
+
super().__init__((
|
|
458
|
+
ArgumentDirectionEnum.IN,
|
|
459
|
+
ArgumentDirectionEnum.INOUT,
|
|
460
|
+
ArgumentDirectionEnum.OUT
|
|
461
|
+
))
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
class Ip4AddressString(ARLiteral):
|
|
465
|
+
'''
|
|
466
|
+
This is used to specify an IP4 address. Notation: 255.255.255.255
|
|
467
|
+
|
|
468
|
+
Tags
|
|
469
|
+
* xml.xsd.customType=IP4-ADDRESS-STRING
|
|
470
|
+
* 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
|
|
471
|
+
* xml.xsd.type=string
|
|
472
|
+
'''
|
|
473
|
+
def __init__(self):
|
|
474
|
+
super().__init__()
|
|
475
|
+
|
|
476
|
+
class Ip6AddressString(ARLiteral):
|
|
477
|
+
'''
|
|
478
|
+
This is used to specify an IP6 address. Notation: FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF
|
|
479
|
+
Alternative notations, short-cuts with duplicate colons like ::, etc. or mixtures using colons and dots, are
|
|
480
|
+
not allowed.
|
|
481
|
+
|
|
482
|
+
Tags:
|
|
483
|
+
* xml.xsd.customType=IP6-ADDRESS-STRING
|
|
484
|
+
* xml.xsd.pattern=[0-9A-Fa-f]{1,4}(:[0-9A-Fa-f]{1,4}){7,7}|ANY
|
|
485
|
+
* xml.xsd.type=string
|
|
486
|
+
'''
|
|
487
|
+
def __init__(self):
|
|
488
|
+
super().__init__()
|
|
@@ -3,7 +3,7 @@ from typing import List
|
|
|
3
3
|
from ....M2.MSR.DataDictionary.DataDefProperties import SwDataDefProps
|
|
4
4
|
from ....M2.AUTOSARTemplates.CommonStructure import ValueSpecification
|
|
5
5
|
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
|
|
6
|
-
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import AREnum, ARLiteral, ARNumerical, ARPositiveInteger
|
|
6
|
+
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import AREnum, ARLiteral, ARNumerical, ARPositiveInteger, Boolean
|
|
7
7
|
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARBoolean
|
|
8
8
|
from ....M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import RefType
|
|
9
9
|
from ....M2.AUTOSARTemplates.SWComponentTemplate.PortInterface.InstanceRefs import ApplicationCompositeElementInPortInterfaceInstanceRef
|
|
@@ -175,7 +175,16 @@ class ModeSwitchReceiverComSpec(RPortComSpec):
|
|
|
175
175
|
def __init__(self):
|
|
176
176
|
super().__init__()
|
|
177
177
|
|
|
178
|
+
self.enhancedModeApi = None # type: Boolean
|
|
178
179
|
self.modeGroupRef = None # type: RefType
|
|
180
|
+
self.supportsAsynchronousModeSwitch = None # type: Boolean
|
|
181
|
+
|
|
182
|
+
def getEnhancedModeApi(self):
|
|
183
|
+
return self.enhancedModeApi
|
|
184
|
+
|
|
185
|
+
def setEnhancedModeApi(self, value):
|
|
186
|
+
self.enhancedModeApi = value
|
|
187
|
+
return self
|
|
179
188
|
|
|
180
189
|
def getModeGroupRef(self):
|
|
181
190
|
return self.modeGroupRef
|
|
@@ -183,6 +192,13 @@ class ModeSwitchReceiverComSpec(RPortComSpec):
|
|
|
183
192
|
def setModeGroupRef(self, value):
|
|
184
193
|
self.modeGroupRef = value
|
|
185
194
|
return self
|
|
195
|
+
|
|
196
|
+
def getSupportsAsynchronousModeSwitch(self):
|
|
197
|
+
return self.supportsAsynchronousModeSwitch
|
|
198
|
+
|
|
199
|
+
def setSupportsAsynchronousModeSwitch(self, value):
|
|
200
|
+
self.supportsAsynchronousModeSwitch = value
|
|
201
|
+
return self
|
|
186
202
|
|
|
187
203
|
class NvRequireComSpec(RPortComSpec):
|
|
188
204
|
def __init__(self):
|
|
@@ -34,9 +34,17 @@ class AssemblySwConnector(SwConnector):
|
|
|
34
34
|
def __init__(self, parent: ARObject, short_name: str):
|
|
35
35
|
super().__init__(parent, short_name)
|
|
36
36
|
|
|
37
|
+
self.mappingRef = None # type: RefType
|
|
37
38
|
self.providerIRef = None # type: PPortInCompositionInstanceRef
|
|
38
39
|
self.requesterIRef = None # type: RPortInCompositionInstanceRef
|
|
39
40
|
|
|
41
|
+
def getMappingRef(self):
|
|
42
|
+
return self.mappingRef
|
|
43
|
+
|
|
44
|
+
def setMappingRef(self, value):
|
|
45
|
+
self.mappingRef = value
|
|
46
|
+
return self
|
|
47
|
+
|
|
40
48
|
def getProviderIRef(self) -> PPortInCompositionInstanceRef:
|
|
41
49
|
return self.providerIRef
|
|
42
50
|
|