Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

getAllChildren (opcua)

Recursively retrieve all children of node

Syntax

AllChildNodes = getAllChildren(StartNode)

Description

AllChildNodes = getAllChildren(StartNode) returns all children of a given node as a vector of Node objects, including all children recursively.

Note

This function is memory intensive. Use it only when necessary. Alternatively, consider accessing the Children property of the node, or searching with browseNamespace, findNodeByName, or findNodeById.

Examples

This example shows how to return all children of the server node.

UaClient = opcua('localhost',51210);
connect(UaClient);
serverNode = UaClient.Namespace(1);
allServerNodes = getAllChildren(serverNode);
whos allServerNodes
  Name                Size             Bytes  Class          Attributes

  allServerNodes      1x349             2896  opc.ua.Node  

Introduced in R2015b

Was this topic helpful?