Skip to content

Method Node

OPC-UA Method Node implementation. Derived from Node.

Functions

MethodNode.new(node_name, namespace, parent_node, method_callback, method_inputs, method_outputs)

Creates a new MethodNode instance

Params

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

    • number
    • Namespace of the new node

    Note

    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.

Params

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