C++ Based OPC UA Client/Server SDK  1.5.5.355

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...
 
UaOptionSetoperator= (const UaOptionSet &other)
 Assignment operator. More...
 
OpcUa_OptionSetcopy () 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_OptionSetdetach (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_OptionSetclone (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)
 Copy OpcUa_OptionSet data to an existing OpcUa_OptionSet structure. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

UaOptionSet::UaOptionSet ( const UaOptionSet other)

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

Parameters
otherthe 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.

Parameters
otherthe 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.

Parameters
extensionObjectthe 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.

Parameters
extensionObjectthe extension object containing the OptionSet

Member Function Documentation

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.

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

Clear the data of the UaOptionSet.

OpcUa_OptionSet * UaOptionSet::clone ( const OpcUa_OptionSet source)
static

Copy OpcUa_OptionSet data to a newly allocated OpcUa_OptionSet.

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

Copy OpcUa_OptionSet data to an existing OpcUa_OptionSet structure.

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

Copy UaOptionSet data to a newly allocated OpcUa_OptionSet.

Returns
pointer to a newly allocated OpcUa_OptionSet.
void UaOptionSet::copyTo ( OpcUa_OptionSet pDst) const

Copy UaOptionSet data to an existing OpcUa_OptionSet structure.

Parameters
pDstthe 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.

Parameters
pDst[out] Pointer to an OpcUa_OptionSet structure that receives the OptionSet data.
Returns
If the function succeeds, pDst is returned, otherwise 0 is returned.
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.

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

Assignment operator.

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

Compare two UaOptionSet for equality.

Parameters
otherthe UaOptionSet to compare with.
Returns
true if equal, false if not.
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.


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