All Implemented Interfaces:
BaseObjectType, StateType, org.eclipse.milo.opcua.sdk.core.nodes.Node, org.eclipse.milo.opcua.sdk.core.nodes.ObjectNode
Direct Known Subclasses:
ChoiceStateTypeNode, InitialStateTypeNode

public class StateTypeNode extends BaseObjectTypeNode implements StateType
  • Constructor Details

    • StateTypeNode

      public StateTypeNode(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, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UByte eventNotifier)
  • Method Details

    • getStateNumber

      public org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger getStateNumber() throws org.eclipse.milo.opcua.stack.core.UaException
      Description copied from interface: StateType
      Get the local value of the StateNumber Node.

      The returned value is the last seen; it is not read live from the server.

      Specified by:
      getStateNumber in interface StateType
      Returns:
      the local value of the StateNumber Node.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if an error occurs creating or getting the StateNumber Node.
    • setStateNumber

      public void setStateNumber(org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger value) throws org.eclipse.milo.opcua.stack.core.UaException
      Description copied from interface: StateType
      Set the local value of the StateNumber Node.

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

      Specified by:
      setStateNumber in interface StateType
      Parameters:
      value - the local value to set for the StateNumber Node.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if an error occurs creating or getting the StateNumber Node.
    • readStateNumber

      public org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger readStateNumber() throws org.eclipse.milo.opcua.stack.core.UaException
      Description copied from interface: StateType
      Read the value of the StateNumber Node from the server and update the local value if the operation succeeds.
      Specified by:
      readStateNumber in interface StateType
      Returns:
      the UInteger value read from the server.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if a service- or operation-level error occurs.
    • writeStateNumber

      public void writeStateNumber(org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger value) throws org.eclipse.milo.opcua.stack.core.UaException
      Description copied from interface: StateType
      Write a new value for the StateNumber Node to the server and update the local value if the operation succeeds.
      Specified by:
      writeStateNumber in interface StateType
      Parameters:
      value - the UInteger value to write to the server.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if a service- or operation-level error occurs.
    • readStateNumberAsync

      public CompletableFuture<? extends org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger> readStateNumberAsync()
      Description copied from interface: StateType
      An asynchronous implementation of StateType.readStateNumber().
      Specified by:
      readStateNumberAsync in interface StateType
      Returns:
      a CompletableFuture that completes successfully with the value or completes exceptionally if an operation- or service-level error occurs.
    • writeStateNumberAsync

      public CompletableFuture<org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode> writeStateNumberAsync(org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger stateNumber)
      Description copied from interface: StateType
      Specified by:
      writeStateNumberAsync in interface StateType
      Returns:
      a CompletableFuture that completes successfully with the operation result or completes exceptionally if a service-level error occurs.
    • getStateNumberNode

      public PropertyTypeNode getStateNumberNode() throws org.eclipse.milo.opcua.stack.core.UaException
      Description copied from interface: StateType
      Get the StateNumber PropertyType Node, or null if it does not exist.

      The Node is created when first accessed and cached for subsequent calls.

      Specified by:
      getStateNumberNode in interface StateType
      Returns:
      the StateNumber PropertyType Node, or null if it does not exist.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if an error occurs creating or getting the Node.
    • getStateNumberNodeAsync

      public CompletableFuture<? extends PropertyTypeNode> getStateNumberNodeAsync()
      Description copied from interface: StateType
      Asynchronous implementation of StateType.getStateNumberNode().
      Specified by:
      getStateNumberNodeAsync in interface StateType
      Returns:
      a CompletableFuture that completes successfully with the PropertyType Node or completes exceptionally if an error occurs creating or getting the Node.