All Implemented Interfaces:
BaseDataVariableType, BaseVariableType, DataItemType, DiscreteItemType, TwoStateDiscreteType, org.eclipse.milo.opcua.sdk.core.nodes.Node, org.eclipse.milo.opcua.sdk.core.nodes.VariableNode

public class TwoStateDiscreteTypeNode extends DiscreteItemTypeNode implements TwoStateDiscreteType
  • Constructor Details

    • TwoStateDiscreteTypeNode

      public TwoStateDiscreteTypeNode(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.DataValue value, org.eclipse.milo.opcua.stack.core.types.builtin.NodeId dataType, Integer valueRank, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger[] arrayDimensions, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UByte accessLevel, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UByte userAccessLevel, Double minimumSamplingInterval, Boolean historizing, org.eclipse.milo.opcua.stack.core.types.structured.AccessLevelExType accessLevelEx)
  • Method Details

    • getFalseState

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

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

      Specified by:
      getFalseState in interface TwoStateDiscreteType
      Returns:
      the local value of the FalseState Node.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if an error occurs creating or getting the FalseState Node.
    • setFalseState

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

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

      Specified by:
      setFalseState in interface TwoStateDiscreteType
      Parameters:
      value - the local value to set for the FalseState Node.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if an error occurs creating or getting the FalseState Node.
    • readFalseState

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

      public void writeFalseState(org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText value) throws org.eclipse.milo.opcua.stack.core.UaException
      Description copied from interface: TwoStateDiscreteType
      Write a new value for the FalseState Node to the server and update the local value if the operation succeeds.
      Specified by:
      writeFalseState in interface TwoStateDiscreteType
      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.
    • readFalseStateAsync

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

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

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

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

      Specified by:
      getFalseStateNode in interface TwoStateDiscreteType
      Returns:
      the FalseState 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.
    • getFalseStateNodeAsync

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

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

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

      Specified by:
      getTrueState in interface TwoStateDiscreteType
      Returns:
      the local value of the TrueState Node.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if an error occurs creating or getting the TrueState Node.
    • setTrueState

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

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

      Specified by:
      setTrueState in interface TwoStateDiscreteType
      Parameters:
      value - the local value to set for the TrueState Node.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if an error occurs creating or getting the TrueState Node.
    • readTrueState

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

      public void writeTrueState(org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText value) throws org.eclipse.milo.opcua.stack.core.UaException
      Description copied from interface: TwoStateDiscreteType
      Write a new value for the TrueState Node to the server and update the local value if the operation succeeds.
      Specified by:
      writeTrueState in interface TwoStateDiscreteType
      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.
    • readTrueStateAsync

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

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

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

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

      Specified by:
      getTrueStateNode in interface TwoStateDiscreteType
      Returns:
      the TrueState 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.
    • getTrueStateNodeAsync

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