C++ Based OPC UA Client/Server/PubSub SDK
1.7.3.505
|
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... | |
UaAnnotation & | operator= (const UaAnnotation &other) |
Assignment operator. More... | |
OpcUa_Annotation * | copy () 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_Annotation * | detach (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_Annotation * | clone (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 OpcUa_Annotation data to an existing OpcUa_Annotation structure. More... | |
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.
UaAnnotation::UaAnnotation | ( | const UaAnnotation & | other | ) |
Constructs an instance of the class UaAnnotation with values from another UaAnnotation object.
other | the 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.
other | the 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.
extensionObject | the 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.
extensionObject | the extension object containing the Annotation |
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.
pValue | [in] Parameter to attach to. |
void UaAnnotation::clear | ( | ) |
Clear the data of the UaAnnotation.
|
static |
Copy OpcUa_Annotation data to a newly allocated OpcUa_Annotation.
source | Source to clone. |
|
static |
Copy OpcUa_Annotation data to an existing OpcUa_Annotation structure.
source | the source of the clone operation. |
copy | the destination of the clone operation. |
OpcUa_Annotation * UaAnnotation::copy | ( | ) | const |
Copy UaAnnotation data to a newly allocated OpcUa_Annotation.
void UaAnnotation::copyTo | ( | OpcUa_Annotation * | pDst | ) | const |
Copy UaAnnotation data to an existing OpcUa_Annotation structure.
pDst | the 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.
pDst | [out] Pointer to an OpcUa_Annotation structure that receives the Annotation data. |
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.
other | the UaAnnotation to compare with. |
UaAnnotation & UaAnnotation::operator= | ( | const UaAnnotation & | other | ) |
bool UaAnnotation::operator== | ( | const UaAnnotation & | other | ) | const |
Compare two UaAnnotation for equality.
other | the UaAnnotation to compare with. |
void UaAnnotation::setAnnotationTime | ( | const UaDateTime & | annotationTime | ) |
The time the Annotation was added.
This will probably be different than the SourceTimestamp.