java.lang.Object
org.eclipse.milo.opcua.sdk.client.nodes.UaNode
org.eclipse.milo.opcua.sdk.client.nodes.UaMethodNode
All Implemented Interfaces:
org.eclipse.milo.opcua.sdk.core.nodes.MethodNode, org.eclipse.milo.opcua.sdk.core.nodes.Node

public class UaMethodNode extends UaNode implements org.eclipse.milo.opcua.sdk.core.nodes.MethodNode
  • Constructor Details

    • UaMethodNode

      public UaMethodNode(OpcUaClient client, org.eclipse.milo.opcua.stack.core.types.builtin.NodeId nodeId, org.eclipse.milo.opcua.stack.core.types.enumerated.NodeClass nodeClass, org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName browseName, org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText displayName, org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText description, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger writeMask, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger userWriteMask, Boolean executable, Boolean userExecutable)
      Construct a UaMethodNode using only attributes defined prior to OPC UA 1.04.
    • UaMethodNode

      public UaMethodNode(OpcUaClient client, org.eclipse.milo.opcua.stack.core.types.builtin.NodeId nodeId, org.eclipse.milo.opcua.stack.core.types.enumerated.NodeClass nodeClass, org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName browseName, org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText displayName, org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText description, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger writeMask, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger userWriteMask, org.eclipse.milo.opcua.stack.core.types.structured.RolePermissionType[] rolePermissions, org.eclipse.milo.opcua.stack.core.types.structured.RolePermissionType[] userRolePermissions, org.eclipse.milo.opcua.stack.core.types.structured.AccessRestrictionType accessRestrictions, Boolean executable, Boolean userExecutable)
      Construct a UaMethodNode using all attributes, including those defined by OPC UA 1.04.
  • Method Details

    • isExecutable

      public Boolean isExecutable()

      The returned attribute is the most recently seen value; it is not read live from the server.

      Specified by:
      isExecutable in interface org.eclipse.milo.opcua.sdk.core.nodes.MethodNode
      See Also:
    • isUserExecutable

      public Boolean isUserExecutable()

      The returned attribute is the most recently seen value; it is not read live from the server.

      Specified by:
      isUserExecutable in interface org.eclipse.milo.opcua.sdk.core.nodes.MethodNode
      See Also:
    • setExecutable

      public void setExecutable(Boolean executable)

      The attribute is only updated locally; it is not written to the server.

      Specified by:
      setExecutable in interface org.eclipse.milo.opcua.sdk.core.nodes.MethodNode
      See Also:
    • setUserExecutable

      public void setUserExecutable(Boolean userExecutable)

      The attribute is only updated locally; it is not written to the server.

      Specified by:
      setUserExecutable in interface org.eclipse.milo.opcua.sdk.core.nodes.MethodNode
      See Also:
    • readExecutable

      public Boolean readExecutable() throws org.eclipse.milo.opcua.stack.core.UaException
      Read the Executable attribute for this Node from the server and update the local attribute if the operation succeeds.
      Returns:
      the Boolean read from the server.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if a service- or operation-level error occurs.s
    • readUserExecutable

      public Boolean readUserExecutable() throws org.eclipse.milo.opcua.stack.core.UaException
      Read the UserExecutable attribute for this Node from the server and update the local attribute if the operation succeeds.
      Returns:
      the Boolean read from the server.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if a service- or operation-level error occurs.s
    • writeExecutable

      public void writeExecutable(Boolean executable) throws org.eclipse.milo.opcua.stack.core.UaException
      Write a new Executable attribute for this Node to the server and update the local attribute if the operation succeeds.
      Parameters:
      executable - the Boolean to write to the server.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if a service- or operation-level error occurs.
    • writeUserExecutable

      public void writeUserExecutable(Boolean userExecutable) throws org.eclipse.milo.opcua.stack.core.UaException
      Write a new UserExecutable attribute for this Node to the server and update the local attribute if the operation succeeds.
      Parameters:
      userExecutable - the Boolean to write to the server.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if a service- or operation-level error occurs.
    • readNodeVersionAsync

      public CompletableFuture<? extends String> readNodeVersionAsync()
      Get the value of the MethodNodeProperties.NodeVersion Property, if it exists.

      The NodeVersion Property is used to indicate the version of a Node.

      The NodeVersion Property is updated each time a Reference is added or deleted to the Node the Property belongs to. Attribute value changes do not cause the NodeVersion to change. Clients may read the NodeVersion Property or subscribe to it to determine when the structure of a Node has changed.

      This Property is optional. If not present, the future will be completed exceptionally with a UaException indicating StatusCodes0.Bad_NotFound.

      Returns:
      the value of the NodeVersion Property, if it exists.
      See Also:
      • MethodNodeProperties
    • readInputArgumentsAsync

      public CompletableFuture<org.eclipse.milo.opcua.stack.core.types.structured.Argument[]> readInputArgumentsAsync()
      Get the value of the MethodNodeProperties.InputArguments Property, if it exists.

      The InputArguments Property is used to specify the arguments that shall be used by a client when calling the Method.

      This Property is optional. If not present, the future will be completed exceptionally with a UaException indicating StatusCodes0.Bad_NotFound.

      Returns:
      the value of the InputArguments Property, if it exists.
      See Also:
      • MethodNodeProperties
    • readOutputArgumentsAsync

      public CompletableFuture<org.eclipse.milo.opcua.stack.core.types.structured.Argument[]> readOutputArgumentsAsync()
      Get the value of the MethodNodeProperties.OutputArguments Property, if it exists.

      The OutputArguments Property specifies the result returned from the Method call.

      This Property is optional. If not present, the future will be completed exceptionally with a UaException indicating StatusCodes0.Bad_NotFound.

      Returns:
      the value of the OutputArguments Property, if it exists.
      See Also:
      • MethodNodeProperties
    • writeNodeVersionAsync

      public CompletableFuture<org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode> writeNodeVersionAsync(String nodeVersion)
      Set the value of the MethodNodeProperties.NodeVersion Property, if it exists.
      Parameters:
      nodeVersion - the value to set.
      Returns:
      a CompletableFuture that completes with the StatusCode of the write operation.
      See Also:
      • MethodNodeProperties
    • writeInputArgumentsAsync

      public CompletableFuture<org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode> writeInputArgumentsAsync(org.eclipse.milo.opcua.stack.core.types.structured.Argument[] inputArguments)
      Set the value of the MethodNodeProperties.InputArguments Property, if it exists.
      Parameters:
      inputArguments - the value to set.
      Returns:
      a CompletableFuture that completes with the StatusCode of the write operation.
      See Also:
      • MethodNodeProperties
    • writeOutputArgumentsAsync

      public CompletableFuture<org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode> writeOutputArgumentsAsync(org.eclipse.milo.opcua.stack.core.types.structured.Argument[] outputArguments)
      Set the value of the MethodNodeProperties.OutputArguments Property, if it exists.
      Parameters:
      outputArguments - the value to set.
      Returns:
      a CompletableFuture that completes with the StatusCode of the write operation.
      See Also:
      • MethodNodeProperties
    • getAttributeValue

      protected org.eclipse.milo.opcua.stack.core.types.builtin.DataValue getAttributeValue(org.eclipse.milo.opcua.stack.core.AttributeId attributeId)
      Overrides:
      getAttributeValue in class UaNode
    • setAttributeValue

      protected void setAttributeValue(org.eclipse.milo.opcua.stack.core.AttributeId attributeId, org.eclipse.milo.opcua.stack.core.types.builtin.DataValue value)
      Overrides:
      setAttributeValue in class UaNode