Main Content

isMethodType

Determine if nodes are method type

Since R2024a

Description

methodType = isMethodType(nodeObj) returns true (logical 1) for nodes that are method type nodes, or false (logical 0) otherwise. You can execute a method node using the invoke function.

example

Examples

collapse all

Create an OPC UA client and connect it to the server.

uaClient = opcua("opc.tcp://localhost:53530/OPCUA/SimulationServer");
connect(uaClient);

Select nodes from the server namespace.

nodes = browseNamespace(uaClient)
nodes = 
1×3 OPC UA Node array:
    index       Name        NsInd    Identifier     NodeType
    -----  ---------------  -----  ---------------  --------
      1    StaticVariables  5      StaticVariables  Object
      2    Constant         3      1001             Variable
      3    FindAlias        0      23476            Method

Determine if the selected nodes are of method type.

isMethodType(nodes)
ans =

  1×3 logical array

   0   0   1

Input Arguments

collapse all

OPC UA nodes, specified as an array of node objects.

Example: nodeObj = opcuanode()

Output Arguments

collapse all

Indication that node is method type, returned as a numeric or logical 1 (true) or 0 (false) or vector of logical values. A value of true or 1 indicates that the node is of method type.

Version History

Introduced in R2024a