MCPcopy Create free account
hub / github.com/FreeOpcUa/python-opcua / _parse_nodeid_qname

Function _parse_nodeid_qname

opcua/common/manage_nodes.py:9–31  ·  view source on GitHub ↗
(*args)

Source from the content-addressed store, hash-verified

7
8
9def _parse_nodeid_qname(*args):
10 try:
11 if isinstance(args[0], int):
12 nodeid = ua.NodeId(0, int(args[0]))
13 qname = ua.QualifiedName(args[1], int(args[0]))
14 return nodeid, qname
15 if isinstance(args[0], ua.NodeId):
16 nodeid = args[0]
17 elif isinstance(args[0], str):
18 nodeid = ua.NodeId.from_string(args[0])
19 else:
20 raise RuntimeError()
21 if isinstance(args[1], ua.QualifiedName):
22 qname = args[1]
23 elif isinstance(args[1], str):
24 qname = ua.QualifiedName.from_string(args[1])
25 else:
26 raise RuntimeError()
27 return nodeid, qname
28 except ua.UaError:
29 raise
30 except Exception as ex:
31 raise TypeError("This method takes either a namespace index and a string as argument or a nodeid and a qualifiedname. Received arguments {0} and got exception {1}".format(args, ex))
32
33
34def create_folder(parent, nodeid, bname):

Callers 9

create_folderFunction · 0.85
create_objectFunction · 0.85
create_propertyFunction · 0.85
create_variableFunction · 0.85
create_variable_typeFunction · 0.85
create_reference_typeFunction · 0.85
create_object_typeFunction · 0.85
create_methodFunction · 0.85
create_data_typeFunction · 0.85

Calls 1

from_stringMethod · 0.45

Tested by

no test coverage detected