UaDataValue Class Reference
[UA Base Library Classes]

Wrapper classs for the ua stack structure OpcUa_DataValue. More...

#include <uadatavalue.h>

List of all members.


Public Member Functions

 UaDataValue ()
 UaDataValue (const UaDataValue &other)
 UaDataValue (const OpcUa_DataValue &other)
 UaDataValue (const UaVariant &value, OpcUa_StatusCode statusCode, const UaDateTime &sourceTimestamp, const UaDateTime &serverTimestamp)
 ~UaDataValue ()
void clear ()
UaDataValueoperator= (const UaDataValue &other)
bool operator== (const UaDataValue &other) const
bool operator!= (const UaDataValue &other) const
 operator const OpcUa_DataValue * () const
OpcUa_DataValue * copy () const
void copyTo (OpcUa_DataValue *pDst) const
void attach (const OpcUa_DataValue *pValue)
void detach ()
void setDataValue (UaVariant &value, OpcUa_Boolean detachValue, OpcUa_StatusCode statusCode, OpcUa_DateTime sourceTimestamp, OpcUa_DateTime serverTimestamp)
void setValue (UaVariant &value, OpcUa_Boolean detachValue, OpcUa_Boolean updateTimeStamps=OpcUa_False)
void setStatusCode (OpcUa_StatusCode statusCode)
void setSourceTimestamp (OpcUa_DateTime sourceTimestamp)
void setServerTimestamp (OpcUa_DateTime serverTimestamp)
const OpcUa_Variant * value () const
OpcUa_DateTime sourceTimestamp () const
OpcUa_DateTime serverTimestamp () const
OpcUa_Boolean isSourceTimestampSet () const
OpcUa_Boolean isServerTimestampSet () const

Static Public Member Functions

static OpcUa_DataValue * clone (const OpcUa_DataValue &source)
static void cloneTo (const OpcUa_DataValue &source, OpcUa_DataValue &copy)

Detailed Description

Wrapper classs for the ua stack structure OpcUa_DataValue.

Constructor & Destructor Documentation

UaDataValue::UaDataValue (  ) 

construction

UaDataValue::UaDataValue ( const UaDataValue other  ) 

construction

Parameters:
other the UaDataValue.

UaDataValue::UaDataValue ( const OpcUa_DataValue &  other  ) 

construction

Parameters:
other the OpcUa_DataValue

UaDataValue::UaDataValue ( const UaVariant value,
OpcUa_StatusCode  statusCode,
const UaDateTime sourceTimestamp,
const UaDateTime serverTimestamp 
)

construction

Parameters:
value the value of a UaVariant.
statusCode the OPC UA Status code.
sourceTimestamp the source timestamp.
serverTimestamp the timestamp of the server.

UaDataValue::~UaDataValue (  ) 

destruction


Member Function Documentation

void UaDataValue::clear (  ) 

Clear the data of the UaDataValue.

UaDataValue & UaDataValue::operator= ( const UaDataValue other  ) 

Assignment operator.

Parameters:
other the UaDataValue to assign.
Returns:
Assignment operator.

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

Compare variables if they are similar.

Parameters:
other the char to compare.
Returns:
true if not similar false if similar.

bool UaDataValue::operator!= ( const UaDataValue other  )  const

Returns true if other is not equal to this.

See also:
operator==
Parameters:
other the UaString to compare.
Returns:
true if other is not equal to this.

UaDataValue::operator const OpcUa_DataValue * (  )  const

Return internal OpcUa_DataValue structure.

Returns:
internal OpcUa_DataValue structure.

OpcUa_DataValue * UaDataValue::copy (  )  const

Copy UaDataValue data to a newly allocated OpcUa_DataValue.

Returns:
a newly allocated OpcUa_DataValue.

void UaDataValue::copyTo ( OpcUa_DataValue *  pDst  )  const

Copy UaDataValue data to an exisitng OpcUa_DataValue structure.

Parameters:
pDst the destination of this operation.

OpcUa_DataValue * UaDataValue::clone ( const OpcUa_DataValue &  source  )  [static]

Copy OpcUa_DataValue data to a newly allocated OpcUa_DataValue.

Parameters:
source the source of this operation.
Returns:
a newly allocated OpcUa_DataValue.

void UaDataValue::cloneTo ( const OpcUa_DataValue &  source,
OpcUa_DataValue &  copy 
) [static]

Copy OpcUa_VariableTypeAttributes data to an exisitng OpcUa_VariableTypeAttributes structure.

Parameters:
source Source OpcUa_VariableTypeAttributes to clone.
copy New copy of source OpcUa_VariableTypeAttributes.

void UaDataValue::attach ( const OpcUa_DataValue *  pValue  ) 

Attaches the data of the parameter pValue.

Parameters:
pValue Parameter to attach to. Don't clear the data of pValue afterwards manually, because UaDataValue is responsible for it now.

void UaDataValue::detach (  ) 

Reset OpcUa_DataValue structure without clearing the data. You should copy the data before detaching it. You are responsible for clearing the data after detaching. void sample(UaDataValue &dataValue) { OpcUa_DataValue flatcopy = datavalue; datavalue.detach(); m_lstValues.push_back(flatcopy); }

void UaDataValue::setDataValue ( UaVariant value,
OpcUa_Boolean  detachValue,
OpcUa_StatusCode  statusCode,
OpcUa_DateTime  sourceTimestamp,
OpcUa_DateTime  serverTimestamp 
)

Converts an UaDataValue to a String.

Returns:
a converted String. Sets a data value.
Parameters:
value the value to set.
detachValue Indicates if the method can detach the value from the wrapper class.
statusCode the OPC UA Status code.
sourceTimestamp the source timestamp.
serverTimestamp the timestamp of the server.

void UaDataValue::setValue ( UaVariant value,
OpcUa_Boolean  detachValue,
OpcUa_Boolean  updateTimeStamps = OpcUa_False 
)

Set a value.

Parameters:
value the value to set.
detachValue Indicates if the method can detach the value from the wrapper class.
updateTimeStamps Indicates if the method can update the value from the wrapper class.

void UaDataValue::setStatusCode ( OpcUa_StatusCode  statusCode  )  [inline]

Set the status code.

Parameters:
statusCode the OPC UA Status code.

void UaDataValue::setSourceTimestamp ( OpcUa_DateTime  sourceTimestamp  )  [inline]

Sets the source timestamp.

Parameters:
sourceTimestamp the timestamp to set.

void UaDataValue::setServerTimestamp ( OpcUa_DateTime  serverTimestamp  )  [inline]

Sets the source timestamp of the server.

Parameters:
serverTimestamp the source timestamp of the server.

const OpcUa_Variant* UaDataValue::value (  )  const [inline]

Get the value of a variable.

Returns:
the value of a variable.

OpcUa_DateTime UaDataValue::sourceTimestamp (  )  const [inline]

Get the source timestamp.

Returns:
the source timestamp.

OpcUa_DateTime UaDataValue::serverTimestamp (  )  const [inline]

Get the source timestamp of the server.

Returns:
the source timestamp of the server.

OpcUa_Boolean UaDataValue::isSourceTimestampSet (  )  const

heck if the source timestamp is set.

Returns:
true if set false if not.

OpcUa_Boolean UaDataValue::isServerTimestampSet (  )  const

Check if the server timestamp is set.

Returns:
true if set false if not.


The documentation for this class was generated from the following files:
  • src/uabase/uabasecpp/uadatavalue.h
  • src/uabase/uabasecpp/uadatavalue.cpp