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

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

#include <uaannotation.h>

Public Member Functions

 UaAnnotation ()
 Constructs an instance of the class UaAnnotation with empty default values.
 
 UaAnnotation (const UaAnnotation &other)
 Constructs an instance of the class UaAnnotation with values from another UaAnnotation object. More...
 
 UaAnnotation (const OpcUa_Annotation &other)
 Constructs an instance of the class UaAnnotation with values from another OpcUa_Annotation structure. More...
 
 UaAnnotation (const UaString &message, const UaString &userName, const UaDateTime &annotationTime)
 Constructs an instance of the class UaAnnotation with values provided in the constructor.
 
 UaAnnotation (const UaExtensionObject &extensionObject)
 Constructs an instance of the class UaAnnotation initialized with value from a UaExtensionObject. More...
 
 UaAnnotation (const OpcUa_ExtensionObject &extensionObject)
 Constructs an instance of the class UaAnnotation initialized with value from an OpcUa_ExtensionObject structure. More...
 
 ~UaAnnotation ()
 Destroys the UaAnnotation object.
 
void clear ()
 Clear the data of the UaAnnotation. More...
 
bool operator== (const UaAnnotation &other) const
 Compare two UaAnnotation for equality. More...
 
bool operator!= (const UaAnnotation &other) const
 Compare two UaAnnotation for inequality. More...
 
UaAnnotationoperator= (const UaAnnotation &other)
 Assignment operator. More...
 
OpcUa_Annotationcopy () const
 Copy UaAnnotation data to a newly allocated OpcUa_Annotation. More...
 
void copyTo (OpcUa_Annotation *pDst) const
 Copy UaAnnotation data to an existing OpcUa_Annotation structure. More...
 
void attach (OpcUa_Annotation *pValue)
 Attaches to an existing OpcUa_Annotation structure. More...
 
OpcUa_Annotationdetach (OpcUa_Annotation *pDst)
 Detaches the internal Annotation structure from this class. More...
 
UaString getMessage () const
 Annotation message or text.
 
UaString getUserName () const
 The user that added the Annotation, as supplied by underlying system.
 
UaDateTime getAnnotationTime () const
 The time the Annotation was added. More...
 
void setMessage (const UaString &message)
 Annotation message or text.
 
void setUserName (const UaString &userName)
 The user that added the Annotation, as supplied by underlying system.
 
void setAnnotationTime (const UaDateTime &annotationTime)
 The time the Annotation was added. More...
 

Static Public Member Functions

static OpcUa_Annotationclone (const OpcUa_Annotation &source)
 Copy OpcUa_Annotation data to a newly allocated OpcUa_Annotation. More...
 
static void cloneTo (const OpcUa_Annotation &source, OpcUa_Annotation &copy)
 Copy OpcUa_Annotation data to an existing OpcUa_Annotation structure. More...
 

Detailed Description

Wrapper class for the UA stack structure OpcUa_Annotation.

This class encapsulates the native OpcUa_Annotation structure and handles memory allocation and cleanup for you. UaAnnotation uses implicit sharing to avoid needless copying and to boost the performance. Only if you modify a shared Annotation it creates a copy for that (copy-on-write). So assigning another UaAnnotation or passing it as parameter needs constant time and is nearly as fast as assigning a pointer.

Describes Annotation information for the history data items.

Constructor & Destructor Documentation

UaAnnotation::UaAnnotation ( const UaAnnotation other)

Constructs an instance of the class UaAnnotation with values from another UaAnnotation object.

Parameters
otherthe other UaAnnotation used to initialize the object
UaAnnotation::UaAnnotation ( const OpcUa_Annotation other)

Constructs an instance of the class UaAnnotation with values from another OpcUa_Annotation structure.

Parameters
otherthe other OpcUa_Annotation used to initialize the object
UaAnnotation::UaAnnotation ( const UaExtensionObject extensionObject)

Constructs an instance of the class UaAnnotation initialized with value from a UaExtensionObject.

Parameters
extensionObjectthe extension object containing the Annotation
UaAnnotation::UaAnnotation ( const OpcUa_ExtensionObject extensionObject)

Constructs an instance of the class UaAnnotation initialized with value from an OpcUa_ExtensionObject structure.

Parameters
extensionObjectthe extension object containing the Annotation

Member Function Documentation

void UaAnnotation::attach ( OpcUa_Annotation pValue)

Attaches to an existing OpcUa_Annotation structure.

Don't manually free the attached structure afterwards, because UaAnnotation is responsible for it now.

Parameters
pValue[in] Parameter to attach to.
void UaAnnotation::clear ( )

Clear the data of the UaAnnotation.

OpcUa_Annotation * UaAnnotation::clone ( const OpcUa_Annotation source)
static

Copy OpcUa_Annotation data to a newly allocated OpcUa_Annotation.

Parameters
sourceSource to clone.
Returns
pointer to a newly allocated OpcUa_Annotation.
void UaAnnotation::cloneTo ( const OpcUa_Annotation source,
OpcUa_Annotation copy 
)
static

Copy OpcUa_Annotation data to an existing OpcUa_Annotation structure.

Parameters
sourcethe source of the clone operation.
copythe destination of the clone operation.
OpcUa_Annotation * UaAnnotation::copy ( ) const

Copy UaAnnotation data to a newly allocated OpcUa_Annotation.

Returns
pointer to a newly allocated OpcUa_Annotation.
void UaAnnotation::copyTo ( OpcUa_Annotation pDst) const

Copy UaAnnotation data to an existing OpcUa_Annotation structure.

Parameters
pDstthe destination of this copy operation.
OpcUa_Annotation * UaAnnotation::detach ( OpcUa_Annotation pDst)

Detaches the internal Annotation structure from this class.

This way you take over the control of freeing the Annotation data. If more than one reference exists, the data is copied to pDst instead of being detached.

Parameters
pDst[out] Pointer to an OpcUa_Annotation structure that receives the Annotation data.
Returns
If the function succeeds, pDst is returned, otherwise 0 is returned.
UaDateTime UaAnnotation::getAnnotationTime ( ) const

The time the Annotation was added.

This will probably be different than the SourceTimestamp.

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

Compare two UaAnnotation for inequality.

See also
operator==
Parameters
otherthe UaAnnotation to compare with.
Returns
true if not equal, false otherwise.
UaAnnotation & UaAnnotation::operator= ( const UaAnnotation other)

Assignment operator.

Parameters
otherthe UaAnnotation to assign.
Returns
reference to itself.
bool UaAnnotation::operator== ( const UaAnnotation other) const

Compare two UaAnnotation for equality.

Parameters
otherthe UaAnnotation to compare with.
Returns
true if equal, false if not.
void UaAnnotation::setAnnotationTime ( const UaDateTime annotationTime)

The time the Annotation was added.

This will probably be different than the SourceTimestamp.


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