C++ Based OPC UA Client/Server SDK
1.6.2.402
|
Wrapper class for the UA stack structure OpcUa_OptionSet. More...
#include <uaoptionset.h>
Public Member Functions | |
UaOptionSet () | |
Constructs an instance of the class UaOptionSet with empty default values. | |
UaOptionSet (const UaOptionSet &other) | |
Constructs an instance of the class UaOptionSet with values from another UaOptionSet object. More... | |
UaOptionSet (const OpcUa_OptionSet &other) | |
Constructs an instance of the class UaOptionSet with values from another OpcUa_OptionSet structure. More... | |
UaOptionSet (const UaByteString &value, const UaByteString &validBits) | |
Constructs an instance of the class UaOptionSet with values provided in the constructor. | |
UaOptionSet (const UaExtensionObject &extensionObject) | |
Constructs an instance of the class UaOptionSet initialized with value from a UaExtensionObject. More... | |
UaOptionSet (const OpcUa_ExtensionObject &extensionObject) | |
Constructs an instance of the class UaOptionSet initialized with value from an OpcUa_ExtensionObject structure. More... | |
~UaOptionSet () | |
Destroys the UaOptionSet object. | |
void | clear () |
Clear the data of the UaOptionSet. More... | |
bool | operator== (const UaOptionSet &other) const |
Compare two UaOptionSet for equality. More... | |
bool | operator!= (const UaOptionSet &other) const |
Compare two UaOptionSet for inequality. More... | |
UaOptionSet & | operator= (const UaOptionSet &other) |
Assignment operator. More... | |
OpcUa_OptionSet * | copy () const |
Copy UaOptionSet data to a newly allocated OpcUa_OptionSet. More... | |
void | copyTo (OpcUa_OptionSet *pDst) const |
Copy UaOptionSet data to an existing OpcUa_OptionSet structure. More... | |
void | attach (OpcUa_OptionSet *pValue) |
Attaches to an existing OpcUa_OptionSet structure. More... | |
OpcUa_OptionSet * | detach (OpcUa_OptionSet *pDst) |
Detaches the internal OptionSet structure from this class. More... | |
UaByteString | getValue () const |
Array of bytes representing the bits in the option set. More... | |
UaByteString | getValidBits () const |
Array of bytes with same size as value representing the valid bits in the value parameter. More... | |
void | setValue (const UaByteString &value) |
Array of bytes representing the bits in the option set. More... | |
void | setValidBits (const UaByteString &validBits) |
Array of bytes with same size as value representing the valid bits in the value parameter. More... | |
Static Public Member Functions | |
static OpcUa_OptionSet * | clone (const OpcUa_OptionSet &source) |
Copy OpcUa_OptionSet data to a newly allocated OpcUa_OptionSet. More... | |
static void | cloneTo (const OpcUa_OptionSet &source, OpcUa_OptionSet ©) |
Copy OpcUa_OptionSet data to an existing OpcUa_OptionSet structure. More... | |
Wrapper class for the UA stack structure OpcUa_OptionSet.
This class encapsulates the native OpcUa_OptionSet structure and handles memory allocation and cleanup for you. UaOptionSet uses implicit sharing to avoid needless copying and to boost the performance. Only if you modify a shared OptionSet it creates a copy for that (copy-on-write). So assigning another UaOptionSet or passing it as parameter needs constant time and is nearly as fast as assigning a pointer.
This abstract DataType is the base DataType for all DataTypes representing a bit mask.
All OptionSet DataTypes representing bit masks shall inherit from this DataType.
The DataType Nodes representing concrete subtypes of the OptionSet shall have an OptionSetValues Property.
UaOptionSet::UaOptionSet | ( | const UaOptionSet & | other | ) |
Constructs an instance of the class UaOptionSet with values from another UaOptionSet object.
other | the other UaOptionSet used to initialize the object |
UaOptionSet::UaOptionSet | ( | const OpcUa_OptionSet & | other | ) |
Constructs an instance of the class UaOptionSet with values from another OpcUa_OptionSet structure.
other | the other OpcUa_OptionSet used to initialize the object |
UaOptionSet::UaOptionSet | ( | const UaExtensionObject & | extensionObject | ) |
Constructs an instance of the class UaOptionSet initialized with value from a UaExtensionObject.
extensionObject | the extension object containing the OptionSet |
UaOptionSet::UaOptionSet | ( | const OpcUa_ExtensionObject & | extensionObject | ) |
Constructs an instance of the class UaOptionSet initialized with value from an OpcUa_ExtensionObject structure.
extensionObject | the extension object containing the OptionSet |
void UaOptionSet::attach | ( | OpcUa_OptionSet * | pValue | ) |
Attaches to an existing OpcUa_OptionSet structure.
Don't manually free the attached structure afterwards, because UaOptionSet is responsible for it now.
pValue | [in] Parameter to attach to. |
void UaOptionSet::clear | ( | ) |
Clear the data of the UaOptionSet.
|
static |
Copy OpcUa_OptionSet data to a newly allocated OpcUa_OptionSet.
source | Source to clone. |
|
static |
Copy OpcUa_OptionSet data to an existing OpcUa_OptionSet structure.
source | the source of the clone operation. |
copy | the destination of the clone operation. |
OpcUa_OptionSet * UaOptionSet::copy | ( | ) | const |
Copy UaOptionSet data to a newly allocated OpcUa_OptionSet.
void UaOptionSet::copyTo | ( | OpcUa_OptionSet * | pDst | ) | const |
Copy UaOptionSet data to an existing OpcUa_OptionSet structure.
pDst | the destination of this copy operation. |
OpcUa_OptionSet * UaOptionSet::detach | ( | OpcUa_OptionSet * | pDst | ) |
Detaches the internal OptionSet structure from this class.
This way you take over the control of freeing the OptionSet data. If more than one reference exists, the data is copied to pDst instead of being detached.
pDst | [out] Pointer to an OpcUa_OptionSet structure that receives the OptionSet data. |
UaByteString UaOptionSet::getValidBits | ( | ) | const |
Array of bytes with same size as value representing the valid bits in the value parameter.
When the Server returns the value to the Client, the ValidBits provides information of which bits in the bit mask have a meaning. When the Client passes the value to the Server, the ValidBits defines which bits should be written. Only those bits defined in ValidBits are changed in the bit mask, all others stay the same.
UaByteString UaOptionSet::getValue | ( | ) | const |
Array of bytes representing the bits in the option set.
The length of the ByteString depends on the number of bits.
bool UaOptionSet::operator!= | ( | const UaOptionSet & | other | ) | const |
Compare two UaOptionSet for inequality.
other | the UaOptionSet to compare with. |
UaOptionSet & UaOptionSet::operator= | ( | const UaOptionSet & | other | ) |
bool UaOptionSet::operator== | ( | const UaOptionSet & | other | ) | const |
Compare two UaOptionSet for equality.
other | the UaOptionSet to compare with. |
void UaOptionSet::setValidBits | ( | const UaByteString & | validBits | ) |
Array of bytes with same size as value representing the valid bits in the value parameter.
When the Server returns the value to the Client, the ValidBits provides information of which bits in the bit mask have a meaning. When the Client passes the value to the Server, the ValidBits defines which bits should be written. Only those bits defined in ValidBits are changed in the bit mask, all others stay the same.
void UaOptionSet::setValue | ( | const UaByteString & | value | ) |
Array of bytes representing the bits in the option set.
The length of the ByteString depends on the number of bits.