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

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

    • UaVariableTypeNode

      public UaVariableTypeNode(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.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, Boolean isAbstract)
      Construct a UaVariableTypeNode using only attributes defined prior to OPC UA 1.04.
    • UaVariableTypeNode

      public UaVariableTypeNode(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, Boolean isAbstract)
      Construct a UaVariableTypeNode using all attributes, including those defined by OPC UA 1.04.
  • Method Details

    • getValue

      public org.eclipse.milo.opcua.stack.core.types.builtin.DataValue getValue()

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

      Specified by:
      getValue in interface org.eclipse.milo.opcua.sdk.core.nodes.VariableTypeNode
      See Also:
    • getDataType

      public org.eclipse.milo.opcua.stack.core.types.builtin.NodeId getDataType()

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

      Specified by:
      getDataType in interface org.eclipse.milo.opcua.sdk.core.nodes.VariableTypeNode
      See Also:
    • getValueRank

      public Integer getValueRank()

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

      Specified by:
      getValueRank in interface org.eclipse.milo.opcua.sdk.core.nodes.VariableTypeNode
      See Also:
    • getArrayDimensions

      public org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger[] getArrayDimensions()

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

      Specified by:
      getArrayDimensions in interface org.eclipse.milo.opcua.sdk.core.nodes.VariableTypeNode
      See Also:
    • getIsAbstract

      public Boolean getIsAbstract()

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

      Specified by:
      getIsAbstract in interface org.eclipse.milo.opcua.sdk.core.nodes.VariableTypeNode
      See Also:
    • setValue

      public void setValue(org.eclipse.milo.opcua.stack.core.types.builtin.DataValue value)

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

      Specified by:
      setValue in interface org.eclipse.milo.opcua.sdk.core.nodes.VariableTypeNode
      See Also:
    • setValue

      public void setValue(org.eclipse.milo.opcua.stack.core.types.builtin.Variant variant)
      Set the local Value attribute to a DataValue containing variant with no StatusCode or timestamp values.
      Parameters:
      variant - the Variant to set.
      See Also:
    • setDataType

      public void setDataType(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId dataType)

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

      Specified by:
      setDataType in interface org.eclipse.milo.opcua.sdk.core.nodes.VariableTypeNode
      See Also:
    • setValueRank

      public void setValueRank(Integer valueRank)

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

      Specified by:
      setValueRank in interface org.eclipse.milo.opcua.sdk.core.nodes.VariableTypeNode
      See Also:
    • setArrayDimensions

      public void setArrayDimensions(org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger[] arrayDimensions)

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

      Specified by:
      setArrayDimensions in interface org.eclipse.milo.opcua.sdk.core.nodes.VariableTypeNode
      See Also:
    • setIsAbstract

      public void setIsAbstract(Boolean isAbstract)

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

      Specified by:
      setIsAbstract in interface org.eclipse.milo.opcua.sdk.core.nodes.VariableTypeNode
      See Also:
    • readValue

      public org.eclipse.milo.opcua.stack.core.types.builtin.DataValue readValue() throws org.eclipse.milo.opcua.stack.core.UaException
      Read the Value attribute for this Node from the server and update the local attribute.

      Unlike reads for other attributes this call does not fail if the resulting DataValue is not good quality and the local attribute value is updated without regard for status.

      Returns:
      the DataValue read from the server.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if a service-level error occurs.
    • readDataType

      public org.eclipse.milo.opcua.stack.core.types.builtin.NodeId readDataType() throws org.eclipse.milo.opcua.stack.core.UaException
      Read the DataType attribute for this Node from the server and update the local attribute if the operation succeeds.
      Returns:
      the NodeId read from the server.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if a service- or operation-level error occurs.
    • readValueRank

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

      public @Nullable org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger[] readArrayDimensions() throws org.eclipse.milo.opcua.stack.core.UaException
      Read the ArrayDimensions attribute for this Node from the server and update the local attribute if the operation succeeds.

      ArrayDimensions is an optional attribute. If the operation fails with StatusCodes0.Bad_AttributeIdInvalid a null value is returned instead.

      Note that null is an expected value for the ArrayDimensions attribute in some cases and this call does not distinguish between the attribute existing with a null value and the attribute not existing.

      Returns:
      the UInteger array read from the server.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if a service- or operation-level error occurs.
    • readIsAbstract

      public Boolean readIsAbstract() throws org.eclipse.milo.opcua.stack.core.UaException
      Read the IsAbstract 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.
    • writeValue

      public void writeValue(org.eclipse.milo.opcua.stack.core.types.builtin.DataValue value) throws org.eclipse.milo.opcua.stack.core.UaException
      Write a new Value attribute for this Node to the server and update the local attribute if the operation succeeds.
      Parameters:
      value - the DataValue to write to the server.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if a service- or operation-level error occurs.
    • writeValue

      public void writeValue(org.eclipse.milo.opcua.stack.core.types.builtin.Variant variant) throws org.eclipse.milo.opcua.stack.core.UaException
      Write a new Value attribute for this Node to the server and update the local attribute if the operation succeeds.

      This overload creates a DataValue with no StatusCode or timestamp values.

      Parameters:
      variant - the Variant to write to the server.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if a service- or operation-level error occurs.
    • writeDataType

      public void writeDataType(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId dataType) throws org.eclipse.milo.opcua.stack.core.UaException
      Write a new DataType attribute for this Node to the server and update the local attribute if the operation succeeds.
      Parameters:
      dataType - the NodeId to write to the server.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if a service- or operation-level error occurs.
    • writeValueRank

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

      public void writeArrayDimensions(org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger[] arrayDimensions) throws org.eclipse.milo.opcua.stack.core.UaException
      Write a new ArrayDimensions attribute for this Node to the server and update the local attribute if the operation succeeds.
      Parameters:
      arrayDimensions - the UInteger array to write to the server.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if a service- or operation-level error occurs.
    • writeIsAbstract

      public void writeIsAbstract(Boolean isAbstract) throws org.eclipse.milo.opcua.stack.core.UaException
      Write a new IsAbstract attribute for this Node to the server and update the local attribute if the operation succeeds.
      Parameters:
      isAbstract - 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 VariableTypeNodeProperties.NodeVersion Property, if it exists.
      Returns:
      the value of the NodeVersion Property, if it exists.
      See Also:
      • VariableTypeNodeProperties
    • writeNodeVersionAsync

      public CompletableFuture<org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode> writeNodeVersionAsync(String nodeVersion)
      Set the value of the VariableTypeNodeProperties.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:
      • VariableTypeNodeProperties
    • 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