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.

findNodeByName (opcua)

Find nodes by name

Syntax

FoundNodes = findNodeByName(NodeList,NodeName)
FoundNodes = findNodeByName(NodeList,NodeName,'-once')
FoundNodes = findNodeByName(NodeList,NodeName,'-partial')
FoundNodes = findNodeByName(NodeList,NodeName,'-once','-partial')

Description

FoundNodes = findNodeByName(NodeList,NodeName) searches the descendants of NodeList for all nodes whose Name property matches NodeName. The search among all nodes, including NodeList, is not case sensitive.

FoundNodes = findNodeByName(NodeList,NodeName,'-once') stops searching when one node has been found.

FoundNodes = findNodeByName(NodeList,NodeName,'-partial') finds all nodes that start with NodeName.

FoundNodes = findNodeByName(NodeList,NodeName,'-once','-partial') finds only the first partial match.

This function might query the server for further descendants (children) of NodeList.

Examples

Find the ServerCapabilities node from the server node.

UaClient = opcua('localhost',51210);
connect(UaClient);
serverNode = findNodeByName(UaClient.Namespace,'Server','-once');
capabilitiesNode = findNodeByName(serverNode,'ServerCapabilities')
capabilitiesNode = 
OPC UA Node object:
                      Name: ServerCapabilities
               Description: Describes capabilities supported by the server.
            NamespaceIndex: 0
                Identifier: 2268
                  NodeType: Object

                    Parent: Server
                  Children: 14 nodes.

See Also

Functions

Introduced in R2015b

Was this topic helpful?