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

Function read_nodes

tests/tests_standard_address_space.py:32–45  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

30 pass
31
32def read_nodes(path):
33 tree = ET.parse(path)
34 root = tree.getroot()
35
36 aliases_elem = find_elem(root, 'Aliases')
37 aliases = dict( (a.attrib['Alias'], a.text) for a in aliases_elem)
38
39 any(try_apply(i, aliases) for i in root.iter())
40 root.remove(aliases_elem)
41
42 remove_elem(root, "Models")
43 remove_elem(root, "NamespaceUris")
44
45 return dict((e.attrib['NodeId'],e) for e in root)
46
47def get_refs(e):
48 return set((r.attrib['ReferenceType'], r.text, r.attrib.get('IsForward', 'true') == 'true') for r in find_elem(e, 'References'))

Callers

nothing calls this directly

Calls 4

find_elemFunction · 0.85
try_applyFunction · 0.85
remove_elemFunction · 0.85
parseMethod · 0.45

Tested by

no test coverage detected