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

Method get_references

opcua/common/node.py:348–372  ·  view source on GitHub ↗

returns references of the node based on specific filter defined with: refs = ObjectId of the Reference direction = Browse direction for references nodeclassmask = filter nodes based on specific class includesubtypes = If true subtypes of the reference (ref)

(self, refs=ua.ObjectIds.References, direction=ua.BrowseDirection.Both, nodeclassmask=ua.NodeClass.Unspecified, includesubtypes=True)

Source from the content-addressed store, hash-verified

346 return self.get_referenced_nodes(ua.ObjectIds.HasDescription, ua.BrowseDirection.Forward)
347
348 def get_references(self, refs=ua.ObjectIds.References, direction=ua.BrowseDirection.Both, nodeclassmask=ua.NodeClass.Unspecified, includesubtypes=True):
349 """
350 returns references of the node based on specific filter defined with:
351
352 refs = ObjectId of the Reference
353 direction = Browse direction for references
354 nodeclassmask = filter nodes based on specific class
355 includesubtypes = If true subtypes of the reference (ref) are also included
356 """
357 desc = ua.BrowseDescription()
358 desc.BrowseDirection = direction
359 desc.ReferenceTypeId = _to_nodeid(refs)
360 desc.IncludeSubtypes = includesubtypes
361 desc.NodeClassMask = nodeclassmask
362 desc.ResultMask = ua.BrowseResultMask.All
363
364 desc.NodeId = self.nodeid
365 params = ua.BrowseParameters()
366 params.View.Timestamp = ua.get_win_epoch()
367 params.NodesToBrowse.append(desc)
368 params.RequestedMaxReferencesPerNode = 0
369 results = self.server.browse(params)
370
371 references = self._browse_next(results)
372 return references
373
374 def _browse_next(self, results):
375 references = results[0].References

Callers 15

get_referenced_nodesMethod · 0.95
get_type_definitionMethod · 0.95
_get_pathMethod · 0.95
get_parentMethod · 0.95
delete_referenceMethod · 0.95
set_modelling_ruleMethod · 0.95
_get_ns_idxs_of_nodesMethod · 0.80
_add_ref_elsMethod · 0.80
load_type_definitionsFunction · 0.80

Calls 3

_browse_nextMethod · 0.95
_to_nodeidFunction · 0.85
browseMethod · 0.45