Class DynamicOptionSetType

java.lang.Object
org.eclipse.milo.opcua.sdk.core.types.DynamicType
org.eclipse.milo.opcua.sdk.core.types.DynamicOptionSetType
All Implemented Interfaces:
org.eclipse.milo.opcua.stack.core.types.UaDataType, org.eclipse.milo.opcua.stack.core.types.UaStructuredType

public final class DynamicOptionSetType extends DynamicType implements org.eclipse.milo.opcua.stack.core.types.UaStructuredType
  • Constructor Summary

    Constructors
    Constructor
    Description
    DynamicOptionSetType(DataType dataType, org.eclipse.milo.opcua.stack.core.types.builtin.ByteString value, org.eclipse.milo.opcua.stack.core.types.builtin.ByteString validBits)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeId
     
    Get the DataType that defines this type.
    org.eclipse.milo.opcua.stack.core.types.structured.EnumDefinition
    Get the DataTypeDefinition that defines this type.
    Optional<org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText>
    getDescription(int bitIndex)
    Get the description of the field at the given bit index.
    Optional<org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText>
    getDisplayName(int bitIndex)
    Get the display name of the field at the given bit index.
    org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeId
     
    getName(int bitIndex)
    Get the name of the field at the given bit index.
    org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeId
     
    org.eclipse.milo.opcua.stack.core.types.builtin.ByteString
    Get the valid bits of the option set.
    org.eclipse.milo.opcua.stack.core.types.builtin.ByteString
    Get the value of the option set.
    org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeId
     
    newInstance(DataType dataType, org.eclipse.milo.opcua.stack.core.types.builtin.ByteString value, org.eclipse.milo.opcua.stack.core.types.builtin.ByteString validBits)
    Create a new instance of DynamicOptionSetType using the given DataType.
    static BiFunction<org.eclipse.milo.opcua.stack.core.types.builtin.ByteString,org.eclipse.milo.opcua.stack.core.types.builtin.ByteString,DynamicOptionSetType>
    Create a new instance "factory" that produces new DynamicOptionSetType instances of the given DataType.
    void
    setValidBits(org.eclipse.milo.opcua.stack.core.types.builtin.ByteString validBits)
    Set the valid bits of the option set.
    void
    setValue(org.eclipse.milo.opcua.stack.core.types.builtin.ByteString value)
    Set the value of the option set.
    The value and validBit bit strings are displayed left to right, bit 0 to N.

    Methods inherited from class org.eclipse.milo.opcua.sdk.core.types.DynamicType

    getTypeName

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.eclipse.milo.opcua.stack.core.types.UaDataType

    getTypeName
  • Constructor Details

    • DynamicOptionSetType

      public DynamicOptionSetType(DataType dataType, org.eclipse.milo.opcua.stack.core.types.builtin.ByteString value, org.eclipse.milo.opcua.stack.core.types.builtin.ByteString validBits)
  • Method Details

    • getTypeId

      public org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeId getTypeId()
      Specified by:
      getTypeId in interface org.eclipse.milo.opcua.stack.core.types.UaDataType
    • getBinaryEncodingId

      public org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeId getBinaryEncodingId()
      Specified by:
      getBinaryEncodingId in interface org.eclipse.milo.opcua.stack.core.types.UaStructuredType
    • getXmlEncodingId

      public org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeId getXmlEncodingId()
      Specified by:
      getXmlEncodingId in interface org.eclipse.milo.opcua.stack.core.types.UaStructuredType
    • getJsonEncodingId

      public org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeId getJsonEncodingId()
      Specified by:
      getJsonEncodingId in interface org.eclipse.milo.opcua.stack.core.types.UaStructuredType
    • getDataType

      public DataType getDataType()
      Description copied from class: DynamicType
      Get the DataType that defines this type.
      Specified by:
      getDataType in class DynamicType
      Returns:
      the DataType that defines this type.
    • getDataTypeDefinition

      public org.eclipse.milo.opcua.stack.core.types.structured.EnumDefinition getDataTypeDefinition()
      Description copied from class: DynamicType
      Get the DataTypeDefinition that defines this type.

      Subclasses may refine the return type to either EnumDefinition or StructureDefinition.

      Specified by:
      getDataTypeDefinition in class DynamicType
      Returns:
      the DataTypeDefinition that defines this type.
    • getValue

      public org.eclipse.milo.opcua.stack.core.types.builtin.ByteString getValue()
      Get the value of the option set.

      The value is an array of bytes representing the bits in the option set. The length depends on the number of bits, and the number of bytes may be larger than needed for the valid bits.

      Returns:
      the value of the option set.
    • getValidBits

      public org.eclipse.milo.opcua.stack.core.types.builtin.ByteString getValidBits()
      Get the valid bits of the option set.

      The value is an array of bytes the same length as the value, where each bit represents whether the corresponding bit in the value is valid.

      Returns:
      the valid bits of the option set.
    • setValue

      public void setValue(org.eclipse.milo.opcua.stack.core.types.builtin.ByteString value)
      Set the value of the option set.
      Parameters:
      value - the value of the option set.
    • setValidBits

      public void setValidBits(org.eclipse.milo.opcua.stack.core.types.builtin.ByteString validBits)
      Set the valid bits of the option set.
      Parameters:
      validBits - the valid bits of the option set.
    • getName

      public Optional<String> getName(int bitIndex)
      Get the name of the field at the given bit index.
      Parameters:
      bitIndex - the bit index.
      Returns:
      the name of the field at the given bit index, or Optional.empty() if no field exists at the given bit index.
    • getDisplayName

      public Optional<org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText> getDisplayName(int bitIndex)
      Get the display name of the field at the given bit index.
      Parameters:
      bitIndex - the bit index.
      Returns:
      the display name of the field at the given bit index, or Optional.empty() if no field exists at the given bit index.
    • getDescription

      public Optional<org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText> getDescription(int bitIndex)
      Get the description of the field at the given bit index.
      Parameters:
      bitIndex - the bit index.
      Returns:
      the description of the field at the given bit index, or Optional.empty() if no field exists at the given bit index.
    • toString

      public String toString()
      The value and validBit bit strings are displayed left to right, bit 0 to N.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this DynamicOptionSetType.
    • newInstance

      public static DynamicOptionSetType newInstance(DataType dataType, org.eclipse.milo.opcua.stack.core.types.builtin.ByteString value, org.eclipse.milo.opcua.stack.core.types.builtin.ByteString validBits)
      Create a new instance of DynamicOptionSetType using the given DataType.
      Parameters:
      dataType - the DataType of the OptionSet.
      value - the value of the OptionSet.
      validBits - the valid bits of the OptionSet.
      Returns:
      a new DynamicOptionSetType with the given DataType.
    • newInstanceFactory

      public static BiFunction<org.eclipse.milo.opcua.stack.core.types.builtin.ByteString,org.eclipse.milo.opcua.stack.core.types.builtin.ByteString,DynamicOptionSetType> newInstanceFactory(DataType dataType)
      Create a new instance "factory" that produces new DynamicOptionSetType instances of the given DataType.
      Parameters:
      dataType - the DataType of the OptionSet.
      Returns:
      a new instance "factory".