findNodeById (opcua)

Find nodes by namespace index and identifier


FoundNode = findNodeById(NodeList,NsInd,Id)


FoundNode = findNodeById(NodeList,NsInd,Id) searches the nodes in NodeList for a node whose NamespaceIndex and Identifier properties match NsInd and Id, respectively. NsInd must be an integer, and Id must be a character vector, string, or integer.

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


Find the ServerCapabilities node (Index 0, Identifier 2268) of the OPC UA server on the local host.

UaClient = opcua('localhost',51210);
capabilitiesNode = findNodeById(UaClient.Namespace,0,2268)
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


Introduced in R2015b