C++ Based OPC UA Client/Server/PubSub SDK  1.7.6.537

Wrapper class for the UA stack structure OpcUa_Variant. More...

#include <uavariant.h>

Public Member Functions

 UaVariant ()
 Constructs an empty variant. More...
 
 UaVariant (const UaVariant &)
 Constructs a variant initialized with the passed variant value. More...
 
 UaVariant (const OpcUa_Variant &)
 Constructs a variant initialized with the passed variant value. More...
 
 UaVariant (OpcUa_Variant *pValue, OpcUa_Boolean detachValue=OpcUa_False)
 Constructs a variant initialized with the passed variant value. More...
 
 UaVariant (OpcUa_Boolean)
 Constructs a variant initialized with the passed bool value. More...
 
 UaVariant (OpcUa_SByte)
 Constructs a variant initialized with the passed SByte value. More...
 
 UaVariant (OpcUa_Int16)
 Constructs a variant initialized with the passed Int16 value. More...
 
 UaVariant (OpcUa_Int32)
 Constructs a variant initialized with the passed Int32 value. More...
 
 UaVariant (OpcUa_Int64)
 Constructs a variant initialized with the passed Int64 value. More...
 
 UaVariant (OpcUa_UInt16)
 Constructs a variant initialized with the passed UInt16 value. More...
 
 UaVariant (OpcUa_UInt32)
 Constructs a variant initialized with the passed UInt32 value. More...
 
 UaVariant (OpcUa_UInt64)
 Constructs a variant initialized with the passed UInt64 value. More...
 
 UaVariant (OpcUa_Float)
 Constructs a variant initialized with the passed float value. More...
 
 UaVariant (OpcUa_Double)
 Constructs a variant initialized with the passed double value. More...
 
 UaVariant (const UaString &)
 Constructs a variant initialized with the passed string value. More...
 
 UaVariant (const UaDateTime &)
 Constructs a variant initialized with the passed DateTime value. More...
 
 UaVariant (const UaGuid &)
 Constructs a variant initialized with the passed Guid value. More...
 
 UaVariant (UaByteString &val, OpcUa_Boolean detachValue=OpcUa_False)
 Constructs a variant initialized with the passed UaByteString value. More...
 
 UaVariant (const UaNodeId &)
 Constructs a variant initialized with the passed NodeId value. More...
 
 UaVariant (const UaQualifiedName &)
 Constructs a variant initialized with the passed QualifiedName value. More...
 
 UaVariant (const UaLocalizedText &)
 Constructs a variant initialized with the passed LocalizedText value. More...
 
 ~UaVariant ()
 destruction
 
void clear ()
 Clear the data of the UaVariant. More...
 
OpcUa_Boolean isEmpty () const
 Checks whether the variant is empty or not. More...
 
OpcUa_Byte arrayType () const
 Get the actual array type. More...
 
OpcUa_Boolean isArray () const
 Check whether the array type of the Variant is OpcUa_VariantArrayType_Array. More...
 
OpcUa_Int32 arraySize () const
 Get the actual array size. More...
 
OpcUa_Boolean isMatrix () const
 Check if Variant contains a matrix. More...
 
OpcUa_Int32 noOfMatrixElements () const
 Get the number of elements contained in the matrix. More...
 
OpcUa_Int32 dimensionSize () const
 Returns the number of dimensions of the containing matrix. More...
 
void arrayDimensions (UaUInt32Array &arrayDimensions) const
 Writes the size of each dimension to an UaUInt32Array. More...
 
OpcUa_BuiltInType type () const
 Get the type of the Variant. More...
 
UaNodeId dataType () const
 Get the DataTypeId for the Variant. More...
 
UaNodeId dataType (const UaStringArray &namespaceTable) const
 Get the DataTypeId for the Variant. More...
 
UaExtensionObject::ExtensionObjectEncoding encoding () const
 Returns the encoding of the ExtensionObject within the Variant. More...
 
UaNodeId encodingTypeId () const
 Returns the encoding type id of the ExtensionObject within the Variant. More...
 
OpcUa_StatusCode changeType (OpcUa_BuiltInType, OpcUa_Boolean toArray)
 Change the type of a parameter. More...
 
OpcUa_StatusCode getIndexRange (const UaNumericRange &indexRange, UaVariant &value) const
 Retrieves the UaVariant's subset of data selected by the given index range. More...
 
OpcUa_StatusCode applyIndexRange (const UaNumericRange &indexRange, const UaVariant &value)
 Writes a value to the UaVariant considering the given index range. More...
 
UaVariantoperator= (const OpcUa_Variant &)
 Assigns the content of an OpcUa_Variant variant structure to this variant and clears the old value.
 
UaVariantoperator= (const UaVariant &)
 Assigns another variant to this variant and clears the old value.
 
UaVariantoperator= (double)
 Assigns a double value to this variant and clears the old value.
 
UaVariantoperator= (const UaString &)
 Assigns a string to this variant and clears the old value.
 
bool operator== (const UaVariant &) const
 Returns true if this variant is equal to variant other; otherwise returns false. More...
 
bool operator!= (const UaVariant &) const
 Returns true if this variant is not equal to variant other; otherwise returns false. More...
 
bool operator> (const UaVariant &) const
 Returns true if this variant is greater than variant other; otherwise returns false. More...
 
bool operator< (const UaVariant &) const
 Returns true if this variant is less than variant other; otherwise returns false. More...
 
bool operator>= (const UaVariant &) const
 Returns true if this variant is greater than or equal to variant other; otherwise returns false. More...
 
bool operator<= (const UaVariant &) const
 Returns true if this variant is less than or equal to variant other; otherwise returns false. More...
 
UaVariant operator[] (const OpcUa_UInt32 index) const
 Returns the array element for the given index. More...
 
 operator const OpcUa_Variant * () const
 Get a pointer to the internal OpcUa_Variant. More...
 
void detach ()
 Reset UaVariant structure without clearing the data. More...
 
void attach (const OpcUa_Variant *pSrc)
 Attach the internal variant data of the passed variant to the own variant. More...
 
OpcUa_Variantcopy () const
 Copy UaVariant data to a newly allocated OpcUa_Variant. More...
 
void copyTo (OpcUa_Variant *pDst) const
 Copy UaVariant data to an existing OpcUa_Variant structure. More...
 
void setBool (OpcUa_Boolean val)
 Sets a boolean value. More...
 
void setBoolean (OpcUa_Boolean val)
 Sets a boolean value. More...
 
void setSByte (OpcUa_SByte val)
 Sets a value to OpcUa_SByte. More...
 
void setInt16 (OpcUa_Int16 val)
 Sets a value to OpcUa_Int16. More...
 
void setInt32 (OpcUa_Int32 val)
 Sets a value to OpcUa_Int32. More...
 
void setInt64 (OpcUa_Int64 val)
 Sets a value to OpcUa_Int64. More...
 
void setByte (OpcUa_Byte val)
 Sets a value to OpcUa_Byte. More...
 
void setUInt16 (OpcUa_UInt16 val)
 Sets a value to OpcUa_UInt16. More...
 
void setUInt32 (OpcUa_UInt32 val)
 Sets a OpcUa_UInt32 value to the Variant. More...
 
void setUInt64 (OpcUa_UInt64 val)
 Sets a value to OpcUa_UInt64. More...
 
void setFloat (OpcUa_Float val)
 Sets a value to OpcUa_Float. More...
 
void setDouble (OpcUa_Double val)
 Sets a value to OpcUa_Double. More...
 
void setString (const UaString &val)
 Sets a String value to the Variant. More...
 
void setDateTime (const UaDateTime &val)
 Sets a value to UaDateTime. More...
 
void setGuid (const UaGuid &val)
 Sets a value to UaGuid. More...
 
void setByteString (UaByteString &val, OpcUa_Boolean bDetach)
 Sets a ByteString value to the Variant. More...
 
void setXmlElement (const UaString &val)
 Sets a XmlElement value to the Variant. More...
 
void setXmlElement (UaByteString &val, OpcUa_Boolean bDetach)
 Sets a XmlElement value to the Variant. More...
 
void setNodeId (const UaNodeId &val)
 Sets a value to UaNodeId. More...
 
void setExpandedNodeId (const UaExpandedNodeId &val)
 Sets a UaExpandedNodeId value to the variant. More...
 
void setStatusCode (OpcUa_StatusCode val)
 Sets a OpcUa_StatusCode value to the Variant. More...
 
void setQualifiedName (const UaQualifiedName &val)
 Sets a value to UaQualifiedName. More...
 
void setLocalizedText (const UaLocalizedText &val)
 Sets a value to UaLocalizedText. More...
 
void setExtensionObject (UaExtensionObject &val, OpcUa_Boolean bDetach)
 Sets a ExtensionObject value to the variant. More...
 
void setDataValue (UaDataValue *pVal, OpcUa_Boolean bDetach)
 Sets a UaDataValue value to the variant. More...
 
void setBoolArray (UaBooleanArray &val, OpcUa_Boolean bDetach=OpcUa_False)
 Sets a value to UaBoolArray. More...
 
void setByteArray (UaByteArray &val, OpcUa_Boolean bDetach=OpcUa_False)
 Sets a value to UaByteArray. More...
 
void setSByteArray (UaSByteArray &val, OpcUa_Boolean bDetach=OpcUa_False)
 Sets a value to UaSByteArray. More...
 
void setInt16Array (UaInt16Array &val, OpcUa_Boolean bDetach=OpcUa_False)
 Sets a value to UaInt16Array. More...
 
void setUInt16Array (UaUInt16Array &val, OpcUa_Boolean bDetach=OpcUa_False)
 Sets a value to UaInt16Array. More...
 
void setInt32Array (UaInt32Array &val, OpcUa_Boolean bDetach=OpcUa_False)
 Sets a value to UaInt32Array. More...
 
void setUInt32Array (UaUInt32Array &val, OpcUa_Boolean bDetach=OpcUa_False)
 Sets a value to UaUInt32Array. More...
 
void setInt64Array (UaInt64Array &val, OpcUa_Boolean bDetach=OpcUa_False)
 Sets a value to UaInt64Array. More...
 
void setUInt64Array (UaUInt64Array &val, OpcUa_Boolean bDetach=OpcUa_False)
 Sets a value to UaUInt64Array. More...
 
void setFloatArray (UaFloatArray &val, OpcUa_Boolean bDetach=OpcUa_False)
 Sets a value to UaFloatArray. More...
 
void setDoubleArray (UaDoubleArray &val, OpcUa_Boolean bDetach=OpcUa_False)
 Sets a value to UaDoubleArray. More...
 
void setStringArray (UaStringArray &val, OpcUa_Boolean bDetach)
 Sets a value to UaStringArray. More...
 
void setStringArray (const UaStringArray &val)
 Sets a value to UaStringArray. More...
 
void setDateTimeArray (UaDateTimeArray &val, OpcUa_Boolean bDetach=OpcUa_False)
 Sets a value to UaDateTimeArray. More...
 
void setGuidArray (UaGuidArray &val, OpcUa_Boolean bDetach=OpcUa_False)
 Sets a value to UaGuidArray. More...
 
void setByteStringArray (UaByteStringArray &val, OpcUa_Boolean bDetach=OpcUa_False)
 Sets a value to UaByteStringArray. More...
 
void setByteStringArray (const UaByteStringArray &val)
 Sets a value to UaByteStringArray. More...
 
void setXmlElementArray (UaByteStringArray &val, OpcUa_Boolean bDetach=OpcUa_False)
 Sets a value to UaXmlElementArray. More...
 
void setXmlElementArray (const UaByteStringArray &val)
 Sets a value to XmlElementArray. More...
 
void setNodeIdArray (UaNodeIdArray &val, OpcUa_Boolean bDetach=OpcUa_False)
 Sets a OpcUa_NodeId array to the variant. More...
 
void setExpandedNodeIdArray (UaExpandedNodeIdArray &val, OpcUa_Boolean bDetach=OpcUa_False)
 Sets a OpcUa_ExpandedNodeId array to the variant. More...
 
void setStatusCodeArray (UaStatusCodeArray &val, OpcUa_Boolean bDetach=OpcUa_False)
 Sets a OpcUa_StatusCode array to the variant. More...
 
void setQualifiedNameArray (UaQualifiedNameArray &val, OpcUa_Boolean bDetach)
 Sets a value to UaQualifiedNameArray. More...
 
void setQualifiedNameArray (const UaQualifiedNameArray &val)
 Sets a value to QualifiedNameArray. More...
 
void setLocalizedTextArray (UaLocalizedTextArray &val, OpcUa_Boolean bDetach)
 Sets a value to UaLocalizedTextArray. More...
 
void setLocalizedTextArray (const UaLocalizedTextArray &val)
 Sets a value to UaLocalizedTextArray. More...
 
void setExtensionObjectArray (UaExtensionObjectArray &val, OpcUa_Boolean bDetach=OpcUa_False)
 Sets a value to UaExtensionObjectArray. More...
 
void setDataValueArray (UaDataValues &val, OpcUa_Boolean bDetach)
 Sets a value to UaDataValues. More...
 
void setDataValueArray (const UaDataValues &val)
 Sets a value to UaDataValues. More...
 
void setVariantArray (UaVariantArray &val, OpcUa_Boolean bDetach=OpcUa_False)
 Sets a value to UaVariantArray. More...
 
void setVariantArray (const UaVariantArray &val)
 Sets a value to UaVariantArray. More...
 
OpcUa_StatusCode setBoolMatrix (UaBooleanArray &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach=OpcUa_False)
 Sets the variant value to multidimensional array of Bool. More...
 
OpcUa_StatusCode setSByteMatrix (UaSByteArray &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach=OpcUa_False)
 Sets the variant value to multidimensional array of SByte. More...
 
OpcUa_StatusCode setByteMatrix (UaByteArray &val, const UaInt32Array &dimensions)
 Sets the variant value to multidimensional array of Byte. More...
 
OpcUa_StatusCode setInt16Matrix (UaInt16Array &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach=OpcUa_False)
 Sets the variant value to multidimensional array of Int16. More...
 
OpcUa_StatusCode setUInt16Matrix (UaUInt16Array &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach=OpcUa_False)
 Sets the variant value to multidimensional array of UInt16. More...
 
OpcUa_StatusCode setInt32Matrix (UaInt32Array &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach=OpcUa_False)
 Sets the variant value to multidimensional array of Int32. More...
 
OpcUa_StatusCode setUInt32Matrix (UaUInt32Array &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach=OpcUa_False)
 Sets the variant value to multidimensional array of UInt32. More...
 
OpcUa_StatusCode setInt64Matrix (UaInt64Array &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach=OpcUa_False)
 Sets the variant value to multidimensional array of Int64. More...
 
OpcUa_StatusCode setUInt64Matrix (UaUInt64Array &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach=OpcUa_False)
 Sets the variant value to multidimensional array of UInt64. More...
 
OpcUa_StatusCode setFloatMatrix (UaFloatArray &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach=OpcUa_False)
 Sets the variant value to multidimensional array of Float. More...
 
OpcUa_StatusCode setDoubleMatrix (UaDoubleArray &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach=OpcUa_False)
 Sets the variant value to multidimensional array of Double. More...
 
OpcUa_StatusCode setStringMatrix (UaStringArray &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach)
 Sets the variant value to multidimensional array of String. More...
 
OpcUa_StatusCode setStringMatrix (const UaStringArray &val, const UaInt32Array &dimensions)
 Sets the variant value to multidimensional array of String. More...
 
OpcUa_StatusCode setDateTimeMatrix (UaDateTimeArray &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach=OpcUa_False)
 Sets the variant value to multidimensional array of DateTime. More...
 
OpcUa_StatusCode setGuidMatrix (UaGuidArray &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach=OpcUa_False)
 Sets the variant value to multidimensional array of Guid. More...
 
OpcUa_StatusCode setByteStringMatrix (UaByteStringArray &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach)
 Sets the variant value to multidimensional array of ByteString. More...
 
OpcUa_StatusCode setByteStringMatrix (const UaByteStringArray &val, const UaInt32Array &dimensions)
 Sets the variant value to multidimensional array of ByteString. More...
 
OpcUa_StatusCode setXmlElementMatrix (UaByteStringArray &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach)
 Sets the variant value to multidimensional array of XmlElement. More...
 
OpcUa_StatusCode setXmlElementMatrix (const UaByteStringArray &val, const UaInt32Array &dimensions)
 Sets the variant value to multidimensional array of XmlElement. More...
 
OpcUa_StatusCode setNodeIdMatrix (UaNodeIdArray &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach=OpcUa_False)
 Sets the variant value to multidimensional array of NodeId. More...
 
OpcUa_StatusCode setExpandedNodeIdMatrix (UaExpandedNodeIdArray &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach=OpcUa_False)
 Sets the variant value to multidimensional array of ExpandedNodeId. More...
 
OpcUa_StatusCode setStatusCodeMatrix (UaStatusCodeArray &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach=OpcUa_False)
 Sets the variant value to multidimensional array of StatusCode. More...
 
OpcUa_StatusCode setQualifiedNameMatrix (UaQualifiedNameArray &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach)
 Sets the variant value to multidimensional array of QualifiedName. More...
 
OpcUa_StatusCode setQualifiedNameMatrix (const UaQualifiedNameArray &val, const UaInt32Array &dimensions)
 Sets the variant value to multidimensional array of QualifiedName. More...
 
OpcUa_StatusCode setLocalizedTextMatrix (UaLocalizedTextArray &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach)
 Sets the variant value to multidimensional array of LocalizedText. More...
 
OpcUa_StatusCode setLocalizedTextMatrix (const UaLocalizedTextArray &val, const UaInt32Array &dimensions)
 Sets the variant value to multidimensional array of LocalizedText. More...
 
OpcUa_StatusCode setExtensionObjectMatrix (UaExtensionObjectArray &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach=OpcUa_False)
 Sets the variant value to multidimensional array of ExtensionObject. More...
 
OpcUa_StatusCode setDataValueMatrix (UaDataValues &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach)
 Sets the variant value to multidimensional array of DataValue. More...
 
OpcUa_StatusCode setDataValueMatrix (const UaDataValues &val, const UaInt32Array &dimensions)
 Sets the variant value to multidimensional array of DataValue. More...
 
OpcUa_StatusCode setVariantMatrix (UaVariantArray &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach)
 Sets the variant value to multidimensional array of Variant. More...
 
OpcUa_StatusCode setVariantMatrix (const UaVariantArray &val, const UaInt32Array &dimensions)
 Sets the variant value to multidimensional array of Variant. More...
 
OpcUa_StatusCode toBool (OpcUa_Boolean &val) const
 Converts the UaVariant into a OpcUa_Boolean. More...
 
OpcUa_StatusCode toBoolean (OpcUa_Boolean &val) const
 Converts the UaVariant into a OpcUa_Boolean. More...
 
OpcUa_StatusCode toSByte (OpcUa_SByte &val) const
 Converts the UaVariant into a OpcUa_SByte. More...
 
OpcUa_StatusCode toInt16 (OpcUa_Int16 &val) const
 Converts the UaVariant into a OpcUa_Int16. More...
 
OpcUa_StatusCode toInt32 (OpcUa_Int32 &val) const
 Converts the UaVariant into a OpcUa_Int32. More...
 
OpcUa_StatusCode toInt64 (OpcUa_Int64 &val) const
 Converts the UaVariant into a OpcUa_Int64. More...
 
OpcUa_StatusCode toByte (OpcUa_Byte &val) const
 Converts the UaVariant into a OpcUa_Byte. More...
 
OpcUa_StatusCode toUInt16 (OpcUa_UInt16 &val) const
 Converts the UaVariant into a OpcUa_UInt16. More...
 
OpcUa_StatusCode toUInt32 (OpcUa_UInt32 &val) const
 Converts the UaVariant into a OpcUa_UInt32. More...
 
OpcUa_StatusCode toUInt64 (OpcUa_UInt64 &val) const
 Converts the UaVariant into a OpcUa_UInt64. More...
 
OpcUa_StatusCode toFloat (OpcUa_Float &val) const
 Converts the UaVariant into a OpcUa_Float. More...
 
OpcUa_StatusCode toDouble (OpcUa_Double &val) const
 Converts the UaVariant into a OpcUa_Double. More...
 
OpcUa_StatusCode toDateTime (UaDateTime &val) const
 Converts the UaVariant into a UaDateTime. More...
 
OpcUa_StatusCode toGuid (UaGuid &val) const
 Converts the UaVariant into a UaGuid. More...
 
OpcUa_StatusCode toByteString (UaByteString &val) const
 Converts the UaVariant into a UaByteString. More...
 
OpcUa_StatusCode toXmlElement (UaByteString &val) const
 Converts the UaVariant into a UaByteString containing the XML element. More...
 
OpcUa_StatusCode toNodeId (UaNodeId &val) const
 Converts the UaVariant into a UaNodeId. More...
 
OpcUa_StatusCode toExpandedNodeId (UaExpandedNodeId &val) const
 Converts the UaVariant into a UaExpandedNodeId. More...
 
OpcUa_StatusCode toStatusCode (OpcUa_StatusCode &val) const
 Converts the UaVariant into a OpcUa_StatusCode. More...
 
OpcUa_StatusCode toQualifiedName (UaQualifiedName &val) const
 Converts the UaVariant into a UaQualifiedName. More...
 
OpcUa_StatusCode toLocalizedText (UaLocalizedText &val) const
 Converts the UaVariant into a UaLocalizedText. More...
 
OpcUa_StatusCode toExtensionObject (UaExtensionObject &val) const
 Converts the UaVariant into a UaExtensionObject. More...
 
OpcUa_StatusCode toDataValue (UaDataValue *pVal) const
 Converts the UaVariant into a UaDataValue. More...
 
OpcUa_StatusCode toBoolArray (UaBooleanArray &val) const
 Converts the UaVariant into a UaBoolArray. More...
 
OpcUa_StatusCode toByteArray (UaByteArray &val) const
 Converts the UaVariant into a UaByteArray. More...
 
OpcUa_StatusCode toSByteArray (UaSByteArray &val) const
 Converts the UaVariant into a UaSByteArray. More...
 
OpcUa_StatusCode toInt16Array (UaInt16Array &val) const
 Converts the UaVariant into a UaInt16Array. More...
 
OpcUa_StatusCode toUInt16Array (UaUInt16Array &val) const
 Converts the UaVariant into a UaUInt16Array. More...
 
OpcUa_StatusCode toInt32Array (UaInt32Array &val) const
 Converts the UaVariant into a UaInt32Array. More...
 
OpcUa_StatusCode toUInt32Array (UaUInt32Array &val) const
 Converts the UaVariant into a UaUInt32Array. More...
 
OpcUa_StatusCode toInt64Array (UaInt64Array &val) const
 Converts the UaVariant into a UaInt64Array. More...
 
OpcUa_StatusCode toUInt64Array (UaUInt64Array &val) const
 Converts the UaVariant into a UaUInt64Array. More...
 
OpcUa_StatusCode toFloatArray (UaFloatArray &val) const
 Converts the UaVariant into a UaFloatArray. More...
 
OpcUa_StatusCode toDoubleArray (UaDoubleArray &val) const
 Converts the UaVariant into a UaDoubleArray. More...
 
OpcUa_StatusCode toStringArray (UaStringArray &val) const
 Converts the UaVariant into a UaStringArray. More...
 
OpcUa_StatusCode toDateTimeArray (UaDateTimeArray &val) const
 Converts the UaVariant into a UaDateTimeArray. More...
 
OpcUa_StatusCode toGuidArray (UaGuidArray &val) const
 Converts the UaVariant into a UaGuidArray. More...
 
OpcUa_StatusCode toByteStringArray (UaByteStringArray &val) const
 Converts the UaVariant into a UaByteStringArray. More...
 
OpcUa_StatusCode toXmlElementArray (UaByteStringArray &val) const
 Converts the UaVariant into a UaByteStringArray. More...
 
OpcUa_StatusCode toNodeIdArray (UaNodeIdArray &val) const
 Converts the UaVariant into a toNodeIdArray. More...
 
OpcUa_StatusCode toExpandedNodeIdArray (UaExpandedNodeIdArray &val) const
 Converts the UaVariant into a UaExpandedNodeIdArray. More...
 
OpcUa_StatusCode toStatusCodeArray (UaStatusCodeArray &val) const
 Converts the UaVariant into a UaStatusCodeArray. More...
 
OpcUa_StatusCode toQualifiedNameArray (UaQualifiedNameArray &val) const
 Converts the UaVariant into a UaQualifiedNameArray. More...
 
OpcUa_StatusCode toLocalizedTextArray (UaLocalizedTextArray &val) const
 Converts the UaVariant into an array of OpcUa_LocalizedText. More...
 
OpcUa_StatusCode toExtensionObjectArray (UaExtensionObjectArray &val) const
 Converts the UaVariant into an array of OpcUa_ExtensionObject. More...
 
OpcUa_StatusCode toVariantArray (UaVariantArray &val) const
 Converts the UaVariant into an array of OpcUa_Variant. More...
 
OpcUa_StatusCode toBoolMatrix (UaBooleanArray &val, UaInt32Array &dimensions) const
 Converts the UaVariant into a multidimensional array of Boolean. More...
 
OpcUa_StatusCode toSByteMatrix (UaSByteArray &val, UaInt32Array &dimensions) const
 Converts the UaVariant into a multidimensional array of SByte. More...
 
OpcUa_StatusCode toByteMatrix (UaByteArray &val, UaInt32Array &dimensions) const
 Converts the UaVariant into a multidimensional array of Byte. More...
 
OpcUa_StatusCode toInt16Matrix (UaInt16Array &val, UaInt32Array &dimensions) const
 Converts the UaVariant into a multidimensional array of Int16. More...
 
OpcUa_StatusCode toUInt16Matrix (UaUInt16Array &val, UaInt32Array &dimensions) const
 Converts the UaVariant into a multidimensional array of UInt16. More...
 
OpcUa_StatusCode toInt32Matrix (UaInt32Array &val, UaInt32Array &dimensions) const
 Converts the UaVariant into a multidimensional array of Int32. More...
 
OpcUa_StatusCode toUInt32Matrix (UaUInt32Array &val, UaInt32Array &dimensions) const
 Converts the UaVariant into a multidimensional array of UInt32. More...
 
OpcUa_StatusCode toInt64Matrix (UaInt64Array &val, UaInt32Array &dimensions) const
 Converts the UaVariant into a multidimensional array of Int64. More...
 
OpcUa_StatusCode toUInt64Matrix (UaUInt64Array &val, UaInt32Array &dimensions) const
 Converts the UaVariant into a multidimensional array of UInt64. More...
 
OpcUa_StatusCode toFloatMatrix (UaFloatArray &val, UaInt32Array &dimensions) const
 Converts the UaVariant into a multidimensional array of Float. More...
 
OpcUa_StatusCode toDoubleMatrix (UaDoubleArray &val, UaInt32Array &dimensions) const
 Converts the UaVariant into a multidimensional array of Double. More...
 
OpcUa_StatusCode toStringMatrix (UaStringArray &val, UaInt32Array &dimensions) const
 Converts the UaVariant into a multidimensional array of String. More...
 
OpcUa_StatusCode toDateTimeMatrix (UaDateTimeArray &val, UaInt32Array &dimensions) const
 Converts the UaVariant into a multidimensional array of DateTime. More...
 
OpcUa_StatusCode toGuidMatrix (UaGuidArray &val, UaInt32Array &dimensions) const
 Converts the UaVariant into a multidimensional array of Guid. More...
 
OpcUa_StatusCode toByteStringMatrix (UaByteStringArray &val, UaInt32Array &dimensions) const
 Converts the UaVariant into a multidimensional array of ByteString. More...
 
OpcUa_StatusCode toXmlElementMatrix (UaByteStringArray &val, UaInt32Array &dimensions) const
 Converts the UaVariant into a multidimensional array of XmlElement. More...
 
OpcUa_StatusCode toNodeIdMatrix (UaNodeIdArray &val, UaInt32Array &dimensions) const
 Converts the UaVariant into a multidimensional array of NodeId. More...
 
OpcUa_StatusCode toExpandedNodeIdMatrix (UaExpandedNodeIdArray &val, UaInt32Array &dimensions) const
 Converts the UaVariant into a multidimensional array of ExpandedNodeId. More...
 
OpcUa_StatusCode toStatusCodeMatrix (UaStatusCodeArray &val, UaInt32Array &dimensions) const
 Converts the UaVariant into a multidimensional array of StatusCode. More...
 
OpcUa_StatusCode toQualifiedNameMatrix (UaQualifiedNameArray &val, UaInt32Array &dimensions) const
 Converts the UaVariant into a multidimensional array of QualifiedName. More...
 
OpcUa_StatusCode toLocalizedTextMatrix (UaLocalizedTextArray &val, UaInt32Array &dimensions) const
 Converts the UaVariant into a multidimensional array of LocalizedText. More...
 
OpcUa_StatusCode toExtensionObjectMatrix (UaExtensionObjectArray &val, UaInt32Array &dimensions) const
 Converts the UaVariant into a multidimensional array of ExtensionObject. More...
 
OpcUa_StatusCode toDataValueMatrix (UaDataValues &val, UaInt32Array &dimensions) const
 Converts the UaVariant into a multidimensional array of DataValue. More...
 
OpcUa_StatusCode toVariantMatrix (UaVariantArray &val, UaInt32Array &dimensions) const
 Converts the UaVariant into a multidimensional array of Variant. More...
 
UaString toString () const
 Converts the UaVariant into a UaString. More...
 
UaString toFullString () const
 Converts the UaVariant into a UaString containing all information about the value. More...
 

Static Public Member Functions

static bool compare (const OpcUa_Variant &, const OpcUa_Variant &)
 Compares two variant values. More...
 
static void adjustTypes (UaVariant &value1, UaVariant &value2, bool bForceConversion=false)
 Adjust types to prepare comparison of values independent of the variant type. More...
 
static UaVariant defaultValue (OpcUa_BuiltInType builtInType, OpcUa_Int32 valueRank=-1)
 Returns the default value for the provided built-in data type. More...
 
static OpcUa_Variantclone (const OpcUa_Variant &source)
 Copy UaVariant data to a newly allocated UaVariant. More...
 
static void cloneTo (const OpcUa_Variant &source, OpcUa_Variant &copy)
 Copy OpcUa_Variant data to an existing OpcUa_Variant structure. More...
 

Detailed Description

Wrapper class for the UA stack structure OpcUa_Variant.

Helper class for handling the OPC UA built-in data type Variant. It provides conversion and comparison functions and handles memory allocation and cleanup.

The UaVariant class acts like a union for all OPC UA built-in data types.

Constructor & Destructor Documentation

UaVariant::UaVariant ( )

Constructs an empty variant.

UaVariant::UaVariant ( const UaVariant vVal)

Constructs a variant initialized with the passed variant value.

Parameters
[in]vValThe value as UaVariant
UaVariant::UaVariant ( const OpcUa_Variant vVal)

Constructs a variant initialized with the passed variant value.

Parameters
[in]vValThe value as OpcUa_Variant
UaVariant::UaVariant ( OpcUa_Variant pValue,
OpcUa_Boolean  detachValue = OpcUa_False 
)

Constructs a variant initialized with the passed variant value.

This version allows to detach the variant value from the passed structure to avoid copying of variants containing a lot of data like arrays or strings.

Parameters
[in]pValueThe value as OpcUa_Variant
[in]detachValueFlag indicating if the passed variant should be detached
UaVariant::UaVariant ( OpcUa_Boolean  bVal)

Constructs a variant initialized with the passed bool value.

Parameters
[in]bValThe value as OpcUa_Boolean
UaVariant::UaVariant ( OpcUa_SByte  val)

Constructs a variant initialized with the passed SByte value.

Parameters
[in]valThe value as OpcUa_SByte
UaVariant::UaVariant ( OpcUa_Int16  iVal)

Constructs a variant initialized with the passed Int16 value.

Parameters
[in]iValThe value as OpcUa_Int16
UaVariant::UaVariant ( OpcUa_Int32  iVal)

Constructs a variant initialized with the passed Int32 value.

Parameters
[in]iValThe value as OpcUa_Int32
UaVariant::UaVariant ( OpcUa_Int64  val)

Constructs a variant initialized with the passed Int64 value.

Parameters
[in]valThe value as OpcUa_Int64
UaVariant::UaVariant ( OpcUa_UInt16  iVal)

Constructs a variant initialized with the passed UInt16 value.

Parameters
[in]iValThe value as OpcUa_UInt16
UaVariant::UaVariant ( OpcUa_UInt32  iVal)

Constructs a variant initialized with the passed UInt32 value.

Parameters
[in]iValThe value as OpcUa_UInt32
UaVariant::UaVariant ( OpcUa_UInt64  val)

Constructs a variant initialized with the passed UInt64 value.

Parameters
[in]valThe value as OpcUa_UInt64
UaVariant::UaVariant ( OpcUa_Float  fltVal)

Constructs a variant initialized with the passed float value.

Parameters
[in]fltValThe value as OpcUa_Float
UaVariant::UaVariant ( OpcUa_Double  dblVal)

Constructs a variant initialized with the passed double value.

Parameters
[in]dblValThe value as OpcUa_Double
UaVariant::UaVariant ( const UaString val)

Constructs a variant initialized with the passed string value.

Parameters
[in]valThe value as UaString
UaVariant::UaVariant ( const UaDateTime val)

Constructs a variant initialized with the passed DateTime value.

Parameters
[in]valThe value as UaDateTime
UaVariant::UaVariant ( const UaGuid val)

Constructs a variant initialized with the passed Guid value.

Parameters
[in]valThe value as UaGuid
UaVariant::UaVariant ( UaByteString val,
OpcUa_Boolean  detachValue = OpcUa_False 
)

Constructs a variant initialized with the passed UaByteString value.

Parameters
[in]valThe value as UaByteString
[in]detachValuetrue if data can be detached false if not
UaVariant::UaVariant ( const UaNodeId val)

Constructs a variant initialized with the passed NodeId value.

Parameters
[in]valThe value as UaNodeId
UaVariant::UaVariant ( const UaQualifiedName val)

Constructs a variant initialized with the passed QualifiedName value.

Parameters
[in]valThe value as UaQualifiedName
UaVariant::UaVariant ( const UaLocalizedText val)

Constructs a variant initialized with the passed LocalizedText value.

Parameters
[in]valThe value as UaLocalizedText

Member Function Documentation

void UaVariant::adjustTypes ( UaVariant value1,
UaVariant value2,
bool  bForceConversion = false 
)
static

Adjust types to prepare comparison of values independent of the variant type.

Adjustment is only implemented for Number data types, Boolean, StatusCode and String. The data type is adjusted to Double, UInt64 or Int64 depending on the passed data types. There is no conversion executed if the passed data types equal for both values.

Setting bForceConversion to true forces the method to always convert the variants to either Double, Int64 or UInt64, even if the passed data types equal for both values.

OpcUa_StatusCode UaVariant::applyIndexRange ( const UaNumericRange indexRange,
const UaVariant value 
)

Writes a value to the UaVariant considering the given index range.

Parameters
[in]indexRangeThe index range specifying where to write the value
[in]valueThe value to apply considering the index range
Returns
The result status of the operation
void UaVariant::arrayDimensions ( UaUInt32Array arrayDimensions) const

Writes the size of each dimension to an UaUInt32Array.

Parameters
arrayDimensionsThe array to write to
OpcUa_Int32 UaVariant::arraySize ( ) const

Get the actual array size.

If isArray is OpcUa_False, -1 is returned.

Returns
the actual array size.
OpcUa_Byte UaVariant::arrayType ( ) const

Get the actual array type.

Possible values are

  • OpcUa_VariantArrayType_Scalar 0x00
  • OpcUa_VariantArrayType_Array 0x01
  • OpcUa_VariantArrayType_Matrix 0x02
    Returns
    the actual array type.
void UaVariant::attach ( const OpcUa_Variant vVal)

Attach the internal variant data of the passed variant to the own variant.

Parameters
vVala value as OpcUa_Variant.
OpcUa_StatusCode UaVariant::changeType ( OpcUa_BuiltInType  type,
OpcUa_Boolean  toArray 
)

Change the type of a parameter.

Parameters
typethe type to change.
toArraytrue if set to array false if not.
Returns
the OPC UA Status code.
void UaVariant::clear ( )

Clear the data of the UaVariant.

OpcUa_Variant * UaVariant::clone ( const OpcUa_Variant source)
static

Copy UaVariant data to a newly allocated UaVariant.

Parameters
sourcethe source of this operation.
Returns
a newly allocated OpcUa_Variant.
void UaVariant::cloneTo ( const OpcUa_Variant source,
OpcUa_Variant copy 
)
static

Copy OpcUa_Variant data to an existing OpcUa_Variant structure.

Parameters
sourceSource OpcUa_Variant to clone.
copyNew copy of source OpcUa_Variant. copy gets not cleared within this method.
bool UaVariant::compare ( const OpcUa_Variant Val1,
const OpcUa_Variant Val2 
)
static

Compares two variant values.

Parameters
Val1First value as OpcUa_Variant.
Val2Second value as OpcUa_Variant.
Returns
true if equal false if not.
OpcUa_Variant * UaVariant::copy ( ) const

Copy UaVariant data to a newly allocated OpcUa_Variant.

Returns
data to a newly allocated OpcUa_Variant.
void UaVariant::copyTo ( OpcUa_Variant pDst) const

Copy UaVariant data to an existing OpcUa_Variant structure.

Parameters
pDstthe destination of this operation.
UaNodeId UaVariant::dataType ( ) const

Get the DataTypeId for the Variant.

If the Variant contains a simple type, the method returns the NodeId of the simple DataType node. E.g. if the Variant contains an Int32 value, OpcUaId_Int32 is returned. If the Variant contains a structured DataType, there are four alternatives:

  1. The structured DataType is a standard UA DataType. In this case the NodeId of the DataType node is returned.
  2. The structured DataType is a custom DataType that has been added to the stack (OpcUa_ProxyStub_AddTypes) and the UaVariant has been deserialized. In this case the NodeId of the DataType node is returned.
  3. The structured DataType is a custom DataType that has been added to the stack and the UaVariant has been filled directly, e.g. by calling [DataTypeName]::toVariant. In this case a NULL NodeId is returned, because the there is no information about the NamespaceIndex available. You can call UaVariant::dataType(const UaStringArray &namespaceTable) const to get the DataType Id.
  4. The structured DataType has NOT been added to the stack. In this case a NULL NodeId is returned. See UaDataTypeDictionary::structureDefinition(const UaVariant &vValue) and UaStructureDefinition for getting the DataType information using the UaDataTypeDictionary base class.
Returns
the DataType for the Value of the Variant.
UaNodeId UaVariant::dataType ( const UaStringArray namespaceTable) const

Get the DataTypeId for the Variant.

The NamespaceIndex of the returned NodeId is based on the namespaceTable.

If namespaceTable is empty, dataType() is called internally. If the namespaceTable is not empty, it is recommended that it should start with "http://opcfoundation.org/UA/". If the Variant contains a simple type, the method returns the NodeId of the simple DataType node, E.g. if the Variant contains an Int32 value, OpcUaId_Int32 is returned. The NamespaceIndex is the index of "http://opcfoundation.org/UA/" within the namespaceTable. If the Variant contains a structured DataType, there are three alternatives:

  1. The structured DataType is a standard UA DataType. In this case the NodeId of the DataType node is returned.
  2. The structured DataType is a custom DataType that has been added to the stack (OpcUa_ProxyStub_AddTypes). In this case the NodeId of the DataType node is returned.
  3. The structured DataType has NOT been added to the stack. In this case a NULL NodeId is returned. See UaDataTypeDictionary::structureDefinition(const UaVariant &vValue) and UaStructureDefinition for getting the DataType information using the UaDataTypeDictionary base class.

    Returns
    the DataType for the Value of the Variant.
UaVariant UaVariant::defaultValue ( OpcUa_BuiltInType  builtInType,
OpcUa_Int32  valueRank = -1 
)
static

Returns the default value for the provided built-in data type.

Parameters
builtInTypeBuilt-in data type used to generate the default value.
valueRankValue rank for the default value. The default is scalar (-1)
void UaVariant::detach ( )

Reset UaVariant structure without clearing the data.

OpcUa_Int32 UaVariant::dimensionSize ( ) const

Returns the number of dimensions of the containing matrix.

If the arrayType of the Variant is OpcUa_VariantArrayType_Array, 1 is returned. If the arrayType of the Variant is OpcUa_VariantArrayType_Scalar, -1 is returned.

Returns
the number of dimensions.
UaExtensionObject::ExtensionObjectEncoding UaVariant::encoding ( ) const

Returns the encoding of the ExtensionObject within the Variant.

If the Variant contains an array of ExtensionObjects, the encoding of the first array element is returned. If the Variant does not contain an ExtensionObject or a non-empty array of ExtensionObjects, UaExtensionObject::None is returned.

Returns
The encoding of the ExtensionObject within the Variant.
UaNodeId UaVariant::encodingTypeId ( ) const

Returns the encoding type id of the ExtensionObject within the Variant.

If the Variant does neither contain an ExtensionObject nor a non-empty array of ExtensionObjects, a NULL NodeId is returned. If the Variant contains an array of ExtensionObjects, the encodingTypeId of the first array element is returned. If the ExtensionObject is neither encoded Binary nor XML, a NULL NodeId is returned.

Returns
The encoding type id of the ExtensionObject within the Variant.
OpcUa_StatusCode UaVariant::getIndexRange ( const UaNumericRange indexRange,
UaVariant value 
) const

Retrieves the UaVariant's subset of data selected by the given index range.

The UaVariant itself is not modified. Returns an error if the index range does not match the UaVariant.

Parameters
[in]indexRangeThe index range to apply
[out]valueThe result of applying the index range to the UaVariant
Returns
The result status of the operation
OpcUa_Boolean UaVariant::isArray ( ) const

Check whether the array type of the Variant is OpcUa_VariantArrayType_Array.

Returns
true if it is an array, false if not.
OpcUa_Boolean UaVariant::isEmpty ( ) const

Checks whether the variant is empty or not.

Returns
true if empty false if not.
OpcUa_Boolean UaVariant::isMatrix ( ) const

Check if Variant contains a matrix.

Returns
true if Variant contains a matrix.
OpcUa_Int32 UaVariant::noOfMatrixElements ( ) const

Get the number of elements contained in the matrix.

If isMatrix is OpcUa_False, -1 is returned.

Returns
the number of elements.
UaVariant::operator const OpcUa_Variant * ( ) const

Get a pointer to the internal OpcUa_Variant.

Returns
pointer to the internal OpcUa_Variant.
bool UaVariant::operator!= ( const UaVariant vVal) const

Returns true if this variant is not equal to variant other; otherwise returns false.

See also
operator==
bool UaVariant::operator< ( const UaVariant other) const

Returns true if this variant is less than variant other; otherwise returns false.

Returns false if the data type of the two variants are different. Returns false if the value is not scalar.

bool UaVariant::operator<= ( const UaVariant other) const

Returns true if this variant is less than or equal to variant other; otherwise returns false.

Returns false if the data type of the two variants are different. Returns false if the value is not scalar.

bool UaVariant::operator== ( const UaVariant other) const

Returns true if this variant is equal to variant other; otherwise returns false.

Return false if the data type of the two variants are different.

bool UaVariant::operator> ( const UaVariant other) const

Returns true if this variant is greater than variant other; otherwise returns false.

Returns false if the data type of the two variants are different. Returns false if the value is not scalar.

bool UaVariant::operator>= ( const UaVariant other) const

Returns true if this variant is greater than or equal to variant other; otherwise returns false.

Returns false if the data type of the two variants are different. Returns false if the value is not scalar.

UaVariant UaVariant::operator[] ( const OpcUa_UInt32  index) const

Returns the array element for the given index.

This method works also for scalar ByteString values.

Parameters
indexArray in index.
Returns
Array element.
void UaVariant::setBool ( OpcUa_Boolean  val)

Sets a boolean value.

Parameters
[in]valThe new boolean value
void UaVariant::setBoolArray ( UaBooleanArray val,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets a value to UaBoolArray.

Parameters
vala value as UaBoolArray.
bDetachtrue if detach false if not.
void UaVariant::setBoolean ( OpcUa_Boolean  val)

Sets a boolean value.

Parameters
[in]valThe new boolean value
OpcUa_StatusCode UaVariant::setBoolMatrix ( UaBooleanArray val,
const UaInt32Array dimensions,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets the variant value to multidimensional array of Bool.

Parameters
vala value as UaBoolArray. The layout of the array into the array dimensions is defined by dimensions.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
bDetachtrue if detach false if not.
Returns
the OPC UA status code as result of the operation.
void UaVariant::setByte ( OpcUa_Byte  val)

Sets a value to OpcUa_Byte.

Parameters
vala value as OpcUa_Byte.
void UaVariant::setByteArray ( UaByteArray val,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets a value to UaByteArray.

Parameters
vala value as UaByteArray.
bDetachflag indicating if the method is allowed to detach the ByteArray in val.
OpcUa_StatusCode UaVariant::setByteMatrix ( UaByteArray val,
const UaInt32Array dimensions 
)

Sets the variant value to multidimensional array of Byte.

Parameters
vala value as UaByteArray. The layout of the array into the array dimensions is defined by dimensions.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
Returns
the OPC UA status code as result of the operation.
void UaVariant::setByteString ( UaByteString val,
OpcUa_Boolean  bDetach 
)

Sets a ByteString value to the Variant.

Parameters
vala value as UaByteString.
bDetachtrue if detach false if not.
void UaVariant::setByteStringArray ( UaByteStringArray val,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets a value to UaByteStringArray.

Parameters
vala value as UaByteStringArray.
bDetachtrue if detach false if not.
void UaVariant::setByteStringArray ( const UaByteStringArray val)

Sets a value to UaByteStringArray.

Parameters
vala value as UaByteStringArray.
OpcUa_StatusCode UaVariant::setByteStringMatrix ( UaByteStringArray val,
const UaInt32Array dimensions,
OpcUa_Boolean  bDetach 
)

Sets the variant value to multidimensional array of ByteString.

Parameters
vala value as UaByteStringArray. The layout of the array into the array dimensions is defined by dimensions.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
bDetachtrue if detach false if not.
Returns
the OPC UA status code as result of the operation.
OpcUa_StatusCode UaVariant::setByteStringMatrix ( const UaByteStringArray val,
const UaInt32Array dimensions 
)

Sets the variant value to multidimensional array of ByteString.

Parameters
vala value as UaByteStringArray. The layout of the array into the array dimensions is defined by dimensions.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
Returns
the OPC UA status code as result of the operation.
void UaVariant::setDataValue ( UaDataValue pVal,
OpcUa_Boolean  bDetach 
)

Sets a UaDataValue value to the variant.

The method signature is different to the other setter methods to allow forward declaration or UaDataValue in this class to avoid cross include headers with UaDataValue since it uses UaVariant.

Parameters
pValPointer to the UaDataValue to set. The UaDataValue will be changed if the detach flag is set.
bDetachThe detach flag indicates if a shallow copy of the data should be created. In this case the data is detached from the UaDataValue.
void UaVariant::setDataValueArray ( UaDataValues val,
OpcUa_Boolean  bDetach 
)

Sets a value to UaDataValues.

Parameters
vala value as UaDataValues.
bDetachtrue if detach false if not.
void UaVariant::setDataValueArray ( const UaDataValues val)

Sets a value to UaDataValues.

Parameters
vala value as UaDataValues.
OpcUa_StatusCode UaVariant::setDataValueMatrix ( UaDataValues val,
const UaInt32Array dimensions,
OpcUa_Boolean  bDetach 
)

Sets the variant value to multidimensional array of DataValue.

Parameters
vala value as UaDataValueArray. The layout of the array into the array dimensions is defined by dimensions.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
bDetachtrue if detach false if not.
Returns
the OPC UA status code as result of the operation.
OpcUa_StatusCode UaVariant::setDataValueMatrix ( const UaDataValues val,
const UaInt32Array dimensions 
)

Sets the variant value to multidimensional array of DataValue.

Parameters
vala value as UaDataValueArray. The layout of the array into the array dimensions is defined by dimensions.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
Returns
the OPC UA status code as result of the operation.
void UaVariant::setDateTime ( const UaDateTime val)

Sets a value to UaDateTime.

Parameters
vala value as UaDateTime.
void UaVariant::setDateTimeArray ( UaDateTimeArray val,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets a value to UaDateTimeArray.

Parameters
vala value as UaDateTimeArray.
bDetachtrue if detach false if not.
OpcUa_StatusCode UaVariant::setDateTimeMatrix ( UaDateTimeArray val,
const UaInt32Array dimensions,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets the variant value to multidimensional array of DateTime.

Parameters
vala value as UaDateTimeArray. The layout of the array into the array dimensions is defined by dimensions.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
bDetachtrue if detach false if not.
Returns
the OPC UA status code as result of the operation.
void UaVariant::setDouble ( OpcUa_Double  val)

Sets a value to OpcUa_Double.

Parameters
vala value as OpcUa_Double.
void UaVariant::setDoubleArray ( UaDoubleArray val,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets a value to UaDoubleArray.

Parameters
vala value as UaDoubleArray.
bDetachtrue if detach false if not.
OpcUa_StatusCode UaVariant::setDoubleMatrix ( UaDoubleArray val,
const UaInt32Array dimensions,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets the variant value to multidimensional array of Double.

Parameters
vala value as UaDoubleArray. The layout of the array into the array dimensions is defined by dimensions.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
bDetachtrue if detach false if not.
Returns
the OPC UA status code as result of the operation.
void UaVariant::setExpandedNodeId ( const UaExpandedNodeId val)

Sets a UaExpandedNodeId value to the variant.

Parameters
vala value as UaExpandedNodeId.
void UaVariant::setExpandedNodeIdArray ( UaExpandedNodeIdArray val,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets a OpcUa_ExpandedNodeId array to the variant.

Parameters
vala value as UaExpandedNodeIdArray.
bDetachtrue if detach false if not.
OpcUa_StatusCode UaVariant::setExpandedNodeIdMatrix ( UaExpandedNodeIdArray val,
const UaInt32Array dimensions,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets the variant value to multidimensional array of ExpandedNodeId.

Parameters
vala value as UaExpandedNodeIdArray. The layout of the array into the array dimensions is defined by dimensions.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
bDetachtrue if detach false if not.
Returns
the OPC UA status code as result of the operation.
void UaVariant::setExtensionObject ( UaExtensionObject val,
OpcUa_Boolean  bDetach 
)

Sets a ExtensionObject value to the variant.

Parameters
vala value as UaExtensionObject.
bDetachtrue if detach false if not.
void UaVariant::setExtensionObjectArray ( UaExtensionObjectArray val,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets a value to UaExtensionObjectArray.

Parameters
vala value as UaExtensionObjectArray.
bDetachtrue if detach false if not.
OpcUa_StatusCode UaVariant::setExtensionObjectMatrix ( UaExtensionObjectArray val,
const UaInt32Array dimensions,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets the variant value to multidimensional array of ExtensionObject.

Parameters
vala value as UaExtensionObjectArray. The layout of the array into the array dimensions is defined by dimensions.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
bDetachtrue if detach false if not.
Returns
the OPC UA status code as result of the operation.
void UaVariant::setFloat ( OpcUa_Float  val)

Sets a value to OpcUa_Float.

Parameters
vala value as OpcUa_Float.
void UaVariant::setFloatArray ( UaFloatArray val,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets a value to UaFloatArray.

Parameters
vala value as UaFloatArray.
bDetachtrue if detach false if not.
OpcUa_StatusCode UaVariant::setFloatMatrix ( UaFloatArray val,
const UaInt32Array dimensions,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets the variant value to multidimensional array of Float.

Parameters
vala value as UaFloatArray. The layout of the array into the array dimensions is defined by dimensions.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
bDetachtrue if detach false if not.
Returns
the OPC UA status code as result of the operation.
void UaVariant::setGuid ( const UaGuid val)

Sets a value to UaGuid.

Parameters
vala value as UaGuid.
void UaVariant::setGuidArray ( UaGuidArray val,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets a value to UaGuidArray.

Parameters
vala value as UaGuidArray.
bDetachtrue if detach false if not.
OpcUa_StatusCode UaVariant::setGuidMatrix ( UaGuidArray val,
const UaInt32Array dimensions,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets the variant value to multidimensional array of Guid.

Parameters
vala value as UaGuidArray. The layout of the array into the array dimensions is defined by dimensions.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
bDetachtrue if detach false if not.
Returns
the OPC UA status code as result of the operation.
void UaVariant::setInt16 ( OpcUa_Int16  val)

Sets a value to OpcUa_Int16.

Parameters
vala value as OpcUa_Int16.
void UaVariant::setInt16Array ( UaInt16Array val,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets a value to UaInt16Array.

Parameters
vala value as UaInt16Array.
bDetachtrue if detach false if not.
OpcUa_StatusCode UaVariant::setInt16Matrix ( UaInt16Array val,
const UaInt32Array dimensions,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets the variant value to multidimensional array of Int16.

Parameters
vala value as UaInt16Array. The layout of the array into the array dimensions is defined by dimensions.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
bDetachtrue if detach false if not.
Returns
the OPC UA status code as result of the operation.
void UaVariant::setInt32 ( OpcUa_Int32  val)

Sets a value to OpcUa_Int32.

Parameters
vala value as OpcUa_Int32.
void UaVariant::setInt32Array ( UaInt32Array val,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets a value to UaInt32Array.

Parameters
vala value as UaInt32Array.
bDetachtrue if detach false if not.
OpcUa_StatusCode UaVariant::setInt32Matrix ( UaInt32Array val,
const UaInt32Array dimensions,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets the variant value to multidimensional array of Int32.

Parameters
vala value as UaInt32Array. The layout of the array into the array dimensions is defined by dimensions.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
bDetachtrue if detach false if not.
Returns
the OPC UA status code as result of the operation.
void UaVariant::setInt64 ( OpcUa_Int64  val)

Sets a value to OpcUa_Int64.

Parameters
vala value as OpcUa_Int64.
void UaVariant::setInt64Array ( UaInt64Array val,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets a value to UaInt64Array.

Parameters
vala value as UaInt64Array.
bDetachtrue if detach false if not.
OpcUa_StatusCode UaVariant::setInt64Matrix ( UaInt64Array val,
const UaInt32Array dimensions,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets the variant value to multidimensional array of Int64.

Parameters
vala value as UaInt64Array. The layout of the array into the array dimensions is defined by dimensions.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
bDetachtrue if detach false if not.
Returns
the OPC UA status code as result of the operation.
void UaVariant::setLocalizedText ( const UaLocalizedText val)

Sets a value to UaLocalizedText.

Parameters
vala value as UaLocalizedText.
void UaVariant::setLocalizedTextArray ( UaLocalizedTextArray val,
OpcUa_Boolean  bDetach 
)

Sets a value to UaLocalizedTextArray.

Parameters
vala value as UaLocalizedTextArray.
bDetachtrue if detach false if not.
void UaVariant::setLocalizedTextArray ( const UaLocalizedTextArray val)

Sets a value to UaLocalizedTextArray.

Parameters
vala value as UaLocalizedTextArray.
OpcUa_StatusCode UaVariant::setLocalizedTextMatrix ( UaLocalizedTextArray val,
const UaInt32Array dimensions,
OpcUa_Boolean  bDetach 
)

Sets the variant value to multidimensional array of LocalizedText.

Parameters
vala value as UaLocalizedTextArray. The layout of the array into the array dimensions is defined by dimensions.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
bDetachtrue if detach false if not.
Returns
the OPC UA status code as result of the operation.
OpcUa_StatusCode UaVariant::setLocalizedTextMatrix ( const UaLocalizedTextArray val,
const UaInt32Array dimensions 
)

Sets the variant value to multidimensional array of LocalizedText.

Parameters
vala value as UaLocalizedTextArray. The layout of the array into the array dimensions is defined by dimensions.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
Returns
the OPC UA status code as result of the operation.
void UaVariant::setNodeId ( const UaNodeId val)

Sets a value to UaNodeId.

Parameters
vala value as UaNodeId.
void UaVariant::setNodeIdArray ( UaNodeIdArray val,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets a OpcUa_NodeId array to the variant.

Parameters
vala value as UaNodeIdArray.
bDetachtrue if detach false if not.
OpcUa_StatusCode UaVariant::setNodeIdMatrix ( UaNodeIdArray val,
const UaInt32Array dimensions,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets the variant value to multidimensional array of NodeId.

Parameters
vala value as UaNodeIdArray. The layout of the array into the array dimensions is defined by dimensions.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
bDetachtrue if detach false if not.
Returns
the OPC UA status code as result of the operation.
void UaVariant::setQualifiedName ( const UaQualifiedName val)

Sets a value to UaQualifiedName.

Parameters
vala value as UaQualifiedName.
void UaVariant::setQualifiedNameArray ( UaQualifiedNameArray val,
OpcUa_Boolean  bDetach 
)

Sets a value to UaQualifiedNameArray.

Parameters
vala value as UaQualifiedNameArray.
bDetachtrue if detach false if not.
void UaVariant::setQualifiedNameArray ( const UaQualifiedNameArray val)

Sets a value to QualifiedNameArray.

Parameters
vala value as UaQualifiedNameArray.
OpcUa_StatusCode UaVariant::setQualifiedNameMatrix ( UaQualifiedNameArray val,
const UaInt32Array dimensions,
OpcUa_Boolean  bDetach 
)

Sets the variant value to multidimensional array of QualifiedName.

Parameters
vala value as UaQualifiedNameArray. The layout of the array into the array dimensions is defined by dimensions.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
bDetachtrue if detach false if not.
Returns
the OPC UA status code as result of the operation.
OpcUa_StatusCode UaVariant::setQualifiedNameMatrix ( const UaQualifiedNameArray val,
const UaInt32Array dimensions 
)

Sets the variant value to multidimensional array of QualifiedName.

Parameters
vala value as UaQualifiedNameArray. The layout of the array into the array dimensions is defined by dimensions.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
Returns
the OPC UA status code as result of the operation.
void UaVariant::setSByte ( OpcUa_SByte  val)

Sets a value to OpcUa_SByte.

Parameters
vala value as OpcUa_SByte.
void UaVariant::setSByteArray ( UaSByteArray val,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets a value to UaSByteArray.

Parameters
vala value as UaSByteArray.
bDetachtrue if detach false if not.
OpcUa_StatusCode UaVariant::setSByteMatrix ( UaSByteArray val,
const UaInt32Array dimensions,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets the variant value to multidimensional array of SByte.

Parameters
vala value as UaSByteArray. The layout of the array into the array dimensions is defined by dimensions.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
bDetachtrue if detach false if not.
Returns
the OPC UA status code as result of the operation.
void UaVariant::setStatusCode ( OpcUa_StatusCode  val)

Sets a OpcUa_StatusCode value to the Variant.

Parameters
vala value as OpcUa_StatusCode.
void UaVariant::setStatusCodeArray ( UaStatusCodeArray val,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets a OpcUa_StatusCode array to the variant.

Parameters
vala value as UaStatusCodeArray.
bDetachtrue if detach false if not.
OpcUa_StatusCode UaVariant::setStatusCodeMatrix ( UaStatusCodeArray val,
const UaInt32Array dimensions,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets the variant value to multidimensional array of StatusCode.

Parameters
vala value as UaStatusCodeArray. The layout of the array into the array dimensions is defined by dimensions.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
bDetachtrue if detach false if not.
Returns
the OPC UA status code as result of the operation.
void UaVariant::setString ( const UaString val)

Sets a String value to the Variant.

Parameters
vala value as UaString.
void UaVariant::setStringArray ( UaStringArray val,
OpcUa_Boolean  bDetach 
)

Sets a value to UaStringArray.

Parameters
vala value as UaStringArray.
bDetachtrue if detach false if not.
void UaVariant::setStringArray ( const UaStringArray val)

Sets a value to UaStringArray.

Parameters
vala value as UaStringArray.
OpcUa_StatusCode UaVariant::setStringMatrix ( UaStringArray val,
const UaInt32Array dimensions,
OpcUa_Boolean  bDetach 
)

Sets the variant value to multidimensional array of String.

Parameters
vala value as UaStringArray. The layout of the array into the array dimensions is defined by dimensions.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
bDetachtrue if detach false if not.
Returns
the OPC UA status code as result of the operation.
OpcUa_StatusCode UaVariant::setStringMatrix ( const UaStringArray val,
const UaInt32Array dimensions 
)

Sets the variant value to multidimensional array of String.

Parameters
vala value as UaStringArray. The layout of the array into the array dimensions is defined by dimensions.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
Returns
the OPC UA status code as result of the operation.
void UaVariant::setUInt16 ( OpcUa_UInt16  val)

Sets a value to OpcUa_UInt16.

Parameters
vala value as OpcUa_UInt16.
void UaVariant::setUInt16Array ( UaUInt16Array val,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets a value to UaInt16Array.

Parameters
vala value as UaInt16Array.
bDetachtrue if detach false if not.
OpcUa_StatusCode UaVariant::setUInt16Matrix ( UaUInt16Array val,
const UaInt32Array dimensions,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets the variant value to multidimensional array of UInt16.

Parameters
vala value as UaUInt16Array. The layout of the array into the array dimensions is defined by dimensions.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
bDetachtrue if detach false if not.
Returns
the OPC UA status code as result of the operation.
void UaVariant::setUInt32 ( OpcUa_UInt32  val)

Sets a OpcUa_UInt32 value to the Variant.

Parameters
vala value as OpcUa_UInt32.
void UaVariant::setUInt32Array ( UaUInt32Array val,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets a value to UaUInt32Array.

Parameters
vala value as UaUInt32Array.
bDetachtrue if detach false if not.
OpcUa_StatusCode UaVariant::setUInt32Matrix ( UaUInt32Array val,
const UaInt32Array dimensions,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets the variant value to multidimensional array of UInt32.

Parameters
vala value as UaUInt32Array. The layout of the array into the array dimensions is defined by dimensions.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
bDetachtrue if detach false if not.
Returns
the OPC UA status code as result of the operation.
void UaVariant::setUInt64 ( OpcUa_UInt64  val)

Sets a value to OpcUa_UInt64.

Parameters
vala value as OpcUa_UInt64.
void UaVariant::setUInt64Array ( UaUInt64Array val,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets a value to UaUInt64Array.

Parameters
vala value as UaUInt64Array.
bDetachtrue if detach false if not.
OpcUa_StatusCode UaVariant::setUInt64Matrix ( UaUInt64Array val,
const UaInt32Array dimensions,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets the variant value to multidimensional array of UInt64.

Parameters
vala value as UaUInt64Array. The layout of the array into the array dimensions is defined by dimensions.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
bDetachtrue if detach false if not.
Returns
the OPC UA status code as result of the operation.
void UaVariant::setVariantArray ( UaVariantArray val,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets a value to UaVariantArray.

Parameters
vala value as UaVariantArray.
bDetachtrue if detach false if not.
void UaVariant::setVariantArray ( const UaVariantArray val)

Sets a value to UaVariantArray.

Parameters
vala value as UaVariantArray.
OpcUa_StatusCode UaVariant::setVariantMatrix ( UaVariantArray val,
const UaInt32Array dimensions,
OpcUa_Boolean  bDetach 
)

Sets the variant value to multidimensional array of Variant.

Parameters
vala value as UaVarianttArray. The layout of the array into the array dimensions is defined by dimensions.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
bDetachtrue if detach false if not.
Returns
the OPC UA status code as result of the operation.
OpcUa_StatusCode UaVariant::setVariantMatrix ( const UaVariantArray val,
const UaInt32Array dimensions 
)

Sets the variant value to multidimensional array of Variant.

Parameters
vala value as UaVarianttArray. The layout of the array into the array dimensions is defined by dimensions.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
Returns
the OPC UA status code as result of the operation.
void UaVariant::setXmlElement ( const UaString val)

Sets a XmlElement value to the Variant.

Parameters
vala value as UaString.
void UaVariant::setXmlElement ( UaByteString val,
OpcUa_Boolean  bDetach 
)

Sets a XmlElement value to the Variant.

Parameters
vala value as UaByteString.
bDetachtrue if detach false if not.
void UaVariant::setXmlElementArray ( UaByteStringArray val,
OpcUa_Boolean  bDetach = OpcUa_False 
)

Sets a value to UaXmlElementArray.

See also
setByteStringArray
Parameters
vala value as UaByteStringArray.
bDetachtrue if detach false if not.
void UaVariant::setXmlElementArray ( const UaByteStringArray val)

Sets a value to XmlElementArray.

See also
setByteStringArray
Parameters
vala value as UaByteStringArray.
OpcUa_StatusCode UaVariant::setXmlElementMatrix ( UaByteStringArray val,
const UaInt32Array dimensions,
OpcUa_Boolean  bDetach 
)

Sets the variant value to multidimensional array of XmlElement.

Parameters
vala value as UaByteStringArray. The layout of the array into the array dimensions is defined by dimensions.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
bDetachtrue if detach false if not.
Returns
the OPC UA status code as result of the operation.
OpcUa_StatusCode UaVariant::setXmlElementMatrix ( const UaByteStringArray val,
const UaInt32Array dimensions 
)

Sets the variant value to multidimensional array of XmlElement.

Parameters
vala value as UaByteStringArray. The layout of the array into the array dimensions is defined by dimensions.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
Returns
the OPC UA status code as result of the operation.
OpcUa_StatusCode UaVariant::toBool ( OpcUa_Boolean &  val) const

Converts the UaVariant into a OpcUa_Boolean.

Parameters
vala value as OpcUa_Boolean.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toBoolArray ( UaBooleanArray val) const

Converts the UaVariant into a UaBoolArray.

Parameters
vala value as UaBoolArray.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toBoolean ( OpcUa_Boolean &  val) const

Converts the UaVariant into a OpcUa_Boolean.

Parameters
vala value as OpcUa_Boolean.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toBoolMatrix ( UaBooleanArray val,
UaInt32Array dimensions 
) const

Converts the UaVariant into a multidimensional array of Boolean.

Parameters
valthe resulting value as UaBoolArray.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
Returns
the OPC UA status code as result of the operation.
OpcUa_StatusCode UaVariant::toByte ( OpcUa_Byte &  val) const

Converts the UaVariant into a OpcUa_Byte.

Parameters
vala value as OpcUa_Byte.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toByteArray ( UaByteArray val) const

Converts the UaVariant into a UaByteArray.

Parameters
vala value as UaByteArray.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toByteMatrix ( UaByteArray val,
UaInt32Array dimensions 
) const

Converts the UaVariant into a multidimensional array of Byte.

Parameters
valthe resulting value as UaByteArray.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
Returns
the OPC UA status code as result of the operation.
OpcUa_StatusCode UaVariant::toByteString ( UaByteString val) const

Converts the UaVariant into a UaByteString.

Parameters
vala value as UaByteString.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toByteStringArray ( UaByteStringArray val) const

Converts the UaVariant into a UaByteStringArray.

Parameters
vala value as UaByteStringArray.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toByteStringMatrix ( UaByteStringArray val,
UaInt32Array dimensions 
) const

Converts the UaVariant into a multidimensional array of ByteString.

Parameters
valthe resulting value as UaByteStringArray.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
Returns
the OPC UA status code as result of the operation.
OpcUa_StatusCode UaVariant::toDataValue ( UaDataValue pVal) const

Converts the UaVariant into a UaDataValue.

The method signature is different to the other setter methods to allow forward declaration or UaDataValue in this class to avoid cross include headers with UaDataValue since it uses UaVariant.

Parameters
pVala value as UaDataValue.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toDataValueMatrix ( UaDataValues val,
UaInt32Array dimensions 
) const

Converts the UaVariant into a multidimensional array of DataValue.

Parameters
valthe resulting value as UaDataValueArray.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
Returns
the OPC UA status code as result of the operation.
OpcUa_StatusCode UaVariant::toDateTime ( UaDateTime val) const

Converts the UaVariant into a UaDateTime.

Parameters
vala value as UaDateTime.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toDateTimeArray ( UaDateTimeArray val) const

Converts the UaVariant into a UaDateTimeArray.

Parameters
vala value as UaDateTimeArray.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toDateTimeMatrix ( UaDateTimeArray val,
UaInt32Array dimensions 
) const

Converts the UaVariant into a multidimensional array of DateTime.

Parameters
valthe resulting value as UaDateTimeArray.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
Returns
the OPC UA status code as result of the operation.
OpcUa_StatusCode UaVariant::toDouble ( OpcUa_Double &  val) const

Converts the UaVariant into a OpcUa_Double.

Parameters
vala value as OpcUa_Double.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toDoubleArray ( UaDoubleArray val) const

Converts the UaVariant into a UaDoubleArray.

Parameters
vala value as UaDoubleArray.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toDoubleMatrix ( UaDoubleArray val,
UaInt32Array dimensions 
) const

Converts the UaVariant into a multidimensional array of Double.

Parameters
valthe resulting value as UaDoubleArray.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
Returns
the OPC UA status code as result of the operation.
OpcUa_StatusCode UaVariant::toExpandedNodeId ( UaExpandedNodeId val) const

Converts the UaVariant into a UaExpandedNodeId.

Parameters
vala value as UaExpandedNodeId.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toExpandedNodeIdArray ( UaExpandedNodeIdArray val) const

Converts the UaVariant into a UaExpandedNodeIdArray.

Parameters
vala value as UaExpandedNodeIdArray.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toExpandedNodeIdMatrix ( UaExpandedNodeIdArray val,
UaInt32Array dimensions 
) const

Converts the UaVariant into a multidimensional array of ExpandedNodeId.

Parameters
valthe resulting value as UaExpandedNodeIdArray.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
Returns
the OPC UA status code as result of the operation.
OpcUa_StatusCode UaVariant::toExtensionObject ( UaExtensionObject val) const

Converts the UaVariant into a UaExtensionObject.

Parameters
vala value as UaExtensionObject.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toExtensionObjectArray ( UaExtensionObjectArray val) const

Converts the UaVariant into an array of OpcUa_ExtensionObject.

Parameters
vala value as UaExtensionObjectArray.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toExtensionObjectMatrix ( UaExtensionObjectArray val,
UaInt32Array dimensions 
) const

Converts the UaVariant into a multidimensional array of ExtensionObject.

Parameters
valthe resulting value as UaExtensionObjectArray.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
Returns
the OPC UA status code as result of the operation.
OpcUa_StatusCode UaVariant::toFloat ( OpcUa_Float &  val) const

Converts the UaVariant into a OpcUa_Float.

Parameters
vala value as OpcUa_Float.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toFloatArray ( UaFloatArray val) const

Converts the UaVariant into a UaFloatArray.

Parameters
vala value as UaFloatArray.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toFloatMatrix ( UaFloatArray val,
UaInt32Array dimensions 
) const

Converts the UaVariant into a multidimensional array of Float.

Parameters
valthe resulting value as UaFloatArray.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
Returns
the OPC UA status code as result of the operation.
UaString UaVariant::toFullString ( ) const

Converts the UaVariant into a UaString containing all information about the value.

This function returns the full information of the types NodeId, ExpandedNodeId, QualifiedName and LocalizedText. All other types will return the same string as toString().

Returns
the UaVariant as string.
OpcUa_StatusCode UaVariant::toGuid ( UaGuid val) const

Converts the UaVariant into a UaGuid.

Parameters
vala value as UaGuid.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toGuidArray ( UaGuidArray val) const

Converts the UaVariant into a UaGuidArray.

Parameters
vala value as UaGuidArray.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toGuidMatrix ( UaGuidArray val,
UaInt32Array dimensions 
) const

Converts the UaVariant into a multidimensional array of Guid.

Parameters
valthe resulting value as UaGuidArray.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
Returns
the OPC UA status code as result of the operation.
OpcUa_StatusCode UaVariant::toInt16 ( OpcUa_Int16 &  val) const

Converts the UaVariant into a OpcUa_Int16.

Parameters
vala value as OpcUa_Int16.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toInt16Array ( UaInt16Array val) const

Converts the UaVariant into a UaInt16Array.

Parameters
vala value as UaInt16Array.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toInt16Matrix ( UaInt16Array val,
UaInt32Array dimensions 
) const

Converts the UaVariant into a multidimensional array of Int16.

Parameters
valthe resulting value as UaInt16Array.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
Returns
the OPC UA status code as result of the operation.
OpcUa_StatusCode UaVariant::toInt32 ( OpcUa_Int32 &  val) const

Converts the UaVariant into a OpcUa_Int32.

Parameters
vala value as OpcUa_Int32.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toInt32Array ( UaInt32Array val) const

Converts the UaVariant into a UaInt32Array.

Parameters
vala value as UaInt32Array.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toInt32Matrix ( UaInt32Array val,
UaInt32Array dimensions 
) const

Converts the UaVariant into a multidimensional array of Int32.

Parameters
valthe resulting value as UaInt32Array.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
Returns
the OPC UA status code as result of the operation.
OpcUa_StatusCode UaVariant::toInt64 ( OpcUa_Int64 &  val) const

Converts the UaVariant into a OpcUa_Int64.

Parameters
vala value as OpcUa_Int64.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toInt64Array ( UaInt64Array val) const

Converts the UaVariant into a UaInt64Array.

Parameters
vala value as UaInt64Array.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toInt64Matrix ( UaInt64Array val,
UaInt32Array dimensions 
) const

Converts the UaVariant into a multidimensional array of Int64.

Parameters
valthe resulting value as UaInt64Array.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
Returns
the OPC UA status code as result of the operation.
OpcUa_StatusCode UaVariant::toLocalizedText ( UaLocalizedText val) const

Converts the UaVariant into a UaLocalizedText.

Parameters
vala value as UaLocalizedText.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toLocalizedTextArray ( UaLocalizedTextArray val) const

Converts the UaVariant into an array of OpcUa_LocalizedText.

Parameters
vala value as UaLocalizedTextArray.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toLocalizedTextMatrix ( UaLocalizedTextArray val,
UaInt32Array dimensions 
) const

Converts the UaVariant into a multidimensional array of LocalizedText.

Parameters
valthe resulting value as UaLocalizedTextArray.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
Returns
the OPC UA status code as result of the operation.
OpcUa_StatusCode UaVariant::toNodeId ( UaNodeId val) const

Converts the UaVariant into a UaNodeId.

Parameters
vala value as UaNodeId.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toNodeIdArray ( UaNodeIdArray val) const

Converts the UaVariant into a toNodeIdArray.

Parameters
vala value as UaNodeIdArray.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toNodeIdMatrix ( UaNodeIdArray val,
UaInt32Array dimensions 
) const

Converts the UaVariant into a multidimensional array of NodeId.

Parameters
valthe resulting value as UaNodeIdArray.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
Returns
the OPC UA status code as result of the operation.
OpcUa_StatusCode UaVariant::toQualifiedName ( UaQualifiedName val) const

Converts the UaVariant into a UaQualifiedName.

Parameters
vala value as UaQualifiedName.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toQualifiedNameArray ( UaQualifiedNameArray val) const

Converts the UaVariant into a UaQualifiedNameArray.

Parameters
vala value as UaQualifiedNameArray.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toQualifiedNameMatrix ( UaQualifiedNameArray val,
UaInt32Array dimensions 
) const

Converts the UaVariant into a multidimensional array of QualifiedName.

Parameters
valthe resulting value as UaQualifiedNameArray.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
Returns
the OPC UA status code as result of the operation.
OpcUa_StatusCode UaVariant::toSByte ( OpcUa_SByte &  val) const

Converts the UaVariant into a OpcUa_SByte.

Parameters
vala value as OpcUa_SByte.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toSByteArray ( UaSByteArray val) const

Converts the UaVariant into a UaSByteArray.

Parameters
vala value as UaSByteArray.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toSByteMatrix ( UaSByteArray val,
UaInt32Array dimensions 
) const

Converts the UaVariant into a multidimensional array of SByte.

Parameters
valthe resulting value as UaSByteArray.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
Returns
the OPC UA status code as result of the operation.
OpcUa_StatusCode UaVariant::toStatusCode ( OpcUa_StatusCode val) const

Converts the UaVariant into a OpcUa_StatusCode.

Parameters
vala value as OpcUa_StatusCode.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toStatusCodeArray ( UaStatusCodeArray val) const

Converts the UaVariant into a UaStatusCodeArray.

Parameters
vala value as UaStatusCodeArray.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toStatusCodeMatrix ( UaStatusCodeArray val,
UaInt32Array dimensions 
) const

Converts the UaVariant into a multidimensional array of StatusCode.

Parameters
valthe resulting value as UaStatusCodeArray.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
Returns
the OPC UA status code as result of the operation.
UaString UaVariant::toString ( ) const

Converts the UaVariant into a UaString.

Returns
the UaVariant as string.
OpcUa_StatusCode UaVariant::toStringArray ( UaStringArray val) const

Converts the UaVariant into a UaStringArray.

Parameters
vala value as UaStringArray.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toStringMatrix ( UaStringArray val,
UaInt32Array dimensions 
) const

Converts the UaVariant into a multidimensional array of String.

Parameters
valthe resulting value as UaStringArray.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
Returns
the OPC UA status code as result of the operation.
OpcUa_StatusCode UaVariant::toUInt16 ( OpcUa_UInt16 &  val) const

Converts the UaVariant into a OpcUa_UInt16.

Parameters
vala value as OpcUa_UInt16.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toUInt16Array ( UaUInt16Array val) const

Converts the UaVariant into a UaUInt16Array.

Parameters
vala value as UaUInt16Array.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toUInt16Matrix ( UaUInt16Array val,
UaInt32Array dimensions 
) const

Converts the UaVariant into a multidimensional array of UInt16.

Parameters
valthe resulting value as UaUInt16Array.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
Returns
the OPC UA status code as result of the operation.
OpcUa_StatusCode UaVariant::toUInt32 ( OpcUa_UInt32 &  val) const

Converts the UaVariant into a OpcUa_UInt32.

Parameters
vala value as OpcUa_UInt32.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toUInt32Array ( UaUInt32Array val) const

Converts the UaVariant into a UaUInt32Array.

Parameters
vala value as UaUInt32Array.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toUInt32Matrix ( UaUInt32Array val,
UaInt32Array dimensions 
) const

Converts the UaVariant into a multidimensional array of UInt32.

Parameters
valthe resulting value as UaUInt32Array.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
Returns
the OPC UA status code as result of the operation.
OpcUa_StatusCode UaVariant::toUInt64 ( OpcUa_UInt64 &  val) const

Converts the UaVariant into a OpcUa_UInt64.

Parameters
vala value as OpcUa_UInt64.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toUInt64Array ( UaUInt64Array val) const

Converts the UaVariant into a UaUInt64Array.

Parameters
vala value as UaUInt64Array.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toUInt64Matrix ( UaUInt64Array val,
UaInt32Array dimensions 
) const

Converts the UaVariant into a multidimensional array of UInt64.

Parameters
valthe resulting value as UaUInt64Array.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
Returns
the OPC UA status code as result of the operation.
OpcUa_StatusCode UaVariant::toVariantArray ( UaVariantArray val) const

Converts the UaVariant into an array of OpcUa_Variant.

Parameters
vala value as UaVariantArray.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toVariantMatrix ( UaVariantArray val,
UaInt32Array dimensions 
) const

Converts the UaVariant into a multidimensional array of Variant.

Parameters
valthe resulting value as UaVariantArray.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
Returns
the OPC UA status code as result of the operation.
OpcUa_StatusCode UaVariant::toXmlElement ( UaByteString val) const

Converts the UaVariant into a UaByteString containing the XML element.

Parameters
vala value as UaByteString.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toXmlElementArray ( UaByteStringArray val) const

Converts the UaVariant into a UaByteStringArray.

Parameters
vala value as UaByteStringArray.
Returns
the OPC UA Status code.
OpcUa_StatusCode UaVariant::toXmlElementMatrix ( UaByteStringArray val,
UaInt32Array dimensions 
) const

Converts the UaVariant into a multidimensional array of XmlElement.

Parameters
valthe resulting value as UaByteStringArray.
dimensionsArray of dimensions length defining the layout of the array into the multidimensional array.
Returns
the OPC UA status code as result of the operation.
OpcUa_BuiltInType UaVariant::type ( ) const

Get the type of the Variant.

Returns
the type of the Variant.

The documentation for this class was generated from the following files: