UA Server SDK C++ Bundle
1.4.0.258
|
Portable UA Variant class. 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 (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 | 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... | |
UaVariant (const VARIANT &) | |
Constructs a UaVariant with the passed Windows VARIANT value. | |
UaVariant & | operator= (const VARIANT &) |
Implements the operator = for assigning a Windows VARIANT value to the UaVariant. | |
operator VARIANT () const | |
Converts a UaVariant value to a Windows Variant value. More... | |
UaVariant & | operator= (const OpcUa_Variant &) |
Assigns the content of an OpcUa_Variant variant structure to this variant and clears the old value. | |
UaVariant & | operator= (const UaVariant &) |
Assigns another variant to this variant and clears the old value. | |
UaVariant & | operator= (double) |
Assigns a double value to this variant and clears the old value. | |
UaVariant & | operator= (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... | |
OpcUa_Variant | 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_Variant * | copy () 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 | 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) |
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) |
OpcUa_StatusCode | setSByteMatrix (UaSByteArray &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach=OpcUa_False) |
OpcUa_StatusCode | setByteMatrix (UaByteArray &val, const UaInt32Array &dimensions) |
OpcUa_StatusCode | setInt16Matrix (UaInt16Array &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach=OpcUa_False) |
OpcUa_StatusCode | setUInt16Matrix (UaUInt16Array &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach=OpcUa_False) |
OpcUa_StatusCode | setInt32Matrix (UaInt32Array &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach=OpcUa_False) |
OpcUa_StatusCode | setUInt32Matrix (UaUInt32Array &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach=OpcUa_False) |
OpcUa_StatusCode | setInt64Matrix (UaInt64Array &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach=OpcUa_False) |
OpcUa_StatusCode | setUInt64Matrix (UaUInt64Array &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach=OpcUa_False) |
OpcUa_StatusCode | setFloatMatrix (UaFloatArray &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach=OpcUa_False) |
OpcUa_StatusCode | setDoubleMatrix (UaDoubleArray &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach=OpcUa_False) |
OpcUa_StatusCode | setStringMatrix (UaStringArray &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach) |
OpcUa_StatusCode | setStringMatrix (const UaStringArray &val, const UaInt32Array &dimensions) |
OpcUa_StatusCode | setDateTimeMatrix (UaDateTimeArray &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach=OpcUa_False) |
OpcUa_StatusCode | setGuidMatrix (UaGuidArray &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach=OpcUa_False) |
OpcUa_StatusCode | setByteStringMatrix (UaByteStringArray &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach) |
OpcUa_StatusCode | setByteStringMatrix (const UaByteStringArray &val, const UaInt32Array &dimensions) |
OpcUa_StatusCode | setXmlElementMatrix (UaByteStringArray &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach) |
OpcUa_StatusCode | setXmlElementMatrix (const UaByteStringArray &val, const UaInt32Array &dimensions) |
OpcUa_StatusCode | setNodeIdMatrix (UaNodeIdArray &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach=OpcUa_False) |
OpcUa_StatusCode | setExpandedNodeIdMatrix (UaExpandedNodeIdArray &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach=OpcUa_False) |
OpcUa_StatusCode | setStatusCodeMatrix (UaStatusCodeArray &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach=OpcUa_False) |
OpcUa_StatusCode | setQualifiedNameMatrix (UaQualifiedNameArray &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach) |
OpcUa_StatusCode | setQualifiedNameMatrix (const UaQualifiedNameArray &val, const UaInt32Array &dimensions) |
OpcUa_StatusCode | setLocalizedTextMatrix (UaLocalizedTextArray &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach) |
OpcUa_StatusCode | setLocalizedTextMatrix (const UaLocalizedTextArray &val, const UaInt32Array &dimensions) |
OpcUa_StatusCode | setExtensionObjectMatrix (UaExtensionObjectArray &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach=OpcUa_False) |
OpcUa_StatusCode | setVariantMatrix (UaVariantArray &val, const UaInt32Array &dimensions, OpcUa_Boolean bDetach) |
OpcUa_StatusCode | setVariantMatrix (const UaVariantArray &val, const UaInt32Array &dimensions) |
OpcUa_StatusCode | toBool (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 | toDataValueArray (UaDataValues &val) const |
OpcUa_StatusCode | toBoolMatrix (UaBooleanArray &val, UaInt32Array &dimensions) const |
OpcUa_StatusCode | toSByteMatrix (UaSByteArray &val, UaInt32Array &dimensions) const |
OpcUa_StatusCode | toByteMatrix (UaByteArray &val, UaInt32Array &dimensions) const |
OpcUa_StatusCode | toInt16Matrix (UaInt16Array &val, UaInt32Array &dimensions) const |
OpcUa_StatusCode | toUInt16Matrix (UaUInt16Array &val, UaInt32Array &dimensions) const |
OpcUa_StatusCode | toInt32Matrix (UaInt32Array &val, UaInt32Array &dimensions) const |
OpcUa_StatusCode | toUInt32Matrix (UaUInt32Array &val, UaInt32Array &dimensions) const |
OpcUa_StatusCode | toInt64Matrix (UaInt64Array &val, UaInt32Array &dimensions) const |
OpcUa_StatusCode | toUInt64Matrix (UaUInt64Array &val, UaInt32Array &dimensions) const |
OpcUa_StatusCode | toFloatMatrix (UaFloatArray &val, UaInt32Array &dimensions) const |
OpcUa_StatusCode | toDoubleMatrix (UaDoubleArray &val, UaInt32Array &dimensions) const |
OpcUa_StatusCode | toStringMatrix (UaStringArray &val, UaInt32Array &dimensions) const |
OpcUa_StatusCode | toDateTimeMatrix (UaDateTimeArray &val, UaInt32Array &dimensions) const |
OpcUa_StatusCode | toGuidMatrix (UaGuidArray &val, UaInt32Array &dimensions) const |
OpcUa_StatusCode | toByteStringMatrix (UaByteStringArray &val, UaInt32Array &dimensions) const |
OpcUa_StatusCode | toXmlElementMatrix (UaByteStringArray &val, UaInt32Array &dimensions) const |
OpcUa_StatusCode | toNodeIdMatrix (UaNodeIdArray &val, UaInt32Array &dimensions) const |
OpcUa_StatusCode | toExpandedNodeIdMatrix (UaExpandedNodeIdArray &val, UaInt32Array &dimensions) const |
OpcUa_StatusCode | toStatusCodeMatrix (UaStatusCodeArray &val, UaInt32Array &dimensions) const |
OpcUa_StatusCode | toQualifiedNameMatrix (UaQualifiedNameArray &val, UaInt32Array &dimensions) const |
OpcUa_StatusCode | toLocalizedTextMatrix (UaLocalizedTextArray &val, UaInt32Array &dimensions) const |
OpcUa_StatusCode | toExtensionObjectMatrix (UaExtensionObjectArray &val, UaInt32Array &dimensions) const |
OpcUa_StatusCode | toVariantMatrix (UaVariantArray &val, UaInt32Array &dimensions) const |
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 OpcUa_StatusCode | VartypeToUaType (VARTYPE vt, OpcUa_BuiltInType &ut, OpcUa_Boolean &isArray) |
Converts a Windows VARTYPE into a UA built in type. More... | |
static OpcUa_StatusCode | UaTypeToVartype (OpcUa_BuiltInType ut, OpcUa_Boolean isArray, VARTYPE &vt) |
Converts a UA built in type into a Windows VARTYPE. More... | |
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 OpcUa_Variant * | clone (const OpcUa_Variant &source) |
Copy UaVariant data to a newly allocated UaVariant. More... | |
static void | cloneTo (const OpcUa_Variant &source, OpcUa_Variant ©) |
Copy OpcUa_Variant data to an existing OpcUa_Variant structure. More... | |
Friends | |
UABASE_EXPORT UaDataStream & | operator<< (UaDataStream &, const UaVariant &) |
define UaDataStream operators for UaVariant. More... | |
UABASE_EXPORT UaDataStream & | operator>> (UaDataStream &, UaVariant &) |
Portable UA Variant class.
Converts Variant into all data types. The UaVariant class acts like a union for the most common UA data types.
UaVariant::UaVariant | ( | ) |
Constructs an empty variant.
UaVariant::UaVariant | ( | const UaVariant & | vVal | ) |
Constructs a variant initialized with the passed variant value.
[in] | vVal | The value as UaVariant |
UaVariant::UaVariant | ( | const OpcUa_Variant & | vVal | ) |
Constructs a variant initialized with the passed variant value.
[in] | vVal | The 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.
[in] | pValue | The value as OpcUa_Variant |
[in] | detachValue | Flag indicating if the passed variant should be detached |
UaVariant::UaVariant | ( | OpcUa_Boolean | bVal | ) |
Constructs a variant initialized with the passed bool value.
[in] | bVal | The value as OpcUa_Boolean |
UaVariant::UaVariant | ( | OpcUa_SByte | val | ) |
Constructs a variant initialized with the passed SByte value.
[in] | val | The value as OpcUa_SByte |
UaVariant::UaVariant | ( | OpcUa_Int16 | iVal | ) |
Constructs a variant initialized with the passed Int16 value.
[in] | iVal | The value as OpcUa_Int16 |
UaVariant::UaVariant | ( | OpcUa_Int32 | iVal | ) |
Constructs a variant initialized with the passed Int32 value.
[in] | iVal | The value as OpcUa_Int32 |
UaVariant::UaVariant | ( | OpcUa_Int64 | val | ) |
Constructs a variant initialized with the passed Int64 value.
[in] | val | The value as OpcUa_Int64 |
UaVariant::UaVariant | ( | OpcUa_UInt16 | iVal | ) |
Constructs a variant initialized with the passed UInt16 value.
[in] | iVal | The value as OpcUa_UInt16 |
UaVariant::UaVariant | ( | OpcUa_UInt32 | iVal | ) |
Constructs a variant initialized with the passed UInt32 value.
[in] | iVal | The value as OpcUa_UInt32 |
UaVariant::UaVariant | ( | OpcUa_UInt64 | val | ) |
Constructs a variant initialized with the passed UInt64 value.
[in] | val | The value as OpcUa_UInt64 |
UaVariant::UaVariant | ( | OpcUa_Float | fltVal | ) |
Constructs a variant initialized with the passed float value.
[in] | fltVal | The value as OpcUa_Float |
UaVariant::UaVariant | ( | OpcUa_Double | dblVal | ) |
Constructs a variant initialized with the passed double value.
[in] | dblVal | The value as OpcUa_Double |
UaVariant::UaVariant | ( | const UaString & | val | ) |
Constructs a variant initialized with the passed string value.
[in] | val | The value as UaString |
UaVariant::UaVariant | ( | const UaDateTime & | val | ) |
Constructs a variant initialized with the passed DateTime value.
[in] | val | The value as UaDateTime |
UaVariant::UaVariant | ( | const UaGuid & | val | ) |
Constructs a variant initialized with the passed Guid value.
[in] | val | The value as UaGuid |
UaVariant::UaVariant | ( | const UaNodeId & | val | ) |
Constructs a variant initialized with the passed NodeId value.
[in] | val | The value as UaNodeId |
UaVariant::UaVariant | ( | const UaQualifiedName & | val | ) |
Constructs a variant initialized with the passed QualifiedName value.
[in] | val | The value as UaQualifiedName |
UaVariant::UaVariant | ( | const UaLocalizedText & | val | ) |
Constructs a variant initialized with the passed LocalizedText value.
[in] | val | The value as UaLocalizedText |
|
static |
Adjust types to prepare comparison of values independent of the variant type.
Adjustment is only implemented for Number data types. The data type is adjusted to Double, UInt64 or Int64 depending on the passed data types. Setting bForceConversion to true forces the method to always convert the variants to either Double, Int64 or UInt64.
OpcUa_StatusCode UaVariant::applyIndexRange | ( | const UaNumericRange & | indexRange, |
const UaVariant & | value | ||
) |
Writes a value to the UaVariant considering the given index range.
[in] | indexRange | The index range specifying where to write the value |
[in] | value | The value to apply considering the index range |
void UaVariant::arrayDimensions | ( | UaUInt32Array & | arrayDimensions | ) | const |
Writes the size of each dimension to an UaUInt32Array.
arrayDimensions | The array to write to |
OpcUa_Int32 UaVariant::arraySize | ( | ) | const |
OpcUa_Byte UaVariant::arrayType | ( | ) | const |
Get the actual array type.
Possible values are
void UaVariant::attach | ( | const OpcUa_Variant * | vVal | ) |
Attach the internal variant data of the passed variant to the own variant.
vVal | a value as OpcUa_Variant. |
OpcUa_StatusCode UaVariant::changeType | ( | OpcUa_BuiltInType | type, |
OpcUa_Boolean | toArray | ||
) |
Change the type of a parameter.
type | the type to change. |
toArray | true if set to array false if not. |
void UaVariant::clear | ( | ) |
Clear the data of the UaVariant.
|
static |
|
static |
Copy OpcUa_Variant data to an existing OpcUa_Variant structure.
source | Source OpcUa_Variant to clone. |
copy | New copy of source OpcUa_Variant. copy gets not cleared within this method. |
|
static |
Compares two variant values.
Val1 | First value as OpcUa_Variant. |
Val2 | Second value as OpcUa_Variant. |
OpcUa_Variant * UaVariant::copy | ( | ) | const |
Copy UaVariant data to a newly allocated OpcUa_Variant.
void UaVariant::copyTo | ( | OpcUa_Variant * | pDst | ) | const |
Copy UaVariant data to an existing OpcUa_Variant structure.
pDst | the 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:
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:
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.
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.
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.
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.
[in] | indexRange | The index range to apply |
[out] | value | The result of applying the index range to the UaVariant |
OpcUa_Boolean UaVariant::isArray | ( | ) | const |
Check whether the array type of the Variant is OpcUa_VariantArrayType_Array.
OpcUa_Boolean UaVariant::isEmpty | ( | ) | const |
Checks whether the variant is empty or not.
OpcUa_Boolean UaVariant::isMatrix | ( | ) | const |
Check if Variant contains a matrix.
UaVariant::operator const OpcUa_Variant * | ( | ) | const |
Get a pointer to the internal OpcUa_Variant.
UaVariant::operator VARIANT | ( | ) | const |
Converts a UaVariant value to a Windows Variant value.
The caller is responsible for clearing the Windows VARIANT with VariantClear()
bool UaVariant::operator!= | ( | const UaVariant & | vVal | ) | const |
Returns true if this variant is not equal to variant other; otherwise returns false.
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.
OpcUa_Variant UaVariant::operator[] | ( | const OpcUa_UInt32 | index | ) | const |
Returns the array element for the given index.
This method works also for scalar ByteString values.
index | Array in index. |
void UaVariant::setBool | ( | OpcUa_Boolean | val | ) |
Sets a boolean value.
[in] | val | The new boolean value |
void UaVariant::setBoolArray | ( | UaBooleanArray & | val, |
OpcUa_Boolean | bDetach = OpcUa_False |
||
) |
Sets a value to UaBoolArray.
val | a value as UaBoolArray. |
bDetach | true if detach false if not. |
void UaVariant::setByte | ( | OpcUa_Byte | val | ) |
Sets a value to OpcUa_Byte.
val | a value as OpcUa_Byte. |
void UaVariant::setByteArray | ( | UaByteArray & | val | ) |
Sets a value to UaByteArray.
val | a value as UaByteArray. |
void UaVariant::setByteString | ( | UaByteString & | val, |
OpcUa_Boolean | bDetach | ||
) |
Sets a ByteString value to the Variant.
val | a value as UaByteString. |
bDetach | true if detach false if not. |
void UaVariant::setByteStringArray | ( | UaByteStringArray & | val, |
OpcUa_Boolean | bDetach = OpcUa_False |
||
) |
Sets a value to UaByteStringArray.
val | a value as UaByteStringArray. |
bDetach | true if detach false if not. |
void UaVariant::setByteStringArray | ( | const UaByteStringArray & | val | ) |
Sets a value to UaByteStringArray.
val | a value as UaByteStringArray. |
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.
pVal | Pointer to the UaDataValue to set. The UaDataValue will be changed if the detach flag is set. |
bDetach | The 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.
val | a value as UaDataValues. |
bDetach | true if detach false if not. |
void UaVariant::setDataValueArray | ( | const UaDataValues & | val | ) |
Sets a value to UaDataValues.
val | a value as UaDataValues. |
void UaVariant::setDateTime | ( | const UaDateTime & | val | ) |
Sets a value to UaDateTime.
val | a value as UaDateTime. |
void UaVariant::setDateTimeArray | ( | UaDateTimeArray & | val, |
OpcUa_Boolean | bDetach = OpcUa_False |
||
) |
Sets a value to UaDateTimeArray.
val | a value as UaDateTimeArray. |
bDetach | true if detach false if not. |
void UaVariant::setDouble | ( | OpcUa_Double | val | ) |
Sets a value to OpcUa_Double.
val | a value as OpcUa_Double. |
void UaVariant::setDoubleArray | ( | UaDoubleArray & | val, |
OpcUa_Boolean | bDetach = OpcUa_False |
||
) |
Sets a value to UaDoubleArray.
val | a value as UaDoubleArray. |
bDetach | true if detach false if not. |
void UaVariant::setExpandedNodeId | ( | const UaExpandedNodeId & | val | ) |
Sets a UaExpandedNodeId value to the variant.
val | a value as UaExpandedNodeId. |
void UaVariant::setExpandedNodeIdArray | ( | UaExpandedNodeIdArray & | val, |
OpcUa_Boolean | bDetach = OpcUa_False |
||
) |
Sets a OpcUa_ExpandedNodeId array to the variant.
val | a value as UaExpandedNodeIdArray. |
bDetach | true if detach false if not. |
void UaVariant::setExtensionObject | ( | UaExtensionObject & | val, |
OpcUa_Boolean | bDetach | ||
) |
Sets a ExtensionObject value to the variant.
val | a value as UaExtensionObject. |
bDetach | true if detach false if not. |
void UaVariant::setExtensionObjectArray | ( | UaExtensionObjectArray & | val, |
OpcUa_Boolean | bDetach = OpcUa_False |
||
) |
Sets a value to UaExtensionObjectArray.
val | a value as UaExtensionObjectArray. |
bDetach | true if detach false if not. |
void UaVariant::setFloat | ( | OpcUa_Float | val | ) |
Sets a value to OpcUa_Float.
val | a value as OpcUa_Float. |
void UaVariant::setFloatArray | ( | UaFloatArray & | val, |
OpcUa_Boolean | bDetach = OpcUa_False |
||
) |
Sets a value to UaFloatArray.
val | a value as UaFloatArray. |
bDetach | true if detach false if not. |
void UaVariant::setGuid | ( | const UaGuid & | val | ) |
void UaVariant::setGuidArray | ( | UaGuidArray & | val, |
OpcUa_Boolean | bDetach = OpcUa_False |
||
) |
Sets a value to UaGuidArray.
val | a value as UaGuidArray. |
bDetach | true if detach false if not. |
void UaVariant::setInt16 | ( | OpcUa_Int16 | val | ) |
Sets a value to OpcUa_Int16.
val | a value as OpcUa_Int16. |
void UaVariant::setInt16Array | ( | UaInt16Array & | val, |
OpcUa_Boolean | bDetach = OpcUa_False |
||
) |
Sets a value to UaInt16Array.
val | a value as UaInt16Array. |
bDetach | true if detach false if not. |
void UaVariant::setInt32 | ( | OpcUa_Int32 | val | ) |
Sets a value to OpcUa_Int32.
val | a value as OpcUa_Int32. |
void UaVariant::setInt32Array | ( | UaInt32Array & | val, |
OpcUa_Boolean | bDetach = OpcUa_False |
||
) |
Sets a value to UaInt32Array.
val | a value as UaInt32Array. |
bDetach | true if detach false if not. |
void UaVariant::setInt64 | ( | OpcUa_Int64 | val | ) |
Sets a value to OpcUa_Int64.
val | a value as OpcUa_Int64. |
void UaVariant::setInt64Array | ( | UaInt64Array & | val, |
OpcUa_Boolean | bDetach = OpcUa_False |
||
) |
Sets a value to UaInt64Array.
val | a value as UaInt64Array. |
bDetach | true if detach false if not. |
void UaVariant::setLocalizedText | ( | const UaLocalizedText & | val | ) |
Sets a value to UaLocalizedText.
val | a value as UaLocalizedText. |
void UaVariant::setLocalizedTextArray | ( | UaLocalizedTextArray & | val, |
OpcUa_Boolean | bDetach | ||
) |
Sets a value to UaLocalizedTextArray.
val | a value as UaLocalizedTextArray. |
bDetach | true if detach false if not. |
void UaVariant::setLocalizedTextArray | ( | const UaLocalizedTextArray & | val | ) |
Sets a value to UaLocalizedTextArray.
val | a value as UaLocalizedTextArray. |
void UaVariant::setNodeId | ( | const UaNodeId & | val | ) |
void UaVariant::setNodeIdArray | ( | UaNodeIdArray & | val, |
OpcUa_Boolean | bDetach = OpcUa_False |
||
) |
Sets a OpcUa_NodeId array to the variant.
val | a value as UaNodeIdArray. |
bDetach | true if detach false if not. |
void UaVariant::setQualifiedName | ( | const UaQualifiedName & | val | ) |
Sets a value to UaQualifiedName.
val | a value as UaQualifiedName. |
void UaVariant::setQualifiedNameArray | ( | UaQualifiedNameArray & | val, |
OpcUa_Boolean | bDetach | ||
) |
Sets a value to UaQualifiedNameArray.
val | a value as UaQualifiedNameArray. |
bDetach | true if detach false if not. |
void UaVariant::setQualifiedNameArray | ( | const UaQualifiedNameArray & | val | ) |
Sets a value to QualifiedNameArray.
val | a value as UaQualifiedNameArray. |
void UaVariant::setSByte | ( | OpcUa_SByte | val | ) |
Sets a value to OpcUa_SByte.
val | a value as OpcUa_SByte. |
void UaVariant::setSByteArray | ( | UaSByteArray & | val, |
OpcUa_Boolean | bDetach = OpcUa_False |
||
) |
Sets a value to UaSByteArray.
val | a value as UaSByteArray. |
bDetach | true if detach false if not. |
void UaVariant::setStatusCode | ( | OpcUa_StatusCode | val | ) |
Sets a OpcUa_StatusCode value to the Variant.
val | a value as OpcUa_StatusCode. |
void UaVariant::setStatusCodeArray | ( | UaStatusCodeArray & | val, |
OpcUa_Boolean | bDetach = OpcUa_False |
||
) |
Sets a OpcUa_StatusCode array to the variant.
val | a value as UaStatusCodeArray. |
bDetach | true if detach false if not. |
void UaVariant::setString | ( | const UaString & | val | ) |
Sets a String value to the Variant.
val | a value as UaString. |
void UaVariant::setStringArray | ( | UaStringArray & | val, |
OpcUa_Boolean | bDetach | ||
) |
Sets a value to UaStringArray.
val | a value as UaStringArray. |
bDetach | true if detach false if not. |
void UaVariant::setStringArray | ( | const UaStringArray & | val | ) |
Sets a value to UaStringArray.
val | a value as UaStringArray. |
void UaVariant::setUInt16 | ( | OpcUa_UInt16 | val | ) |
Sets a value to OpcUa_UInt16.
val | a value as OpcUa_UInt16. |
void UaVariant::setUInt16Array | ( | UaUInt16Array & | val, |
OpcUa_Boolean | bDetach = OpcUa_False |
||
) |
Sets a value to UaInt16Array.
val | a value as UaInt16Array. |
bDetach | true if detach false if not. |
void UaVariant::setUInt32 | ( | OpcUa_UInt32 | val | ) |
Sets a OpcUa_UInt32 value to the Variant.
val | a value as OpcUa_UInt32. |
void UaVariant::setUInt32Array | ( | UaUInt32Array & | val, |
OpcUa_Boolean | bDetach = OpcUa_False |
||
) |
Sets a value to UaUInt32Array.
val | a value as UaUInt32Array. |
bDetach | true if detach false if not. |
void UaVariant::setUInt64 | ( | OpcUa_UInt64 | val | ) |
Sets a value to OpcUa_UInt64.
val | a value as OpcUa_UInt64. |
void UaVariant::setUInt64Array | ( | UaUInt64Array & | val, |
OpcUa_Boolean | bDetach = OpcUa_False |
||
) |
Sets a value to UaUInt64Array.
val | a value as UaUInt64Array. |
bDetach | true if detach false if not. |
void UaVariant::setVariantArray | ( | UaVariantArray & | val, |
OpcUa_Boolean | bDetach = OpcUa_False |
||
) |
Sets a value to UaVariantArray.
val | a value as UaVariantArray. |
bDetach | true if detach false if not. |
void UaVariant::setVariantArray | ( | const UaVariantArray & | val | ) |
Sets a value to UaVariantArray.
val | a value as UaVariantArray. |
void UaVariant::setXmlElement | ( | const UaString & | val | ) |
Sets a XmlElement value to the Variant.
val | a value as UaString. |
void UaVariant::setXmlElement | ( | UaByteString & | val, |
OpcUa_Boolean | bDetach | ||
) |
Sets a XmlElement value to the Variant.
val | a value as UaByteString. |
bDetach | true if detach false if not. |
void UaVariant::setXmlElementArray | ( | UaByteStringArray & | val, |
OpcUa_Boolean | bDetach = OpcUa_False |
||
) |
Sets a value to UaXmlElementArray.
val | a value as UaByteStringArray. |
bDetach | true if detach false if not. |
void UaVariant::setXmlElementArray | ( | const UaByteStringArray & | val | ) |
Sets a value to XmlElementArray.
val | a value as UaByteStringArray. |
OpcUa_StatusCode UaVariant::toBool | ( | OpcUa_Boolean & | val | ) | const |
Converts the UaVariant into a OpcUa_Boolean.
val | a value as OpcUa_Boolean. |
OpcUa_StatusCode UaVariant::toBoolArray | ( | UaBooleanArray & | val | ) | const |
Converts the UaVariant into a UaBoolArray.
val | a value as UaBoolArray. |
OpcUa_StatusCode UaVariant::toByte | ( | OpcUa_Byte & | val | ) | const |
Converts the UaVariant into a OpcUa_Byte.
val | a value as OpcUa_Byte. |
OpcUa_StatusCode UaVariant::toByteArray | ( | UaByteArray & | val | ) | const |
Converts the UaVariant into a UaByteArray.
val | a value as UaByteArray. |
OpcUa_StatusCode UaVariant::toByteString | ( | UaByteString & | val | ) | const |
Converts the UaVariant into a UaByteString.
val | a value as UaByteString. |
OpcUa_StatusCode UaVariant::toByteStringArray | ( | UaByteStringArray & | val | ) | const |
Converts the UaVariant into a UaByteStringArray.
val | a value as UaByteStringArray. |
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.
pVal | a value as UaDataValue. |
OpcUa_StatusCode UaVariant::toDateTime | ( | UaDateTime & | val | ) | const |
Converts the UaVariant into a UaDateTime.
val | a value as UaDateTime. |
OpcUa_StatusCode UaVariant::toDateTimeArray | ( | UaDateTimeArray & | val | ) | const |
Converts the UaVariant into a UaDateTimeArray.
val | a value as UaDateTimeArray. |
OpcUa_StatusCode UaVariant::toDouble | ( | OpcUa_Double & | val | ) | const |
Converts the UaVariant into a OpcUa_Double.
val | a value as OpcUa_Double. |
OpcUa_StatusCode UaVariant::toDoubleArray | ( | UaDoubleArray & | val | ) | const |
Converts the UaVariant into a UaDoubleArray.
val | a value as UaDoubleArray. |
OpcUa_StatusCode UaVariant::toExpandedNodeId | ( | UaExpandedNodeId & | val | ) | const |
Converts the UaVariant into a UaExpandedNodeId.
val | a value as UaExpandedNodeId. |
OpcUa_StatusCode UaVariant::toExpandedNodeIdArray | ( | UaExpandedNodeIdArray & | val | ) | const |
Converts the UaVariant into a UaExpandedNodeIdArray.
val | a value as UaExpandedNodeIdArray. |
OpcUa_StatusCode UaVariant::toExtensionObject | ( | UaExtensionObject & | val | ) | const |
Converts the UaVariant into a UaExtensionObject.
val | a value as UaExtensionObject. |
OpcUa_StatusCode UaVariant::toExtensionObjectArray | ( | UaExtensionObjectArray & | val | ) | const |
Converts the UaVariant into an array of OpcUa_ExtensionObject.
val | a value as UaExtensionObjectArray. |
OpcUa_StatusCode UaVariant::toFloat | ( | OpcUa_Float & | val | ) | const |
Converts the UaVariant into a OpcUa_Float.
val | a value as OpcUa_Float. |
OpcUa_StatusCode UaVariant::toFloatArray | ( | UaFloatArray & | val | ) | const |
Converts the UaVariant into a UaFloatArray.
val | a value as UaFloatArray. |
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().
OpcUa_StatusCode UaVariant::toGuid | ( | UaGuid & | val | ) | const |
OpcUa_StatusCode UaVariant::toGuidArray | ( | UaGuidArray & | val | ) | const |
Converts the UaVariant into a UaGuidArray.
val | a value as UaGuidArray. |
OpcUa_StatusCode UaVariant::toInt16 | ( | OpcUa_Int16 & | val | ) | const |
Converts the UaVariant into a OpcUa_Int16.
val | a value as OpcUa_Int16. |
OpcUa_StatusCode UaVariant::toInt16Array | ( | UaInt16Array & | val | ) | const |
Converts the UaVariant into a UaInt16Array.
val | a value as UaInt16Array. |
OpcUa_StatusCode UaVariant::toInt32 | ( | OpcUa_Int32 & | val | ) | const |
Converts the UaVariant into a OpcUa_Int32.
val | a value as OpcUa_Int32. |
OpcUa_StatusCode UaVariant::toInt32Array | ( | UaInt32Array & | val | ) | const |
Converts the UaVariant into a UaInt32Array.
val | a value as UaInt32Array. |
OpcUa_StatusCode UaVariant::toInt64 | ( | OpcUa_Int64 & | val | ) | const |
Converts the UaVariant into a OpcUa_Int64.
val | a value as OpcUa_Int64. |
OpcUa_StatusCode UaVariant::toInt64Array | ( | UaInt64Array & | val | ) | const |
Converts the UaVariant into a UaInt64Array.
val | a value as UaInt64Array. |
OpcUa_StatusCode UaVariant::toLocalizedText | ( | UaLocalizedText & | val | ) | const |
Converts the UaVariant into a UaLocalizedText.
val | a value as UaLocalizedText. |
OpcUa_StatusCode UaVariant::toLocalizedTextArray | ( | UaLocalizedTextArray & | val | ) | const |
Converts the UaVariant into an array of OpcUa_LocalizedText.
val | a value as UaLocalizedTextArray. |
OpcUa_StatusCode UaVariant::toNodeId | ( | UaNodeId & | val | ) | const |
OpcUa_StatusCode UaVariant::toNodeIdArray | ( | UaNodeIdArray & | val | ) | const |
Converts the UaVariant into a toNodeIdArray.
val | a value as UaNodeIdArray. |
OpcUa_StatusCode UaVariant::toQualifiedName | ( | UaQualifiedName & | val | ) | const |
Converts the UaVariant into a UaQualifiedName.
val | a value as UaQualifiedName. |
OpcUa_StatusCode UaVariant::toQualifiedNameArray | ( | UaQualifiedNameArray & | val | ) | const |
Converts the UaVariant into a UaQualifiedNameArray.
val | a value as UaQualifiedNameArray. |
OpcUa_StatusCode UaVariant::toSByte | ( | OpcUa_SByte & | val | ) | const |
Converts the UaVariant into a OpcUa_SByte.
val | a value as OpcUa_SByte. |
OpcUa_StatusCode UaVariant::toSByteArray | ( | UaSByteArray & | val | ) | const |
Converts the UaVariant into a UaSByteArray.
val | a value as UaSByteArray. |
OpcUa_StatusCode UaVariant::toStatusCode | ( | OpcUa_StatusCode & | val | ) | const |
Converts the UaVariant into a OpcUa_StatusCode.
val | a value as OpcUa_StatusCode. |
OpcUa_StatusCode UaVariant::toStatusCodeArray | ( | UaStatusCodeArray & | val | ) | const |
Converts the UaVariant into a UaStatusCodeArray.
val | a value as UaStatusCodeArray. |
UaString UaVariant::toString | ( | ) | const |
OpcUa_StatusCode UaVariant::toStringArray | ( | UaStringArray & | val | ) | const |
Converts the UaVariant into a UaStringArray.
val | a value as UaStringArray. |
OpcUa_StatusCode UaVariant::toUInt16 | ( | OpcUa_UInt16 & | val | ) | const |
Converts the UaVariant into a OpcUa_UInt16.
val | a value as OpcUa_UInt16. |
OpcUa_StatusCode UaVariant::toUInt16Array | ( | UaUInt16Array & | val | ) | const |
Converts the UaVariant into a UaUInt16Array.
val | a value as UaUInt16Array. |
OpcUa_StatusCode UaVariant::toUInt32 | ( | OpcUa_UInt32 & | val | ) | const |
Converts the UaVariant into a OpcUa_UInt32.
val | a value as OpcUa_UInt32. |
OpcUa_StatusCode UaVariant::toUInt32Array | ( | UaUInt32Array & | val | ) | const |
Converts the UaVariant into a UaUInt32Array.
val | a value as UaUInt32Array. |
OpcUa_StatusCode UaVariant::toUInt64 | ( | OpcUa_UInt64 & | val | ) | const |
Converts the UaVariant into a OpcUa_UInt64.
val | a value as OpcUa_UInt64. |
OpcUa_StatusCode UaVariant::toUInt64Array | ( | UaUInt64Array & | val | ) | const |
Converts the UaVariant into a UaUInt64Array.
val | a value as UaUInt64Array. |
OpcUa_StatusCode UaVariant::toVariantArray | ( | UaVariantArray & | val | ) | const |
Converts the UaVariant into an array of OpcUa_Variant.
val | a value as UaVariantArray. |
OpcUa_StatusCode UaVariant::toXmlElement | ( | UaByteString & | val | ) | const |
Converts the UaVariant into a UaByteString containing the XML element.
val | a value as UaByteString. |
OpcUa_StatusCode UaVariant::toXmlElementArray | ( | UaByteStringArray & | val | ) | const |
Converts the UaVariant into a UaByteStringArray.
val | a value as UaByteStringArray. |
OpcUa_BuiltInType UaVariant::type | ( | ) | const |
Get the type of the Variant.
|
static |
Converts a UA built in type into a Windows VARTYPE.
[in] | uaType | The OPC UA built in type |
[in] | isArray | Flag indicating if the value is an array |
[out] | vt | The resulting Windows variant type |
|
static |
Converts a Windows VARTYPE into a UA built in type.
[in] | vt | The Windows variant type |
[out] | ut | The resulting OPC UA built in type |
[out] | isArray | Flag indicating if the value is an array |
|
friend |
define UaDataStream operators for UaVariant.