MTPPy2.0 0.1.5__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.
- examples/__init__.py +0 -0
- examples/minimal+pid.py +82 -0
- examples/minimal.py +32 -0
- examples/minimal_recipe.py +117 -0
- examples/pea_alarm_base.py +47 -0
- examples/pea_minimal.py +258 -0
- mtppy/__init__.py +1 -0
- mtppy/part1/__init__.py +4 -0
- mtppy/part1/empty_folder_test.py +7 -0
- mtppy/part3/__init__.py +4 -0
- mtppy/part3/data_assembly_set/__init__.py +4 -0
- mtppy/part3/data_assembly_set/active_elements/__init__.py +4 -0
- mtppy/part3/data_assembly_set/active_elements/active_element.py +22 -0
- mtppy/part3/data_assembly_set/active_elements/drives/__init__.py +4 -0
- mtppy/part3/data_assembly_set/active_elements/drives/ana_drv.py +446 -0
- mtppy/part3/data_assembly_set/active_elements/drives/ana_drv_test.py +567 -0
- mtppy/part3/data_assembly_set/active_elements/drives/bin_drv.py +365 -0
- mtppy/part3/data_assembly_set/active_elements/drives/bin_drv_test.py +503 -0
- mtppy/part3/data_assembly_set/active_elements/drives/mon_ana_drv.py +469 -0
- mtppy/part3/data_assembly_set/active_elements/drives/mon_ana_drv_test.py +418 -0
- mtppy/part3/data_assembly_set/active_elements/drives/mon_bin_drv.py +295 -0
- mtppy/part3/data_assembly_set/active_elements/drives/mon_bin_drv_test.py +265 -0
- mtppy/part3/data_assembly_set/active_elements/pid/__init__.py +4 -0
- mtppy/part3/data_assembly_set/active_elements/pid/pid_ctrl.py +333 -0
- mtppy/part3/data_assembly_set/active_elements/pid/pid_ctrl_test.py +156 -0
- mtppy/part3/data_assembly_set/active_elements/valves/__init__.py +4 -0
- mtppy/part3/data_assembly_set/active_elements/valves/ana_vlv.py +402 -0
- mtppy/part3/data_assembly_set/active_elements/valves/ana_vlv_test.py +732 -0
- mtppy/part3/data_assembly_set/active_elements/valves/bin_vlv.py +279 -0
- mtppy/part3/data_assembly_set/active_elements/valves/bin_vlv_test.py +585 -0
- mtppy/part3/data_assembly_set/active_elements/valves/mon_ana_vlv.py +402 -0
- mtppy/part3/data_assembly_set/active_elements/valves/mon_ana_vlv_test.py +270 -0
- mtppy/part3/data_assembly_set/active_elements/valves/mon_bin_vlv.py +286 -0
- mtppy/part3/data_assembly_set/active_elements/valves/mon_bin_vlv_test.py +224 -0
- mtppy/part3/data_assembly_set/base_functions/__init__.py +4 -0
- mtppy/part3/data_assembly_set/base_functions/operation_mode.py +252 -0
- mtppy/part3/data_assembly_set/base_functions/operation_mode_test.py +260 -0
- mtppy/part3/data_assembly_set/base_functions/oslevel.py +35 -0
- mtppy/part3/data_assembly_set/base_functions/source_mode.py +189 -0
- mtppy/part3/data_assembly_set/base_functions/source_mode_test.py +112 -0
- mtppy/part3/data_assembly_set/base_functions/wqc.py +75 -0
- mtppy/part3/data_assembly_set/base_functions/wqc_test.py +86 -0
- mtppy/part3/data_assembly_set/data_assembly.py +65 -0
- mtppy/part3/data_assembly_set/diagnostic_elements/__init__.py +4 -0
- mtppy/part3/data_assembly_set/diagnostic_elements/diagnostic_element.py +19 -0
- mtppy/part3/data_assembly_set/indicator_elements/__init__.py +4 -0
- mtppy/part3/data_assembly_set/indicator_elements/indicator_element.py +22 -0
- mtppy/part3/data_assembly_set/indicator_elements/views/__init__.py +4 -0
- mtppy/part3/data_assembly_set/indicator_elements/views/ana_view.py +68 -0
- mtppy/part3/data_assembly_set/indicator_elements/views/bin_view.py +73 -0
- mtppy/part3/data_assembly_set/indicator_elements/views/dint_view.py +76 -0
- mtppy/part3/data_assembly_set/indicator_elements/views/string_view.py +55 -0
- mtppy/part3/data_assembly_set/operation_elements/__init__.py +4 -0
- mtppy/part3/data_assembly_set/operation_elements/operation_element.py +19 -0
- mtppy/part3/data_assembly_set/pea_elements/__init__.py +4 -0
- mtppy/part3/data_assembly_set/pea_elements/pea_element.py +28 -0
- mtppy/part3/data_assembly_set/pea_elements/pea_information_label/__init__.py +4 -0
- mtppy/part3/data_assembly_set/pea_elements/pea_information_label/pea_information_label.py +231 -0
- mtppy/part3/data_assembly_set/pea_elements/web_server_url_info/__init__.py +4 -0
- mtppy/part3/data_assembly_set/pea_elements/web_server_url_info/web_server_url_info.py +42 -0
- mtppy/part3/definitions/__init__.py +4 -0
- mtppy/part3/definitions/mtp_access.py +15 -0
- mtppy/part4/__init__.py +4 -0
- mtppy/part4/automation_services/__init__.py +4 -0
- mtppy/part4/automation_services/base_functions/__init__.py +4 -0
- mtppy/part4/automation_services/base_functions/service_operation_mode.py +368 -0
- mtppy/part4/automation_services/base_functions/service_operation_mode_test.py +242 -0
- mtppy/part4/automation_services/base_functions/service_operator_interaction.py +62 -0
- mtppy/part4/automation_services/base_functions/service_source_mode.py +138 -0
- mtppy/part4/automation_services/base_functions/service_source_mode_test.py +179 -0
- mtppy/part4/automation_services/helpers/__init__.py +4 -0
- mtppy/part4/automation_services/helpers/command_en_control.py +330 -0
- mtppy/part4/automation_services/helpers/command_en_control_test.py +302 -0
- mtppy/part4/automation_services/helpers/state_machine.py +167 -0
- mtppy/part4/automation_services/helpers/state_machine_test.py +294 -0
- mtppy/part4/automation_services/helpers/thread_control.py +39 -0
- mtppy/part4/automation_services/helpers/thread_control_test.py +80 -0
- mtppy/part4/automation_services/procedure.py +111 -0
- mtppy/part4/automation_services/procedure_test.py +185 -0
- mtppy/part4/automation_services/service.py +463 -0
- mtppy/part4/automation_services/service_elements/__init__.py +4 -0
- mtppy/part4/automation_services/service_elements/parameter_elements/__init__.py +4 -0
- mtppy/part4/automation_services/service_elements/parameter_elements/ana_serv_param.py +108 -0
- mtppy/part4/automation_services/service_elements/parameter_elements/ana_serv_param_test.py +59 -0
- mtppy/part4/automation_services/service_elements/parameter_elements/bin_serv_param.py +70 -0
- mtppy/part4/automation_services/service_elements/parameter_elements/bin_serv_param_test.py +39 -0
- mtppy/part4/automation_services/service_elements/parameter_elements/common_serv_param.py +111 -0
- mtppy/part4/automation_services/service_elements/parameter_elements/dint_serv_param.py +77 -0
- mtppy/part4/automation_services/service_elements/parameter_elements/dint_serv_param_test.py +58 -0
- mtppy/part4/automation_services/service_elements/parameter_elements/parameter_element.py +175 -0
- mtppy/part4/automation_services/service_elements/parameter_elements/parameter_element_test.py +246 -0
- mtppy/part4/automation_services/service_elements/parameter_elements/string_serv_param.py +48 -0
- mtppy/part4/automation_services/service_elements/parameter_elements/string_serv_param_test.py +37 -0
- mtppy/part4/automation_services/service_elements/procedure_health_view.py +36 -0
- mtppy/part4/automation_services/service_elements/service_control.py +473 -0
- mtppy/part4/automation_services/service_elements/service_control_test.py +150 -0
- mtppy/part4/automation_services/service_elements/service_element.py +20 -0
- mtppy/part4/automation_services/service_test.py +407 -0
- mtppy/part4/definitions/__init__.py +4 -0
- mtppy/part4/definitions/command_codes.py +58 -0
- mtppy/part4/definitions/command_codes_test.py +44 -0
- mtppy/part4/definitions/state_codes.py +65 -0
- mtppy/part4/definitions/state_codes_test.py +44 -0
- mtppy/part4/process_values/__init__.py +4 -0
- mtppy/part4/process_values/base_functions/__init__.py +4 -0
- mtppy/part4/process_values/base_functions/vqc.py +48 -0
- mtppy/part4/process_values/input_elements/__init__.py +4 -0
- mtppy/part4/process_values/input_elements/ana_process_value_in.py +160 -0
- mtppy/part4/process_values/input_elements/bin_process_value_in.py +83 -0
- mtppy/part4/process_values/input_elements/dint_process_value_in.py +159 -0
- mtppy/part4/process_values/input_elements/input_element.py +40 -0
- mtppy/part4/process_values/input_elements/string_process_value_in.py +45 -0
- mtppy/part5/__init__.py +4 -0
- mtppy/part5/communication_object.py +99 -0
- mtppy/part5/communication_object_test.py +59 -0
- mtppy/part5/definitions/__init__.py +4 -0
- mtppy/part5/definitions/iec61131_data_types.py +31 -0
- mtppy/part5/definitions/iec61131_data_types_test.py +82 -0
- mtppy/part5/definitions/opcua_data_types.py +36 -0
- mtppy/part5/definitions/opcua_data_types_test.py +90 -0
- mtppy/part5/definitions/w3c_xml_data_types.py +177 -0
- mtppy/part5/definitions/w3c_xml_data_types_test.py +143 -0
- mtppy/part5/server_assembly_set/__init__.py +5 -0
- mtppy/part6/__init__.py +4 -0
- mtppy/part6/alarm_set/__init__.py +4 -0
- mtppy/part6/alarm_set/alarm.py +132 -0
- mtppy/part6/alarm_set/alarm_test.py +265 -0
- mtppy/pea/__init__.py +19 -0
- mtppy/pea/data_assembly_factory.py +124 -0
- mtppy/pea/data_assembly_factory_test.py +229 -0
- mtppy/pea/mtp_generator/__init__.py +4 -0
- mtppy/pea/mtp_generator/mtp_generator.py +1183 -0
- mtppy/pea/mtp_generator/mtp_generator_test.py +518 -0
- mtppy/pea/pea.py +139 -0
- mtppy/pea/pea_opcua_server/__init__.py +4 -0
- mtppy/pea/pea_opcua_server/marshalling.py +60 -0
- mtppy/pea/pea_opcua_server/opcua_options_provider/__init__.py +4 -0
- mtppy/pea/pea_opcua_server/opcua_options_provider/instances/basic_opcua_options_provider.py +50 -0
- mtppy/pea/pea_opcua_server/opcua_options_provider/opcua_options_provider.py +103 -0
- mtppy/pea/pea_opcua_server/pea_opcua_server.py +492 -0
- mtppy/pea/pea_opcua_server/subscription_list.py +55 -0
- mtppy/pea/pea_test.py +59 -0
- mtppy/pea/rmtp_pea.py +155 -0
- mtppy/pea/rmtp_pea_test.py +27 -0
- mtppy/pea/service_factory.py +178 -0
- mtppy/pea/service_factory_test.py +156 -0
- mtppy/pea/user_logic/__init__.py +4 -0
- mtppy/pea/user_logic/user_logic_pea.py +72 -0
- mtppy/pea/user_logic/user_logic_registry.py +106 -0
- mtppy/pea/user_logic/user_logic_registry_test.py +167 -0
- mtppy/pea/user_logic/user_logic_service.py +228 -0
- mtppy/pea/user_logic/user_logic_service_test.py +289 -0
- mtppy/utils/__init__.py +4 -0
- mtppy/utils/data_assembly_dict.py +61 -0
- mtppy/utils/data_assembly_dict_test.py +107 -0
- mtppy/utils/data_item.py +446 -0
- mtppy/utils/data_item_com_test.py +82 -0
- mtppy/utils/data_item_test.py +325 -0
- mtppy/utils/logging.py +23 -0
- mtppy/utils/logging_test.py +26 -0
- mtppy/utils/mtp_file_handling/__init__.py +4 -0
- mtppy/utils/mtp_file_handling/extract_manifest_from_mtp_file.py +22 -0
- mtppy/utils/mtp_file_handling/extract_mtp_file.py +22 -0
- mtppy/utils/mtp_file_handling/is_valid_mtp.py +22 -0
- mtppy/utils/mtp_file_handling/is_valid_path_for_manifest.py +15 -0
- mtppy/utils/mtp_file_handling/is_valid_path_to_manifest.py +17 -0
- mtppy/utils/mtp_file_handling/is_valid_path_to_mtp.py +17 -0
- mtppy/utils/mtp_file_handling/load_manifest_file.py +24 -0
- mtppy/utils/mtp_file_handling/mtp_reader/__init__.py +4 -0
- mtppy/utils/mtp_file_handling/mtp_reader/mtp_reader.py +103 -0
- mtppy/utils/mtp_file_handling/mtp_reader/mtp_reader_test.py +96 -0
- mtppy/utils/mtp_file_handling/mtp_reader/mtp_xml.py +226 -0
- mtppy/utils/mtp_file_handling/mtp_reader/mtp_xml_test.py +108 -0
- mtppy/utils/mtp_file_handling/mtp_writer/__init__.py +4 -0
- mtppy/utils/mtp_file_handling/mtp_writer/mtp_writer.py +77 -0
- mtppy/utils/mtp_file_handling/mtp_writer/ressources/get_content_types.py +10 -0
- mtppy/utils/mtp_file_handling/mtp_writer/ressources/get_rels.py +11 -0
- mtppy/utils/mtp_file_handling/mtp_writer/test_mtp_writer.py +25 -0
- mtppy/utils/mtp_file_handling/write_manifest_file.py +29 -0
- mtppy/utils/mtp_file_handling/write_manifest_file_test.py +22 -0
- mtppy/utils/mtp_file_handling/write_mtp_file.py +43 -0
- mtppy/utils/mtp_file_handling/write_mtp_file_test.py +22 -0
- mtppy/utils/testing.py +31 -0
- mtppy2_0-0.1.5.dist-info/METADATA +75 -0
- mtppy2_0-0.1.5.dist-info/RECORD +214 -0
- mtppy2_0-0.1.5.dist-info/WHEEL +5 -0
- mtppy2_0-0.1.5.dist-info/entry_points.txt +3 -0
- mtppy2_0-0.1.5.dist-info/licenses/LICENSE +21 -0
- mtppy2_0-0.1.5.dist-info/top_level.txt +4 -0
- tools/__init__.py +0 -0
- tools/create_bugreport.py +150 -0
- tools/inspect_mtp.py +110 -0
- utils/__init__.py +1 -0
- utils/file_handling/__init__.py +4 -0
- utils/file_handling/cleanup_folder.py +9 -0
- utils/file_handling/get_utc_foldername_with_ms.py +15 -0
- utils/file_handling/get_work_dir.py +9 -0
- utils/file_handling/is_valid_path_for_json.py +11 -0
- utils/file_handling/is_valid_path_to_json.py +17 -0
- utils/file_handling/load_json_file.py +18 -0
- utils/file_handling/read_file_from_file_archive.py +43 -0
- utils/file_handling/read_file_string.py +10 -0
- utils/file_handling/validate_json_data.py +28 -0
- utils/file_handling/write_json_file.py +23 -0
- utils/get_uuid.py +18 -0
- utils/get_uuid_test.py +17 -0
- utils/logging.py +100 -0
- utils/logging_test.py +67 -0
- utils/opcua/check_node.py +79 -0
- utils/resolve_unit/resolve_unit.py +11 -0
- utils/resolve_unit/unit_lib.py +2101 -0
- utils/resolve_unit/unit_lib_test.py +36 -0
- utils/type_conversion.py +236 -0
- utils/type_conversion_test.py +114 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"""Class for marshalling OPC UA subscriptions."""
|
|
2
|
+
|
|
3
|
+
__copyright__ = (
|
|
4
|
+
"Copyright (c) 2026 Dresden University of Technology, Process-to-Order Group"
|
|
5
|
+
)
|
|
6
|
+
__license__ = "MIT"
|
|
7
|
+
|
|
8
|
+
from mtppy.utils.logging import logger
|
|
9
|
+
import sys
|
|
10
|
+
import traceback
|
|
11
|
+
|
|
12
|
+
from mtppy.pea.pea_opcua_server.subscription_list import SubscriptionList
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class Marshalling(object):
|
|
16
|
+
def __init__(self) -> None:
|
|
17
|
+
"""Initialize marshalling OPC UA subscriptions class."""
|
|
18
|
+
self.subscription_list = None
|
|
19
|
+
|
|
20
|
+
def import_subscription_list(self, subscription_list: SubscriptionList):
|
|
21
|
+
"""Import a subscription list.
|
|
22
|
+
|
|
23
|
+
Args:
|
|
24
|
+
subscription_list: Subscription list.
|
|
25
|
+
"""
|
|
26
|
+
self.subscription_list = subscription_list
|
|
27
|
+
|
|
28
|
+
def datachange_notification(self, node, val, data):
|
|
29
|
+
"""Execute a callback function if there was an external data value changes.
|
|
30
|
+
|
|
31
|
+
Args:
|
|
32
|
+
node: OPC UA node.
|
|
33
|
+
val: Value after change.
|
|
34
|
+
data: Not used. Keep due to indirect call from opc ua package
|
|
35
|
+
"""
|
|
36
|
+
callback = self.find_set_callback(node)
|
|
37
|
+
callback_name = callback.__name__ if callback else "None"
|
|
38
|
+
logger.debug(f"node={node}, val={val}, callback={callback_name}")
|
|
39
|
+
if callback is not None:
|
|
40
|
+
try:
|
|
41
|
+
callback(val)
|
|
42
|
+
except Exception as exc:
|
|
43
|
+
exc_type, exc_value, exc_traceback = sys.exc_info()
|
|
44
|
+
logger.warning(
|
|
45
|
+
f"{callback_name}({val}) threw exception {exc_type},{exc_value}"
|
|
46
|
+
)
|
|
47
|
+
logger.warning(
|
|
48
|
+
f"{callback_name}({val}) exception {traceback.format_tb(exc_traceback)}"
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
def find_set_callback(self, node_id):
|
|
52
|
+
"""Find a callback function to a specific OPC UA node by nodeid.
|
|
53
|
+
|
|
54
|
+
Args:
|
|
55
|
+
node_id: Node id.
|
|
56
|
+
|
|
57
|
+
Returns:
|
|
58
|
+
Callback function.
|
|
59
|
+
"""
|
|
60
|
+
return self.subscription_list.get_callback(node_id)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"""Basic Realisation of the abstract OPCUAOptionsProvider."""
|
|
2
|
+
|
|
3
|
+
__copyright__ = (
|
|
4
|
+
"Copyright (c) 2026 Dresden University of Technology, Process-to-Order Group"
|
|
5
|
+
)
|
|
6
|
+
__license__ = "MIT"
|
|
7
|
+
|
|
8
|
+
from mtppy.pea.pea_opcua_server.opcua_options_provider.opcua_options_provider import (
|
|
9
|
+
OPCUAOptionsProvider,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class BasicOPCUAOptionsProvider(OPCUAOptionsProvider):
|
|
14
|
+
def __init__(self):
|
|
15
|
+
super().__init__()
|
|
16
|
+
self.type = "BasicNodeIdProvider"
|
|
17
|
+
|
|
18
|
+
def get_default_namespace_uri(self):
|
|
19
|
+
return "https://tu-dresden.de/p2o"
|
|
20
|
+
|
|
21
|
+
# As base variant a string node is generated
|
|
22
|
+
def generate_node_id(
|
|
23
|
+
self,
|
|
24
|
+
data_assembly_name: str,
|
|
25
|
+
data_item_name: str,
|
|
26
|
+
custom_node_id_value_prefix: str | None = None,
|
|
27
|
+
data_assembly_type: str | None = None,
|
|
28
|
+
):
|
|
29
|
+
node_id_value = "s="
|
|
30
|
+
delimiter = "."
|
|
31
|
+
|
|
32
|
+
# Conditional prefix
|
|
33
|
+
if custom_node_id_value_prefix is not None:
|
|
34
|
+
node_id_value = f"{node_id_value}{custom_node_id_value_prefix}{delimiter}"
|
|
35
|
+
|
|
36
|
+
node_id_value = f"{node_id_value}{data_assembly_name}{delimiter}"
|
|
37
|
+
|
|
38
|
+
# Conditional DataAssembly type injection
|
|
39
|
+
if data_assembly_type is not None:
|
|
40
|
+
node_id_value = f"{node_id_value}{data_assembly_type}{delimiter}"
|
|
41
|
+
|
|
42
|
+
node_id_value = f"{node_id_value}{data_item_name}"
|
|
43
|
+
|
|
44
|
+
return node_id_value
|
|
45
|
+
|
|
46
|
+
def generate_browse_name(self, data_assembly_name: str, data_item_name: str):
|
|
47
|
+
return f"{data_assembly_name}.{data_item_name}"
|
|
48
|
+
|
|
49
|
+
def generate_display_name(self, data_assembly_name: str, data_item_name: str):
|
|
50
|
+
return f"{data_assembly_name}.{data_item_name}"
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"""OPCUA Options Provider.
|
|
2
|
+
|
|
3
|
+
This abstract base class defines the interface for providing OPC UA options
|
|
4
|
+
such as node IDs, browse names, and display names for data assemblies.
|
|
5
|
+
|
|
6
|
+
Attributes:
|
|
7
|
+
type: The type of the provider, defaulting to "NodeIdProvider".
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
__copyright__ = (
|
|
11
|
+
"Copyright (c) 2026 Dresden University of Technology, Process-to-Order Group"
|
|
12
|
+
)
|
|
13
|
+
__license__ = "MIT"
|
|
14
|
+
|
|
15
|
+
import abc
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class OPCUAOptionsProvider(abc.ABC):
|
|
19
|
+
"""Abstract base class for OPC UA options providers.
|
|
20
|
+
|
|
21
|
+
This class defines the interface that all OPC UA options providers must
|
|
22
|
+
implement to generate OPC UA identifiers and names for data assemblies.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
__metaclass__ = abc.ABCMeta
|
|
26
|
+
|
|
27
|
+
def __init__(self):
|
|
28
|
+
"""Initialize the OPC UA options provider."""
|
|
29
|
+
self.type = "NodeIdProvider"
|
|
30
|
+
|
|
31
|
+
@staticmethod
|
|
32
|
+
def get_max_sessions():
|
|
33
|
+
"""Get the maximum number of concurrent sessions.
|
|
34
|
+
|
|
35
|
+
Returns:
|
|
36
|
+
int: The maximum number of sessions allowed (default is 20).
|
|
37
|
+
"""
|
|
38
|
+
return 20
|
|
39
|
+
|
|
40
|
+
@staticmethod
|
|
41
|
+
def get_minimum_update_rate():
|
|
42
|
+
"""Get the minimum update rate in milliseconds.
|
|
43
|
+
|
|
44
|
+
Returns:
|
|
45
|
+
int: The minimum update rate in milliseconds (default is 1000).
|
|
46
|
+
"""
|
|
47
|
+
return 1000
|
|
48
|
+
|
|
49
|
+
@abc.abstractmethod
|
|
50
|
+
def get_default_namespace_uri(self):
|
|
51
|
+
"""Get the default namespace URI for the OPC UA server.
|
|
52
|
+
|
|
53
|
+
Returns:
|
|
54
|
+
str: The default namespace URI.
|
|
55
|
+
"""
|
|
56
|
+
return
|
|
57
|
+
|
|
58
|
+
@abc.abstractmethod
|
|
59
|
+
def generate_node_id(
|
|
60
|
+
self,
|
|
61
|
+
data_assembly_name: str,
|
|
62
|
+
data_item_name: str,
|
|
63
|
+
custom_node_id_value_prefix: str | None = None,
|
|
64
|
+
data_assembly_type: str | None = None,
|
|
65
|
+
):
|
|
66
|
+
"""Generate a NodeID for the given data assembly and item.
|
|
67
|
+
|
|
68
|
+
Args:
|
|
69
|
+
data_assembly_name: The name of the data assembly.
|
|
70
|
+
data_item_name: The name of the data item within the assembly.
|
|
71
|
+
custom_node_id_value_prefix: Optional prefix for the node ID value.
|
|
72
|
+
data_assembly_type: Optional type of the data assembly.
|
|
73
|
+
|
|
74
|
+
Returns:
|
|
75
|
+
The generated NodeID for the specified data item.
|
|
76
|
+
"""
|
|
77
|
+
return
|
|
78
|
+
|
|
79
|
+
@abc.abstractmethod
|
|
80
|
+
def generate_browse_name(self, data_assembly_name: str, data_item_name: str):
|
|
81
|
+
"""Generate a browse name for the given data assembly and item.
|
|
82
|
+
|
|
83
|
+
Args:
|
|
84
|
+
data_assembly_name: The name of the data assembly.
|
|
85
|
+
data_item_name: The name of the data item within the assembly.
|
|
86
|
+
|
|
87
|
+
Returns:
|
|
88
|
+
The browse name for the specified data item.
|
|
89
|
+
"""
|
|
90
|
+
return
|
|
91
|
+
|
|
92
|
+
@abc.abstractmethod
|
|
93
|
+
def generate_display_name(self, data_assembly_name: str, data_item_name: str):
|
|
94
|
+
"""Generate a display name for the given data assembly and item.
|
|
95
|
+
|
|
96
|
+
Args:
|
|
97
|
+
data_assembly_name: The name of the data assembly.
|
|
98
|
+
data_item_name: The name of the data item within the assembly.
|
|
99
|
+
|
|
100
|
+
Returns:
|
|
101
|
+
The display name for the specified data item.
|
|
102
|
+
"""
|
|
103
|
+
return
|