All Implemented Interfaces:
BaseObjectType, StateMachineType, org.eclipse.milo.opcua.sdk.core.nodes.Node, org.eclipse.milo.opcua.sdk.core.nodes.ObjectNode
Direct Known Subclasses:
FiniteStateMachineTypeNode

public class StateMachineTypeNode extends BaseObjectTypeNode implements StateMachineType
  • Constructor Details

    • StateMachineTypeNode

      public StateMachineTypeNode(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

    • getCurrentState

      public org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText getCurrentState() throws org.eclipse.milo.opcua.stack.core.UaException
      Description copied from interface: StateMachineType
      Get the local value of the CurrentState Node.

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

      Specified by:
      getCurrentState in interface StateMachineType
      Returns:
      the local value of the CurrentState Node.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if an error occurs creating or getting the CurrentState Node.
    • setCurrentState

      public void setCurrentState(org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText value) throws org.eclipse.milo.opcua.stack.core.UaException
      Description copied from interface: StateMachineType
      Set the local value of the CurrentState Node.

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

      Specified by:
      setCurrentState in interface StateMachineType
      Parameters:
      value - the local value to set for the CurrentState Node.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if an error occurs creating or getting the CurrentState Node.
    • readCurrentState

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

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

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

      public CompletableFuture<org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode> writeCurrentStateAsync(org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText currentState)
      Description copied from interface: StateMachineType
      Specified by:
      writeCurrentStateAsync in interface StateMachineType
      Returns:
      a CompletableFuture that completes successfully with the operation result or completes exceptionally if a service-level error occurs.
    • getCurrentStateNode

      public StateVariableTypeNode getCurrentStateNode() throws org.eclipse.milo.opcua.stack.core.UaException
      Description copied from interface: StateMachineType
      Get the CurrentState StateVariableType Node, or null if it does not exist.

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

      Specified by:
      getCurrentStateNode in interface StateMachineType
      Returns:
      the CurrentState StateVariableType 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.
    • getCurrentStateNodeAsync

      public CompletableFuture<? extends StateVariableTypeNode> getCurrentStateNodeAsync()
      Description copied from interface: StateMachineType
      Asynchronous implementation of StateMachineType.getCurrentStateNode().
      Specified by:
      getCurrentStateNodeAsync in interface StateMachineType
      Returns:
      a CompletableFuture that completes successfully with the StateVariableType Node or completes exceptionally if an error occurs creating or getting the Node.
    • getLastTransition

      public org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText getLastTransition() throws org.eclipse.milo.opcua.stack.core.UaException
      Description copied from interface: StateMachineType
      Get the local value of the LastTransition Node.

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

      Specified by:
      getLastTransition in interface StateMachineType
      Returns:
      the local value of the LastTransition Node.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if an error occurs creating or getting the LastTransition Node.
    • setLastTransition

      public void setLastTransition(org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText value) throws org.eclipse.milo.opcua.stack.core.UaException
      Description copied from interface: StateMachineType
      Set the local value of the LastTransition Node.

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

      Specified by:
      setLastTransition in interface StateMachineType
      Parameters:
      value - the local value to set for the LastTransition Node.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if an error occurs creating or getting the LastTransition Node.
    • readLastTransition

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

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

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

      public CompletableFuture<org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode> writeLastTransitionAsync(org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText lastTransition)
      Description copied from interface: StateMachineType
      Specified by:
      writeLastTransitionAsync in interface StateMachineType
      Returns:
      a CompletableFuture that completes successfully with the operation result or completes exceptionally if a service-level error occurs.
    • getLastTransitionNode

      public TransitionVariableTypeNode getLastTransitionNode() throws org.eclipse.milo.opcua.stack.core.UaException
      Description copied from interface: StateMachineType
      Get the LastTransition TransitionVariableType Node, or null if it does not exist.

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

      Specified by:
      getLastTransitionNode in interface StateMachineType
      Returns:
      the LastTransition TransitionVariableType 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.
    • getLastTransitionNodeAsync

      public CompletableFuture<? extends TransitionVariableTypeNode> getLastTransitionNodeAsync()
      Description copied from interface: StateMachineType
      Asynchronous implementation of StateMachineType.getLastTransitionNode().
      Specified by:
      getLastTransitionNodeAsync in interface StateMachineType
      Returns:
      a CompletableFuture that completes successfully with the TransitionVariableType Node or completes exceptionally if an error occurs creating or getting the Node.