Skip to content

Method Node

OPC-UA Method Node implementation. Derived from Node.

Functions, namespace, parent_node, method_callback, method_inputs, method_outputs)

Creates a new MethodNode instance


  • node_name
    • string
    • Name of the new node
  • namespace

    • number
    • Namespace of the new node


    If not using default namespaces, then the namespace must be created with Server.addNamespace()

  • parent_node

    • NodeId
    • The NodeId of the parent node
  • method_callback
    • function
    • The MethodNode's method. See below for more information on this function
  • method_inputs
  • method_outputs

Returns: MethodNode new instance

MethodNode callback

This function will be called when the MethodNode's method is invoked.

callbackMethod(inputs, outputs)

The inputs and outputs to this function are determined by the method_inputs and method_outputs parameters, to the MethodNode constructor. These parameters describe the type etc, of the variants that will be recieved and are expected in the output.


  • inputs
    • Variant[]
    • Array of input variants to the function
  • outputs