armodel 1.6.1__py3-none-any.whl → 1.6.3__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 +31 -25
- armodel/cli/arxml_format_cli.py +1 -4
- armodel/cli/connector_update_cli.py +1 -1
- armodel/cli/swc_list_cli.py +1 -1
- armodel/lib/sw_component.py +3 -1
- armodel/lib/system_signal.py +3 -1
- armodel/models/M2/AUTOSARTemplates/AutosarTopLevelStructure.py +123 -0
- armodel/models/{bsw_module_template.py → M2/AUTOSARTemplates/BswModuleTemplate/BswBehavior.py} +115 -140
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswImplementation.py +21 -0
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswInterfaces.py +52 -0
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswOverview.py +78 -0
- armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/__init__.py +1 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/Implementation.py +81 -0
- armodel/models/{m2/autosar_templates/common_structure/implementation_data_types.py → M2/AUTOSARTemplates/CommonStructure/ImplementationDataTypes.py} +20 -10
- armodel/models/M2/AUTOSARTemplates/CommonStructure/InternalBehavior.py +108 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ModeDeclaration.py +96 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ResourceConsumption/MemorySectionUsage.py +72 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/ResourceConsumption/__init__.py +22 -0
- armodel/models/{service_needs.py → M2/AUTOSARTemplates/CommonStructure/ServiceNeeds.py} +7 -7
- armodel/models/M2/AUTOSARTemplates/CommonStructure/SwcBswMapping.py +36 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/SwcInternalBehavior/ModeDeclarationGroup.py +27 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/SwcInternalBehavior/__init__.py +1 -0
- armodel/models/M2/AUTOSARTemplates/CommonStructure/TriggerDeclaration.py +9 -0
- armodel/models/{m2/autosar_templates/common_structure → M2/AUTOSARTemplates/CommonStructure}/__init__.py +5 -2
- armodel/models/{m2/autosar_templates/generic_structure/abstract_structure.py → M2/AUTOSARTemplates/GenericStructure/AbstractStructure.py} +25 -2
- armodel/models/{ar_package.py → M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ARPackage.py} +113 -218
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ArObject.py +16 -0
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ElementCollection.py +1 -0
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/EngineeringObject.py +55 -0
- armodel/models/{general_structure.py → M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/Identifiable.py} +37 -149
- armodel/models/{ar_object.py → M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/PrimitiveTypes.py} +163 -70
- armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/__init__.py +1 -0
- armodel/models/M2/AUTOSARTemplates/GenericStructure/__init__.py +1 -0
- armodel/models/{m2/autosar_templates/sw_component_template/communication.py → M2/AUTOSARTemplates/SWComponentTemplate/Communication.py} +22 -5
- armodel/models/{m2/autosar_templates/sw_component_template/components/instance_refs.py → M2/AUTOSARTemplates/SWComponentTemplate/Components/InstanceRefs.py} +2 -2
- armodel/models/{m2/autosar_templates/sw_component_template/components → M2/AUTOSARTemplates/SWComponentTemplate/Components}/__init__.py +10 -8
- armodel/models/{m2/autosar_templates/sw_component_template/composition/instance_refs.py → M2/AUTOSARTemplates/SWComponentTemplate/Composition/InstanceRefs.py} +2 -2
- armodel/models/{m2/autosar_templates/sw_component_template/composition → M2/AUTOSARTemplates/SWComponentTemplate/Composition}/__init__.py +5 -5
- armodel/models/{m2/autosar_templates/sw_component_template/data_type/data_prototypes.py → M2/AUTOSARTemplates/SWComponentTemplate/Datatype/DataPrototypes.py} +25 -7
- armodel/models/{datatype.py → M2/AUTOSARTemplates/SWComponentTemplate/Datatype/Datatypes.py} +16 -74
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Datatype/__init__.py +1 -0
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/EndToEndProtection.py +177 -0
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcImplementation.py +11 -0
- armodel/models/{m2/autosar_templates/sw_component_template/swc_internal_behavior/access_count.py → M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/AccessCount.py} +2 -2
- armodel/models/{m2/autosar_templates/sw_component_template/swc_internal_behavior/data_elements.py → M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/DataElements.py} +7 -5
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/IncludedDataTypes.py +24 -0
- armodel/models/{m2/autosar_templates/sw_component_template/swc_internal_behavior/instance_refs_usage.py → M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/InstanceRefsUsage.py} +3 -3
- armodel/models/{m2/autosar_templates/sw_component_template/swc_internal_behavior/mode_declaration_group.py → M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ModeDeclarationGroup.py} +3 -3
- armodel/models/{per_instance_memory.py → M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/PerInstanceMemory.py} +5 -6
- armodel/models/{m2/autosar_templates/sw_component_template/swc_internal_behavior/server_call.py → M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ServerCall.py} +3 -3
- armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ServiceMapping.py +23 -0
- armodel/models/{m2/autosar_templates/sw_component_template/swc_internal_behavior/trigger.py → M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/Trigger.py} +2 -2
- armodel/models/{m2/autosar_templates/sw_component_template/swc_internal_behavior → M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior}/__init__.py +9 -10
- armodel/models/{m2/autosar_templates/sw_component_template → M2/AUTOSARTemplates/SWComponentTemplate}/port_interface/__init__.py +12 -8
- armodel/models/{m2/autosar_templates/sw_component_template → M2/AUTOSARTemplates/SWComponentTemplate}/port_interface/instance_refs.py +2 -2
- armodel/models/{m2/autosar_templates/system_template/instance_refs.py → M2/AUTOSARTemplates/SystemTemplate/InstanceRefs.py} +2 -2
- armodel/models/{m2/autosar_templates/system_template → M2/AUTOSARTemplates/SystemTemplate}/__init__.py +4 -2
- armodel/models/{m2/autosar_templates/system_template → M2/AUTOSARTemplates/SystemTemplate}/data_mapping.py +2 -2
- armodel/models/{m2/autosar_templates/system_template → M2/AUTOSARTemplates/SystemTemplate}/network_management.py +7 -3
- armodel/models/{m2/autosar_templates/system_template → M2/AUTOSARTemplates/SystemTemplate}/transport_protocols.py +1 -1
- armodel/models/{m2/autosar_templates → M2/AUTOSARTemplates}/ecuc_description_template.py +10 -6
- armodel/models/M2/MSR/AsamHdo/AdminData.py +21 -0
- armodel/models/M2/MSR/AsamHdo/BaseTypes.py +77 -0
- armodel/models/{m2_msr.py → M2/MSR/AsamHdo/ComputationMethod.py} +44 -28
- armodel/models/{global_constraints.py → M2/MSR/AsamHdo/Constraints/GlobalConstraints.py} +7 -4
- armodel/models/M2/MSR/AsamHdo/Constraints/__init__.py +1 -0
- armodel/models/M2/MSR/AsamHdo/SpecialData.py +63 -0
- armodel/models/{m2/msr/asam_hdo/units.py → M2/MSR/AsamHdo/Units.py} +6 -3
- armodel/models/M2/MSR/AsamHdo/__init__.py +1 -0
- armodel/models/M2/MSR/CalibrationData/CalibrationValue.py +30 -0
- armodel/models/M2/MSR/CalibrationData/__init__.py +1 -0
- armodel/models/{m2/msr/data_dictionary/auxillary_objects.py → M2/MSR/DataDictionary/AuxillaryObjects.py} +4 -2
- armodel/models/M2/MSR/DataDictionary/Axis.py +145 -0
- armodel/models/M2/MSR/DataDictionary/CalibrationParameter.py +37 -0
- armodel/models/{m2/msr/data_dictionary/data_def_properties.py → M2/MSR/DataDictionary/DataDefProperties.py} +19 -9
- armodel/models/{record_layout.py → M2/MSR/DataDictionary/RecordLayout.py} +26 -25
- armodel/models/M2/MSR/DataDictionary/__init__.py +1 -0
- armodel/models/{annotation.py → M2/MSR/Documentation/Annotation.py} +8 -8
- armodel/models/{m2/msr/documentation/block_elements.py → M2/MSR/Documentation/BlockElements.py} +2 -2
- armodel/models/M2/MSR/Documentation/TextModel/LanguageDataModel.py +17 -0
- armodel/models/{multilanguage_data.py → M2/MSR/Documentation/TextModel/MultilanguageData.py} +21 -30
- armodel/models/M2/MSR/Documentation/TextModel/__init__.py +2 -0
- armodel/models/M2/MSR/Documentation/__init__.py +3 -0
- armodel/models/M2/MSR/__init__.py +1 -0
- armodel/models/M2/__init__.py +1 -0
- armodel/models/__init__.py +6 -23
- armodel/models/fibex/can_communication.py +3 -2
- armodel/models/fibex/fibex_4_multiplatform.py +5 -3
- armodel/models/fibex/fibex_core/core_communication.py +9 -3
- armodel/models/fibex/fibex_core/core_topology.py +7 -3
- armodel/models/fibex/lin_communication.py +5 -1
- armodel/models/rpt_scenario.py +2 -2
- armodel/models/sw_component.py +19 -14
- armodel/models/timing.py +3 -3
- armodel/parser/abstract_arxml_parser.py +8 -4
- armodel/parser/arxml_parser.py +120 -86
- armodel/parser/connector_xlsx_parser.py +6 -2
- armodel/report/connector_xls_report.py +2 -1
- armodel/tests/test_armodel/models/test_ar_object.py +2 -1
- armodel/tests/test_armodel/models/test_ar_package.py +20 -8
- armodel/tests/test_armodel/models/test_ar_ref.py +7 -5
- armodel/tests/test_armodel/models/test_bsw_module_template.py +5 -1
- armodel/tests/test_armodel/models/test_common_structure.py +11 -5
- armodel/tests/test_armodel/models/test_data_dictionary.py +2 -2
- armodel/tests/test_armodel/models/test_data_prototype.py +7 -3
- armodel/tests/test_armodel/models/test_datatype.py +22 -8
- armodel/tests/test_armodel/models/test_general_structure.py +12 -2
- armodel/tests/test_armodel/models/test_implementation.py +3 -2
- armodel/tests/test_armodel/models/test_m2_msr.py +4 -2
- armodel/tests/test_armodel/models/test_port_interface.py +16 -6
- armodel/tests/test_armodel/models/test_port_prototype.py +1 -1
- armodel/tests/test_armodel/parser/test_parse_bswmd.py +3 -1
- armodel/tests/test_armodel/parser/test_sw_components.py +2 -2
- armodel/tests/test_armodel/parser/test_system.py +30 -0
- armodel/writer/abstract_arxml_writer.py +5 -2
- armodel/writer/arxml_writer.py +100 -67
- {armodel-1.6.1.dist-info → armodel-1.6.3.dist-info}/METADATA +366 -356
- armodel-1.6.3.dist-info/RECORD +148 -0
- {armodel-1.6.1.dist-info → armodel-1.6.3.dist-info}/WHEEL +1 -1
- armodel/lib/data_analyzer.py +0 -34
- armodel/models/ar_ref.py +0 -25
- armodel/models/calibration.py +0 -119
- armodel/models/common_structure.py +0 -272
- armodel/models/communication.py +0 -17
- armodel/models/data_def_properties.py +0 -16
- armodel/models/data_dictionary.py +0 -59
- armodel/models/data_prototype.py +0 -103
- armodel/models/ecuc_parameter_def_template.py +0 -0
- armodel/models/end_to_end_protection.py +0 -67
- armodel/models/fibex/fibex_core.py +0 -341
- armodel/models/fibex/lin_topology.py +0 -7
- armodel/models/implementation.py +0 -135
- armodel/models/internal_behavior.py +0 -63
- armodel/models/m2/autosar_templates/common_structure/constants.py +0 -0
- armodel/models/m2/autosar_templates/common_structure/implementation.py +0 -21
- armodel/models/m2/autosar_templates/generic_structure/__init__.py +0 -0
- armodel/models/m2/autosar_templates/sw_component_template/__init__.py +0 -0
- armodel/models/m2/autosar_templates/sw_component_template/data_type/__init__.py +0 -0
- armodel/models/m2/autosar_templates/sw_component_template/port_interface.py +0 -236
- armodel/models/m2/msr/__init__.py +0 -0
- armodel/models/m2/msr/asam_hdo/__init__.py +0 -0
- armodel/models/m2/msr/data_dictionary/__init__.py +0 -0
- armodel/models/m2/msr/documentation/__init__.py +0 -0
- armodel/models/mode_declaration.py +0 -8
- armodel/models/port_interface.py +0 -165
- armodel/models/port_prototype.py +0 -6
- armodel/models/service_mapping.py +0 -11
- armodel/models/system_template/__init__.py +0 -0
- armodel/models/system_template/network_management.py +0 -7
- armodel/models/system_template/transport_protocols.py +0 -7
- armodel/models/unit.py +0 -14
- armodel-1.6.1.dist-info/RECORD +0 -140
- /armodel/models/{m2 → M2/AUTOSARTemplates/SWComponentTemplate}/__init__.py +0 -0
- /armodel/models/{m2/autosar_templates → M2/AUTOSARTemplates}/__init__.py +0 -0
- {armodel-1.6.1.dist-info → armodel-1.6.3.dist-info}/LICENSE +0 -0
- {armodel-1.6.1.dist-info → armodel-1.6.3.dist-info}/entry_points.txt +0 -0
- {armodel-1.6.1.dist-info → armodel-1.6.3.dist-info}/top_level.txt +0 -0
armodel/models/implementation.py
DELETED
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
from abc import ABCMeta
|
|
2
|
-
from typing import List
|
|
3
|
-
from .ar_object import ARLiteral, ARNumerical, ARObject
|
|
4
|
-
from .general_structure import PackageableElement, Identifiable
|
|
5
|
-
from .common_structure import ResourceConsumption
|
|
6
|
-
from .ar_ref import RefType
|
|
7
|
-
|
|
8
|
-
class EngineeringObject(ARObject, metaclass=ABCMeta):
|
|
9
|
-
def __init__(self):
|
|
10
|
-
if type(self) == EngineeringObject:
|
|
11
|
-
raise NotImplementedError("EngineeringObject is an abstract class.")
|
|
12
|
-
|
|
13
|
-
super().__init__()
|
|
14
|
-
|
|
15
|
-
self.category = None # type: ARLiteral
|
|
16
|
-
self.domain = None # type: ARLiteral
|
|
17
|
-
self.revision_label = None # type: ARLiteral
|
|
18
|
-
self.short_label = None # type: ARLiteral
|
|
19
|
-
|
|
20
|
-
def setCategory(self, category: any):
|
|
21
|
-
if isinstance(category, ARLiteral):
|
|
22
|
-
self.category = category
|
|
23
|
-
else:
|
|
24
|
-
self.category = ARLiteral()
|
|
25
|
-
self.category.setValue(str(category))
|
|
26
|
-
return self
|
|
27
|
-
|
|
28
|
-
def getCategory(self) -> ARLiteral:
|
|
29
|
-
return self.category
|
|
30
|
-
|
|
31
|
-
def setDomain(self, domain: ARLiteral):
|
|
32
|
-
self.domain = domain
|
|
33
|
-
return self
|
|
34
|
-
|
|
35
|
-
def getDomain(self) -> ARLiteral:
|
|
36
|
-
return self.domain
|
|
37
|
-
|
|
38
|
-
def setRevisionLabel(self, revision_label: ARLiteral):
|
|
39
|
-
self.revision_label = revision_label
|
|
40
|
-
return self
|
|
41
|
-
|
|
42
|
-
def getRevisionLabel(self) -> ARLiteral:
|
|
43
|
-
return self.revision_label
|
|
44
|
-
|
|
45
|
-
def setShortLabel(self, label: ARLiteral):
|
|
46
|
-
self.short_label = label
|
|
47
|
-
return self
|
|
48
|
-
|
|
49
|
-
def getShortLabel(self) -> ARLiteral:
|
|
50
|
-
return self.short_label
|
|
51
|
-
|
|
52
|
-
class AutosarEngineeringObject(EngineeringObject):
|
|
53
|
-
def __init__(self):
|
|
54
|
-
super().__init__()
|
|
55
|
-
|
|
56
|
-
class Code(Identifiable):
|
|
57
|
-
def __init__(self, parent: ARObject, short_name: str):
|
|
58
|
-
super().__init__(parent, short_name)
|
|
59
|
-
|
|
60
|
-
self._artifactDescriptors = [] # type: List[AutosarEngineeringObject]
|
|
61
|
-
self.callbackHeaderRefs = [] # type: List[RefType]
|
|
62
|
-
|
|
63
|
-
def addArtifactDescriptor(self, desc: AutosarEngineeringObject):
|
|
64
|
-
self._artifactDescriptors.append(desc)
|
|
65
|
-
|
|
66
|
-
def getArtifactDescriptors(self, category:str = "") -> List[AutosarEngineeringObject]:
|
|
67
|
-
if (category == ""):
|
|
68
|
-
return self._artifactDescriptors
|
|
69
|
-
else:
|
|
70
|
-
return list(filter(lambda a: a.getCategory().getText() == category, self._artifactDescriptors))
|
|
71
|
-
|
|
72
|
-
class Implementation(PackageableElement, metaclass=ABCMeta):
|
|
73
|
-
def __init__(self, parent: ARObject, short_name: str) -> None:
|
|
74
|
-
if type(self) == Implementation:
|
|
75
|
-
raise NotImplementedError("Implementation is an abstract class.")
|
|
76
|
-
|
|
77
|
-
super().__init__(parent, short_name)
|
|
78
|
-
|
|
79
|
-
self.build_action_manifest_ref = None # type: RefType
|
|
80
|
-
self.compilers = None
|
|
81
|
-
self.generated_artifacts = None
|
|
82
|
-
self.hw_element_refs = [] # type: List[RefType]
|
|
83
|
-
self.linker = []
|
|
84
|
-
self.mc_support = None
|
|
85
|
-
self.programming_language = None # type: ARLiteral
|
|
86
|
-
self.required_artifacts = []
|
|
87
|
-
self.required_generator_tools = []
|
|
88
|
-
self.resource_consumption = None # type: ResourceConsumption
|
|
89
|
-
self.sw_version = "" # type: ARLiteral
|
|
90
|
-
self.swc_bsw_mapping_ref = None # type: RefType
|
|
91
|
-
self.used_code_generator = None # type: ARLiteral
|
|
92
|
-
self.vendor_id = 0 # type: ARNumerical
|
|
93
|
-
|
|
94
|
-
def createCodeDescriptor(self, short_name: str) -> Code:
|
|
95
|
-
if (short_name not in self.elements):
|
|
96
|
-
sw_component = Code(self, short_name)
|
|
97
|
-
self.elements[short_name] = sw_component
|
|
98
|
-
return self.elements[short_name]
|
|
99
|
-
|
|
100
|
-
def getCodeDescriptors(self)-> List[Code]:
|
|
101
|
-
return list(filter(lambda a : isinstance(a, Code), self.elements.values()))
|
|
102
|
-
|
|
103
|
-
def setResourceConsumption(self, consumption: ResourceConsumption):
|
|
104
|
-
self.elements[consumption.short_name] = consumption
|
|
105
|
-
self.resource_consumption = consumption
|
|
106
|
-
return self
|
|
107
|
-
|
|
108
|
-
def getResourceConsumption(self) -> ResourceConsumption:
|
|
109
|
-
return self.resource_consumption
|
|
110
|
-
|
|
111
|
-
class BswImplementation(Implementation):
|
|
112
|
-
def __init__(self, parent: ARObject, short_name: str) -> None:
|
|
113
|
-
super().__init__(parent, short_name)
|
|
114
|
-
|
|
115
|
-
self.ar_release_version = None # type: ARLiteral
|
|
116
|
-
self.behavior_ref = None # type: RefType
|
|
117
|
-
self.preconfiguredConfigurationRef = [] # type: List[RefType]
|
|
118
|
-
self.recommendedConfigurationRef = [] # type: List[RefType]
|
|
119
|
-
self.vendorApiInfix = None # type: str
|
|
120
|
-
self._vendorSpecificModuleDefRef = [] # type: List[RefType]
|
|
121
|
-
|
|
122
|
-
def addVendorSpecificModuleDefRef(self, ref: RefType):
|
|
123
|
-
self._vendorSpecificModuleDefRef.append(ref)
|
|
124
|
-
|
|
125
|
-
def getVendorSpecificModuleDefRefs(self):
|
|
126
|
-
return self._vendorSpecificModuleDefRef
|
|
127
|
-
|
|
128
|
-
class SwcImplementation(Implementation):
|
|
129
|
-
def __init__(self, parent: ARObject, short_name: str) -> None:
|
|
130
|
-
super().__init__(parent, short_name)
|
|
131
|
-
|
|
132
|
-
self.behavior_ref = None # type: RefType
|
|
133
|
-
self.per_instance_memory_size = None
|
|
134
|
-
self.required_rte_vendor = ""
|
|
135
|
-
|
|
@@ -1,63 +0,0 @@
|
|
|
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 .m2.autosar_templates.sw_component_template.data_type.data_prototypes 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
|
|
File without changes
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
from abc import ABCMeta
|
|
2
|
-
|
|
3
|
-
from ....ar_object import ARLiteral, ARObject
|
|
4
|
-
from ....general_structure import Referrable
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class ImplementationProps(Referrable, metaclass = ABCMeta):
|
|
8
|
-
def __init__(self, parent: ARObject, short_name: str):
|
|
9
|
-
if type(self) == ImplementationProps:
|
|
10
|
-
raise NotImplementedError("ImplementationProps is an abstract class.")
|
|
11
|
-
|
|
12
|
-
super().__init__(parent, short_name)
|
|
13
|
-
|
|
14
|
-
self.symbol = None # type: ARLiteral
|
|
15
|
-
|
|
16
|
-
def getSymbol(self):
|
|
17
|
-
return self.symbol
|
|
18
|
-
|
|
19
|
-
def setSymbol(self, value):
|
|
20
|
-
self.symbol = value
|
|
21
|
-
return self
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
from abc import ABCMeta
|
|
2
|
-
from typing import List
|
|
3
|
-
|
|
4
|
-
from ....ar_object import ARBoolean, ARLiteral, ARNumerical
|
|
5
|
-
from ....common_structure import ModeDeclarationGroupPrototype, Trigger
|
|
6
|
-
from ....datatype import AtpType
|
|
7
|
-
from ....general_structure import ARObject, Identifiable, AtpFeature
|
|
8
|
-
from ....data_prototype import ParameterDataPrototype, VariableDataPrototype, AutosarDataPrototype
|
|
9
|
-
from ....ar_ref import RefType
|
|
10
|
-
|
|
11
|
-
class PortInterface(AtpType, metaclass = ABCMeta):
|
|
12
|
-
def __init__(self, parent: ARObject, short_name: str):
|
|
13
|
-
if type(self) == PortInterface:
|
|
14
|
-
raise NotImplementedError("PortInterface is an abstract class.")
|
|
15
|
-
super().__init__(parent, short_name)
|
|
16
|
-
|
|
17
|
-
self.isService = None # type: ARBoolean
|
|
18
|
-
self.serviceKind = None # type: ARLiteral
|
|
19
|
-
|
|
20
|
-
def getIsService(self):
|
|
21
|
-
return self.isService
|
|
22
|
-
|
|
23
|
-
def setIsService(self, value):
|
|
24
|
-
self.isService = value
|
|
25
|
-
return self
|
|
26
|
-
|
|
27
|
-
def getServiceKind(self):
|
|
28
|
-
return self.serviceKind
|
|
29
|
-
|
|
30
|
-
def setServiceKind(self, value):
|
|
31
|
-
self.serviceKind = value
|
|
32
|
-
return self
|
|
33
|
-
|
|
34
|
-
class DataInterface(PortInterface, metaclass = ABCMeta):
|
|
35
|
-
def __init__(self, parent: ARObject, short_name: str):
|
|
36
|
-
if type(self) == DataInterface:
|
|
37
|
-
raise NotImplementedError("DataInterface is an abstract class.")
|
|
38
|
-
super().__init__(parent, short_name)
|
|
39
|
-
|
|
40
|
-
class NvDataInterface(DataInterface):
|
|
41
|
-
def __init__(self, parent: ARObject, short_name: str):
|
|
42
|
-
super().__init__(parent, short_name)
|
|
43
|
-
|
|
44
|
-
self.nvDatas = [] # type: List[VariableDataPrototype]
|
|
45
|
-
|
|
46
|
-
def getNvDatas(self):
|
|
47
|
-
return self.nvDatas
|
|
48
|
-
|
|
49
|
-
def setNvData(self, value):
|
|
50
|
-
self.nvDatas.append(value)
|
|
51
|
-
return self
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
class ParameterInterface(DataInterface):
|
|
55
|
-
def __init__(self, parent: ARObject, short_name: str):
|
|
56
|
-
super().__init__(parent, short_name)
|
|
57
|
-
|
|
58
|
-
self.parameters = [] # type: List[ParameterDataPrototype]
|
|
59
|
-
|
|
60
|
-
def getParameters(self):
|
|
61
|
-
return self.parameters
|
|
62
|
-
|
|
63
|
-
def addParameter(self, value):
|
|
64
|
-
self.parameters.append(value)
|
|
65
|
-
return self
|
|
66
|
-
|
|
67
|
-
class InvalidationPolicy(ARObject):
|
|
68
|
-
def __init__(self):
|
|
69
|
-
super().__init__()
|
|
70
|
-
|
|
71
|
-
self.dataElementRef = None # type: RefType
|
|
72
|
-
self.handleInvalid = None # type: ARLiteral
|
|
73
|
-
|
|
74
|
-
def getDataElementRef(self):
|
|
75
|
-
return self.dataElementRef
|
|
76
|
-
|
|
77
|
-
def setDataElementRef(self, value):
|
|
78
|
-
self.dataElementRef = value
|
|
79
|
-
return self
|
|
80
|
-
|
|
81
|
-
def getHandleInvalid(self):
|
|
82
|
-
return self.handleInvalid
|
|
83
|
-
|
|
84
|
-
def setHandleInvalid(self, value):
|
|
85
|
-
self.handleInvalid = value
|
|
86
|
-
return self
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
class SenderReceiverInterface(DataInterface):
|
|
91
|
-
def __init__(self, parent: ARObject, short_name: str):
|
|
92
|
-
super().__init__(parent, short_name)
|
|
93
|
-
|
|
94
|
-
self.invalidationPolicies = [] # type: List[InvalidationPolicy]
|
|
95
|
-
self.metaDataItemSets = [] # type: List[MetaDataItemSet]
|
|
96
|
-
|
|
97
|
-
def getInvalidationPolicies(self):
|
|
98
|
-
return self.invalidationPolicies
|
|
99
|
-
|
|
100
|
-
def addInvalidationPolicy(self, value):
|
|
101
|
-
self.invalidationPolicies.append(value)
|
|
102
|
-
return self
|
|
103
|
-
|
|
104
|
-
def getMetaDataItemSets(self):
|
|
105
|
-
return self.metaDataItemSets
|
|
106
|
-
|
|
107
|
-
def addMetaDataItemSet(self, value):
|
|
108
|
-
self.metaDataItemSets.append(value)
|
|
109
|
-
return self
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
def createDataElement(self, short_name) -> VariableDataPrototype:
|
|
113
|
-
if (short_name not in self.elements):
|
|
114
|
-
data_element = VariableDataPrototype(self, short_name)
|
|
115
|
-
self.elements[short_name] = data_element
|
|
116
|
-
return self.elements[short_name]
|
|
117
|
-
|
|
118
|
-
def getDataElements(self) -> List[VariableDataPrototype]:
|
|
119
|
-
return list(filter(lambda c: isinstance(c, VariableDataPrototype), self.elements.values()))
|
|
120
|
-
|
|
121
|
-
def getDataElement(self, short_name) -> VariableDataPrototype:
|
|
122
|
-
if (short_name in self.elements):
|
|
123
|
-
data_element = self.elements[short_name]
|
|
124
|
-
#if (not isinstance(data_element, VariableDataPrototype)):
|
|
125
|
-
# raise IndexError("%s is not data element." % short_name)
|
|
126
|
-
return data_element
|
|
127
|
-
raise IndexError("data element <%s> can not be found." % short_name)
|
|
128
|
-
|
|
129
|
-
class ArgumentDataPrototype(AutosarDataPrototype):
|
|
130
|
-
def __init__(self, parent: ARObject, short_name: str):
|
|
131
|
-
super().__init__(parent, short_name)
|
|
132
|
-
self.direction = ""
|
|
133
|
-
self.server_argument_impl_policy = ""
|
|
134
|
-
|
|
135
|
-
class ApplicationError(Identifiable):
|
|
136
|
-
def __init__(self, parent: ARObject, short_name: str):
|
|
137
|
-
super().__init__(parent, short_name)
|
|
138
|
-
|
|
139
|
-
self.error_code = None # type: ARNumerical
|
|
140
|
-
|
|
141
|
-
class ClientServerOperation(AtpFeature):
|
|
142
|
-
"""
|
|
143
|
-
An operation declared within the scope of a client/server interface.
|
|
144
|
-
Package: M2::AUTOSARTemplates::SWComponentTemplate::PortInterface
|
|
145
|
-
Base: ARObject, AtpClassifier , AtpFeature, AtpStructureElement, Identifiable, MultilanguageReferrable, Referrable
|
|
146
|
-
|
|
147
|
-
Attributes:
|
|
148
|
-
-----------
|
|
149
|
-
_argument: ArgumentDataPrototype (optional)
|
|
150
|
-
An argument of this ClientServerOperation
|
|
151
|
-
|
|
152
|
-
_possibleError: RefType -> ApplicationError (optional)
|
|
153
|
-
Possible errors that may by raised by the referring operation
|
|
154
|
-
|
|
155
|
-
Methods:
|
|
156
|
-
--------
|
|
157
|
-
addArgumentDataPrototype add the argument
|
|
158
|
-
getArgumentDataPrototypes get the arguments
|
|
159
|
-
addPossibleErrorRef add the possible error
|
|
160
|
-
getPossbileErrorRefs get the possible errors
|
|
161
|
-
|
|
162
|
-
"""
|
|
163
|
-
def __init__(self, parent: ARObject, short_name: str):
|
|
164
|
-
super().__init__(parent, short_name)
|
|
165
|
-
|
|
166
|
-
self._arguments = []
|
|
167
|
-
self._possible_error_refs = [] # type: List[RefType]
|
|
168
|
-
|
|
169
|
-
def addArgumentDataPrototype(self, prototype: ArgumentDataPrototype):
|
|
170
|
-
self._arguments.append(prototype)
|
|
171
|
-
|
|
172
|
-
def getArgumentDataPrototypes(self) -> List[ArgumentDataPrototype]:
|
|
173
|
-
return self._arguments
|
|
174
|
-
|
|
175
|
-
def addPossibleErrorRef(self, possible_error_ref: RefType):
|
|
176
|
-
self._possible_error_refs.append(possible_error_ref)
|
|
177
|
-
|
|
178
|
-
def getPossbileErrorRefs(self) -> List[RefType]:
|
|
179
|
-
return self._possible_error_refs
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
class ClientServerInterface(PortInterface):
|
|
183
|
-
"""
|
|
184
|
-
A client/server interface declares a number of operations that can be invoked on a server by a client.
|
|
185
|
-
Package: M2::AUTOSARTemplates::SWComponentTemplate::PortInterface
|
|
186
|
-
Base: ARElement, ARObject, AtpBlueprint, AtpBlueprintable, AtpClassifier , AtpType, CollectableElement, Identifiable, MultilanguageReferrable, PackageableElement, PortInterface, Referrable
|
|
187
|
-
|
|
188
|
-
Methods:
|
|
189
|
-
--------
|
|
190
|
-
createOperation create ClientServerOperation(s) of this ClientServerInterface.
|
|
191
|
-
createApplicationError create Application errors that are defined as part of this interface
|
|
192
|
-
getOperations get all ClientServerOperation(s) of this ClientServerInterface
|
|
193
|
-
getPossibleErrors get all Application error(s) of this ClientServerInterface
|
|
194
|
-
|
|
195
|
-
"""
|
|
196
|
-
def __init__(self, parent: ARObject, short_name: str):
|
|
197
|
-
super().__init__(parent, short_name)
|
|
198
|
-
|
|
199
|
-
def createOperation(self, short_name: str) -> ClientServerOperation:
|
|
200
|
-
if (short_name not in self.elements):
|
|
201
|
-
operation = ClientServerOperation(self, short_name)
|
|
202
|
-
self.elements[short_name] = operation
|
|
203
|
-
return self.elements[short_name]
|
|
204
|
-
|
|
205
|
-
def createApplicationError(self, short_name: str) -> ApplicationError:
|
|
206
|
-
if (short_name not in self.elements):
|
|
207
|
-
error = ApplicationError(self, short_name)
|
|
208
|
-
self.elements[short_name] = error
|
|
209
|
-
return self.elements[short_name]
|
|
210
|
-
|
|
211
|
-
def getOperations(self) -> List[ClientServerOperation]:
|
|
212
|
-
return list(filter(lambda c: isinstance(c, ClientServerOperation), self.elements.values()))
|
|
213
|
-
|
|
214
|
-
def getPossibleErrors(self) -> List[ApplicationError]:
|
|
215
|
-
return list(filter(lambda c: isinstance(c, ApplicationError), self.elements.values()))
|
|
216
|
-
|
|
217
|
-
class TriggerInterface(PortInterface):
|
|
218
|
-
def __init__(self, parent: ARObject, short_name: str):
|
|
219
|
-
super().__init__(parent, short_name)
|
|
220
|
-
|
|
221
|
-
self._triggers = [] # type: Trigger
|
|
222
|
-
|
|
223
|
-
class ModeSwitchInterface(PortInterface):
|
|
224
|
-
def __init__(self, parent: ARObject, short_name: str):
|
|
225
|
-
super().__init__(parent, short_name)
|
|
226
|
-
|
|
227
|
-
self._modeGroup = [] # type: List[ModeDeclarationGroupPrototype]
|
|
228
|
-
|
|
229
|
-
def createModeGroup(self, short_name: str) -> ModeDeclarationGroupPrototype:
|
|
230
|
-
prototype = ModeDeclarationGroupPrototype(self, short_name)
|
|
231
|
-
if (short_name not in self.elements):
|
|
232
|
-
self.elements[short_name] = prototype
|
|
233
|
-
return self.elements[short_name]
|
|
234
|
-
|
|
235
|
-
def getModeGroups(self) -> List[ModeDeclarationGroupPrototype]:
|
|
236
|
-
return list(sorted(filter(lambda c: isinstance(c, ModeDeclarationGroupPrototype), self.elements.values()), key= lambda o: o.short_name))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
armodel/models/port_interface.py
DELETED
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
from abc import ABCMeta
|
|
2
|
-
from typing import List
|
|
3
|
-
|
|
4
|
-
from .ar_object import ARBoolean, ARLiteral, ARNumerical
|
|
5
|
-
from .common_structure import ModeDeclarationGroupPrototype, Trigger
|
|
6
|
-
from .datatype import AtpType
|
|
7
|
-
from .general_structure import ARObject, Identifiable, AtpFeature
|
|
8
|
-
from .data_prototype import VariableDataPrototype, AutosarDataPrototype
|
|
9
|
-
from .ar_ref import RefType
|
|
10
|
-
|
|
11
|
-
class PortInterface(AtpType, metaclass = ABCMeta):
|
|
12
|
-
def __init__(self, parent: ARObject, short_name: str):
|
|
13
|
-
if type(self) == PortInterface:
|
|
14
|
-
raise NotImplementedError("PortInterface is an abstract class.")
|
|
15
|
-
super().__init__(parent, short_name)
|
|
16
|
-
|
|
17
|
-
self.is_service = None # type: ARBoolean
|
|
18
|
-
self.serviceKind = None # type: ARLiteral
|
|
19
|
-
|
|
20
|
-
class DataInterface(PortInterface, metaclass=ABCMeta):
|
|
21
|
-
def __init__(self, parent: ARObject, short_name: str):
|
|
22
|
-
if type(self) == DataInterface:
|
|
23
|
-
raise NotImplementedError("DataInterface is an abstract class.")
|
|
24
|
-
super().__init__(parent, short_name)
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
class NvDataInterface(DataInterface):
|
|
28
|
-
def __init__(self, parent: ARObject, short_name: str):
|
|
29
|
-
super().__init__(parent, short_name)
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
class ParameterInterface(DataInterface):
|
|
33
|
-
def __init__(self, parent: ARObject, short_name: str):
|
|
34
|
-
super().__init__(parent, short_name)
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
class SenderReceiverInterface(DataInterface):
|
|
38
|
-
def __init__(self, parent: ARObject, short_name: str):
|
|
39
|
-
super().__init__(parent, short_name)
|
|
40
|
-
|
|
41
|
-
def createDataElement(self, short_name) -> VariableDataPrototype:
|
|
42
|
-
if (short_name not in self.elements):
|
|
43
|
-
data_element = VariableDataPrototype(self, short_name)
|
|
44
|
-
self.elements[short_name] = data_element
|
|
45
|
-
return self.elements[short_name]
|
|
46
|
-
|
|
47
|
-
def getDataElements(self) -> List[VariableDataPrototype]:
|
|
48
|
-
return list(filter(lambda c: isinstance(c, VariableDataPrototype), self.elements.values()))
|
|
49
|
-
|
|
50
|
-
def getDataElement(self, short_name) -> VariableDataPrototype:
|
|
51
|
-
if (short_name in self.elements):
|
|
52
|
-
data_element = self.elements[short_name]
|
|
53
|
-
#if (not isinstance(data_element, VariableDataPrototype)):
|
|
54
|
-
# raise IndexError("%s is not data element." % short_name)
|
|
55
|
-
return data_element
|
|
56
|
-
raise IndexError("data element <%s> can not be found." % short_name)
|
|
57
|
-
|
|
58
|
-
class ArgumentDataPrototype(AutosarDataPrototype):
|
|
59
|
-
def __init__(self, parent: ARObject, short_name: str):
|
|
60
|
-
super().__init__(parent, short_name)
|
|
61
|
-
self.direction = ""
|
|
62
|
-
self.server_argument_impl_policy = ""
|
|
63
|
-
|
|
64
|
-
class ApplicationError(Identifiable):
|
|
65
|
-
def __init__(self, parent: ARObject, short_name: str):
|
|
66
|
-
super().__init__(parent, short_name)
|
|
67
|
-
|
|
68
|
-
self.error_code = None # type: ARNumerical
|
|
69
|
-
|
|
70
|
-
class ClientServerOperation(AtpFeature):
|
|
71
|
-
"""
|
|
72
|
-
An operation declared within the scope of a client/server interface.
|
|
73
|
-
Package: M2::AUTOSARTemplates::SWComponentTemplate::PortInterface
|
|
74
|
-
Base: ARObject, AtpClassifier , AtpFeature, AtpStructureElement, Identifiable, MultilanguageReferrable, Referrable
|
|
75
|
-
|
|
76
|
-
Attributes:
|
|
77
|
-
-----------
|
|
78
|
-
_argument: ArgumentDataPrototype (optional)
|
|
79
|
-
An argument of this ClientServerOperation
|
|
80
|
-
|
|
81
|
-
_possibleError: RefType -> ApplicationError (optional)
|
|
82
|
-
Possible errors that may by raised by the referring operation
|
|
83
|
-
|
|
84
|
-
Methods:
|
|
85
|
-
--------
|
|
86
|
-
addArgumentDataPrototype add the argument
|
|
87
|
-
getArgumentDataPrototypes get the arguments
|
|
88
|
-
addPossibleErrorRef add the possible error
|
|
89
|
-
getPossbileErrorRefs get the possible errors
|
|
90
|
-
|
|
91
|
-
"""
|
|
92
|
-
def __init__(self, parent: ARObject, short_name: str):
|
|
93
|
-
super().__init__(parent, short_name)
|
|
94
|
-
|
|
95
|
-
self._arguments = []
|
|
96
|
-
self._possible_error_refs = [] # type: List[RefType]
|
|
97
|
-
|
|
98
|
-
def addArgumentDataPrototype(self, prototype: ArgumentDataPrototype):
|
|
99
|
-
self._arguments.append(prototype)
|
|
100
|
-
|
|
101
|
-
def getArgumentDataPrototypes(self) -> List[ArgumentDataPrototype]:
|
|
102
|
-
return self._arguments
|
|
103
|
-
|
|
104
|
-
def addPossibleErrorRef(self, possible_error_ref: RefType):
|
|
105
|
-
self._possible_error_refs.append(possible_error_ref)
|
|
106
|
-
|
|
107
|
-
def getPossbileErrorRefs(self) -> List[RefType]:
|
|
108
|
-
return self._possible_error_refs
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
class ClientServerInterface(PortInterface):
|
|
112
|
-
"""
|
|
113
|
-
A client/server interface declares a number of operations that can be invoked on a server by a client.
|
|
114
|
-
Package: M2::AUTOSARTemplates::SWComponentTemplate::PortInterface
|
|
115
|
-
Base: ARElement, ARObject, AtpBlueprint, AtpBlueprintable, AtpClassifier , AtpType, CollectableElement, Identifiable, MultilanguageReferrable, PackageableElement, PortInterface, Referrable
|
|
116
|
-
|
|
117
|
-
Methods:
|
|
118
|
-
--------
|
|
119
|
-
createOperation create ClientServerOperation(s) of this ClientServerInterface.
|
|
120
|
-
createApplicationError create Application errors that are defined as part of this interface
|
|
121
|
-
getOperations get all ClientServerOperation(s) of this ClientServerInterface
|
|
122
|
-
getPossibleErrors get all Application error(s) of this ClientServerInterface
|
|
123
|
-
|
|
124
|
-
"""
|
|
125
|
-
def __init__(self, parent: ARObject, short_name: str):
|
|
126
|
-
super().__init__(parent, short_name)
|
|
127
|
-
|
|
128
|
-
def createOperation(self, short_name: str) -> ClientServerOperation:
|
|
129
|
-
if (short_name not in self.elements):
|
|
130
|
-
operation = ClientServerOperation(self, short_name)
|
|
131
|
-
self.elements[short_name] = operation
|
|
132
|
-
return self.elements[short_name]
|
|
133
|
-
|
|
134
|
-
def createApplicationError(self, short_name: str) -> ApplicationError:
|
|
135
|
-
if (short_name not in self.elements):
|
|
136
|
-
error = ApplicationError(self, short_name)
|
|
137
|
-
self.elements[short_name] = error
|
|
138
|
-
return self.elements[short_name]
|
|
139
|
-
|
|
140
|
-
def getOperations(self) -> List[ClientServerOperation]:
|
|
141
|
-
return list(filter(lambda c: isinstance(c, ClientServerOperation), self.elements.values()))
|
|
142
|
-
|
|
143
|
-
def getPossibleErrors(self) -> List[ApplicationError]:
|
|
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))
|
armodel/models/port_prototype.py
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
from typing import List
|
|
2
|
-
|
|
3
|
-
from .m2.autosar_templates.sw_component_template.communication import ClientComSpec, ModeSwitchReceiverComSpec, ModeSwitchSenderComSpec, NonqueuedReceiverComSpec, NonqueuedSenderComSpec, PPortComSpec, ParameterRequireComSpec, QueuedReceiverComSpec, QueuedSenderComSpec, RPortComSpec, ServerComSpec
|
|
4
|
-
from .general_structure import ARObject, Identifiable
|
|
5
|
-
from .ar_ref import TRefType
|
|
6
|
-
|
|
File without changes
|