C++ UA Server SDK
1.5.0.318
|
Wrapper class for the UA stack structure OpcUa_XVType. More...
#include <uaxvtype.h>
Public Member Functions | |
UaXVType () | |
Constructs an instance of the class UaXVType with empty default values. | |
UaXVType (const UaXVType &other) | |
Constructs an instance of the class UaXVType with values from another UaXVType object. More... | |
UaXVType (const OpcUa_XVType &other) | |
Constructs an instance of the class UaXVType with values from another OpcUa_XVType structure. More... | |
UaXVType (OpcUa_Double x, OpcUa_Float value) | |
Constructs an instance of the class UaXVType with values provided in the constructor. | |
UaXVType (const UaExtensionObject &extensionObject) | |
Constructs an instance of the class UaXVType initialized with value from a UaExtensionObject. More... | |
UaXVType (const OpcUa_ExtensionObject &extensionObject) | |
Constructs an instance of the class UaXVType initialized with value from an OpcUa_ExtensionObject structure. More... | |
~UaXVType () | |
Destroys the UaXVType object. | |
void | clear () |
Clear the data of the UaXVType. More... | |
bool | operator== (const UaXVType &other) const |
Compare two UaXVType for equality. More... | |
bool | operator!= (const UaXVType &other) const |
Compare two UaXVType for inequality. More... | |
UaXVType & | operator= (const UaXVType &other) |
Assignment operator. More... | |
OpcUa_XVType * | copy () const |
Copy UaXVType data to a newly allocated OpcUa_XVType. More... | |
void | copyTo (OpcUa_XVType *pDst) const |
Copy UaXVType data to an existing OpcUa_XVType structure. More... | |
void | attach (OpcUa_XVType *pValue) |
Attaches to an existing OpcUa_XVType structure. More... | |
OpcUa_XVType * | detach (OpcUa_XVType *pDst) |
Detaches the internal XVType structure from this class. More... | |
OpcUa_Double | getX () const |
Position on the X axis of this value. | |
OpcUa_Float | getValue () const |
The value itself. | |
void | setX (OpcUa_Double x) |
Position on the X axis of this value. | |
void | setValue (OpcUa_Float value) |
The value itself. | |
Static Public Member Functions | |
static OpcUa_XVType * | clone (const OpcUa_XVType &source) |
Copy OpcUa_XVType data to a newly allocated OpcUa_XVType. More... | |
static void | cloneTo (const OpcUa_XVType &source, OpcUa_XVType ©) |
Copy OpcUa_XVType data to an existing OpcUa_XVType structure. More... | |
Wrapper class for the UA stack structure OpcUa_XVType.
This class encapsulates the native OpcUa_XVType structure and handles memory allocation and cleanup for you. UaXVType uses implicit sharing to avoid needless copying and to boost the performance. Only if you modify a shared XVType it creates a copy for that (copy-on-write). So assigning another UaXVType or passing it as parameter needs constant time and is nearly as fast as assigning a pointer.
Defines a physical value relative to a X axis and it is used as the DataType of the Value of XYArrayItemType.
Most analysers can produce values that can perfectly be represented with a float IEEE 32 bits, but they can position them on the X axis with an accuracy that requires double IEEE 64 bits. For example, the peak value in an absorbance spectrum where the amplitude of the peak can be represented by a float IEEE 32 bits, but its frequency position required 10 digits which implies the use of a double IEEE 64 bits.
UaXVType::UaXVType | ( | const UaXVType & | other | ) |
UaXVType::UaXVType | ( | const OpcUa_XVType & | other | ) |
Constructs an instance of the class UaXVType with values from another OpcUa_XVType structure.
other | the other OpcUa_XVType used to initialize the object |
UaXVType::UaXVType | ( | const UaExtensionObject & | extensionObject | ) |
Constructs an instance of the class UaXVType initialized with value from a UaExtensionObject.
extensionObject | the extension object containing the XVType |
UaXVType::UaXVType | ( | const OpcUa_ExtensionObject & | extensionObject | ) |
Constructs an instance of the class UaXVType initialized with value from an OpcUa_ExtensionObject structure.
extensionObject | the extension object containing the XVType |
void UaXVType::attach | ( | OpcUa_XVType * | pValue | ) |
Attaches to an existing OpcUa_XVType structure.
Don't manually free the attached structure afterwards, because UaXVType is responsible for it now.
pValue | [in] Parameter to attach to. |
void UaXVType::clear | ( | ) |
Clear the data of the UaXVType.
|
static |
Copy OpcUa_XVType data to a newly allocated OpcUa_XVType.
source | Source to clone. |
|
static |
Copy OpcUa_XVType data to an existing OpcUa_XVType structure.
source | the source of the clone operation. |
copy | the destination of the clone operation. |
OpcUa_XVType * UaXVType::copy | ( | ) | const |
Copy UaXVType data to a newly allocated OpcUa_XVType.
void UaXVType::copyTo | ( | OpcUa_XVType * | pDst | ) | const |
Copy UaXVType data to an existing OpcUa_XVType structure.
pDst | the destination of this copy operation. |
OpcUa_XVType * UaXVType::detach | ( | OpcUa_XVType * | pDst | ) |
Detaches the internal XVType structure from this class.
This way you take over the control of freeing the XVType data. If more than one reference exists, the data is copied to pDst instead of being detached.
pDst | [out] Pointer to an OpcUa_XVType structure that receives the XVType data. |
bool UaXVType::operator!= | ( | const UaXVType & | other | ) | const |
bool UaXVType::operator== | ( | const UaXVType & | other | ) | const |