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
ConstructorsConstructorDescriptionDynamicOptionSetType(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 TypeMethodDescriptionorg.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeIdGet theDataTypethat defines this type.org.eclipse.milo.opcua.stack.core.types.structured.EnumDefinitionGet theDataTypeDefinitionthat 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.ExpandedNodeIdgetName(int bitIndex) Get the name of the field at the given bit index.org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeIdorg.eclipse.milo.opcua.stack.core.types.builtin.ByteStringGet the valid bits of the option set.org.eclipse.milo.opcua.stack.core.types.builtin.ByteStringgetValue()Get the value of the option set.org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeIdstatic DynamicOptionSetTypenewInstance(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 ofDynamicOptionSetTypeusing the given DataType.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 newDynamicOptionSetTypeinstances of the given DataType.voidsetValidBits(org.eclipse.milo.opcua.stack.core.types.builtin.ByteString validBits) Set the valid bits of the option set.voidsetValue(org.eclipse.milo.opcua.stack.core.types.builtin.ByteString value) Set the value of the option set.toString()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
getTypeNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
getTypeIdin interfaceorg.eclipse.milo.opcua.stack.core.types.UaDataType
-
getBinaryEncodingId
public org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeId getBinaryEncodingId()- Specified by:
getBinaryEncodingIdin interfaceorg.eclipse.milo.opcua.stack.core.types.UaStructuredType
-
getXmlEncodingId
public org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeId getXmlEncodingId()- Specified by:
getXmlEncodingIdin interfaceorg.eclipse.milo.opcua.stack.core.types.UaStructuredType
-
getJsonEncodingId
public org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeId getJsonEncodingId()- Specified by:
getJsonEncodingIdin interfaceorg.eclipse.milo.opcua.stack.core.types.UaStructuredType
-
getDataType
Description copied from class:DynamicTypeGet theDataTypethat defines this type.- Specified by:
getDataTypein classDynamicType- Returns:
- the
DataTypethat defines this type.
-
getDataTypeDefinition
public org.eclipse.milo.opcua.stack.core.types.structured.EnumDefinition getDataTypeDefinition()Description copied from class:DynamicTypeGet theDataTypeDefinitionthat defines this type.Subclasses may refine the return type to either
EnumDefinitionorStructureDefinition.- Specified by:
getDataTypeDefinitionin classDynamicType- Returns:
- the
DataTypeDefinitionthat 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
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
The value and validBit bit strings are displayed left to right, bit 0 to N.- Overrides:
toStringin classObject- 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 ofDynamicOptionSetTypeusing the given DataType.- Parameters:
dataType- theDataTypeof the OptionSet.value- the value of the OptionSet.validBits- the valid bits of the OptionSet.- Returns:
- a new
DynamicOptionSetTypewith 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, newInstanceFactoryDynamicOptionSetType> (DataType dataType) Create a new instance "factory" that produces newDynamicOptionSetTypeinstances of the given DataType.- Parameters:
dataType- theDataTypeof the OptionSet.- Returns:
- a new instance "factory".
-