All Implemented Interfaces:
BaseObjectType, PubSubStatusType, org.eclipse.milo.opcua.sdk.core.nodes.Node, org.eclipse.milo.opcua.sdk.core.nodes.ObjectNode

public class PubSubStatusTypeNode extends BaseObjectTypeNode implements PubSubStatusType
  • Constructor Details

    • PubSubStatusTypeNode

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

    • getState

      public org.eclipse.milo.opcua.stack.core.types.enumerated.PubSubState getState() throws org.eclipse.milo.opcua.stack.core.UaException
      Description copied from interface: PubSubStatusType
      Get the local value of the State Node.

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

      Specified by:
      getState in interface PubSubStatusType
      Returns:
      the local value of the State Node.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if an error occurs creating or getting the State Node.
    • setState

      public void setState(org.eclipse.milo.opcua.stack.core.types.enumerated.PubSubState value) throws org.eclipse.milo.opcua.stack.core.UaException
      Description copied from interface: PubSubStatusType
      Set the local value of the State Node.

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

      Specified by:
      setState in interface PubSubStatusType
      Parameters:
      value - the local value to set for the State Node.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if an error occurs creating or getting the State Node.
    • readState

      public org.eclipse.milo.opcua.stack.core.types.enumerated.PubSubState readState() throws org.eclipse.milo.opcua.stack.core.UaException
      Description copied from interface: PubSubStatusType
      Read the value of the State Node from the server and update the local value if the operation succeeds.
      Specified by:
      readState in interface PubSubStatusType
      Returns:
      the PubSubState value read from the server.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if a service- or operation-level error occurs.
    • writeState

      public void writeState(org.eclipse.milo.opcua.stack.core.types.enumerated.PubSubState value) throws org.eclipse.milo.opcua.stack.core.UaException
      Description copied from interface: PubSubStatusType
      Write a new value for the State Node to the server and update the local value if the operation succeeds.
      Specified by:
      writeState in interface PubSubStatusType
      Parameters:
      value - the PubSubState value to write to the server.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if a service- or operation-level error occurs.
    • readStateAsync

      public CompletableFuture<? extends org.eclipse.milo.opcua.stack.core.types.enumerated.PubSubState> readStateAsync()
      Description copied from interface: PubSubStatusType
      An asynchronous implementation of PubSubStatusType.readState().
      Specified by:
      readStateAsync in interface PubSubStatusType
      Returns:
      a CompletableFuture that completes successfully with the value or completes exceptionally if an operation- or service-level error occurs.
    • writeStateAsync

      public CompletableFuture<org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode> writeStateAsync(org.eclipse.milo.opcua.stack.core.types.enumerated.PubSubState state)
      Description copied from interface: PubSubStatusType
      Specified by:
      writeStateAsync in interface PubSubStatusType
      Returns:
      a CompletableFuture that completes successfully with the operation result or completes exceptionally if a service-level error occurs.
    • getStateNode

      public BaseDataVariableTypeNode getStateNode() throws org.eclipse.milo.opcua.stack.core.UaException
      Description copied from interface: PubSubStatusType
      Get the State BaseDataVariableType Node, or null if it does not exist.

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

      Specified by:
      getStateNode in interface PubSubStatusType
      Returns:
      the State BaseDataVariableType 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.
    • getStateNodeAsync

      public CompletableFuture<? extends BaseDataVariableTypeNode> getStateNodeAsync()
      Description copied from interface: PubSubStatusType
      Asynchronous implementation of PubSubStatusType.getStateNode().
      Specified by:
      getStateNodeAsync in interface PubSubStatusType
      Returns:
      a CompletableFuture that completes successfully with the BaseDataVariableType Node or completes exceptionally if an error occurs creating or getting the Node.