This is machine translation

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

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

getAllChildren (opcua)

Recursively retrieve all children of node


AllChildNodes = getAllChildren(StartNode)


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


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.


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

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

  allServerNodes      1x349             2896  

Introduced in R2015b