C++ Based OPC UA Client/Server SDK
1.6.3.406
|
Wrapper class for the UA stack structure OpcUa_Argument. More...
#include <uaargument.h>
Public Member Functions | |
UaArgument () | |
Constructs an instance of the class UaArgument with empty default values. | |
UaArgument (const UaArgument &other) | |
Constructs an instance of the class UaArgument with values from another UaArgument object. More... | |
UaArgument (const OpcUa_Argument &other) | |
Constructs an instance of the class UaArgument with values from another OpcUa_Argument structure. More... | |
UaArgument (const UaString &name, const UaNodeId &dataType, OpcUa_Int32 valueRank, const UaUInt32Array &arrayDimensions, const UaLocalizedText &description) | |
Constructs an instance of the class UaArgument with values provided in the constructor. | |
UaArgument (const UaExtensionObject &extensionObject) | |
Constructs an instance of the class UaArgument initialized with value from a UaExtensionObject. More... | |
UaArgument (const OpcUa_ExtensionObject &extensionObject) | |
Constructs an instance of the class UaArgument initialized with value from an OpcUa_ExtensionObject structure. More... | |
~UaArgument () | |
Destroys the UaArgument object. | |
void | clear () |
Clear the data of the UaArgument. More... | |
bool | operator== (const UaArgument &other) const |
Compare two UaArgument for equality. More... | |
bool | operator!= (const UaArgument &other) const |
Compare two UaArgument for inequality. More... | |
UaArgument & | operator= (const UaArgument &other) |
Assignment operator. More... | |
OpcUa_Argument * | copy () const |
Copy UaArgument data to a newly allocated OpcUa_Argument. More... | |
void | copyTo (OpcUa_Argument *pDst) const |
Copy UaArgument data to an existing OpcUa_Argument structure. More... | |
void | attach (OpcUa_Argument *pValue) |
Attaches to an existing OpcUa_Argument structure. More... | |
OpcUa_Argument * | detach (OpcUa_Argument *pDst) |
Detaches the internal Argument structure from this class. More... | |
UaString | getName () const |
The name of the argument. | |
UaNodeId | getDataType () const |
The NodeId of the DataType of this argument. | |
OpcUa_Int32 | getValueRank () const |
Indicates whether the DataType is an array and how many dimensions the array has. More... | |
void | getArrayDimensions (UaUInt32Array &arrayDimensions) const |
Specifies the length of each dimension for an array dataType. More... | |
UaLocalizedText | getDescription () const |
A localised description of the argument. | |
void | setName (const UaString &name) |
The name of the argument. | |
void | setDataType (const UaNodeId &dataType) |
The NodeId of the DataType of this argument. | |
void | setValueRank (OpcUa_Int32 valueRank) |
Indicates whether the DataType is an array and how many dimensions the array has. More... | |
void | setArrayDimensions (const UaUInt32Array &arrayDimensions) |
Specifies the length of each dimension for an array dataType. More... | |
void | setDescription (const UaLocalizedText &description) |
A localised description of the argument. | |
Static Public Member Functions | |
static OpcUa_Argument * | clone (const OpcUa_Argument &source) |
Copy OpcUa_Argument data to a newly allocated OpcUa_Argument. More... | |
static void | cloneTo (const OpcUa_Argument &source, OpcUa_Argument ©) |
Copy OpcUa_Argument data to an existing OpcUa_Argument structure. More... | |
Wrapper class for the UA stack structure OpcUa_Argument.
This class encapsulates the native OpcUa_Argument structure and handles memory allocation and cleanup for you. UaArgument uses implicit sharing to avoid needless copying and to boost the performance. Only if you modify a shared Argument it creates a copy for that (copy-on-write). So assigning another UaArgument or passing it as parameter needs constant time and is nearly as fast as assigning a pointer.
Defines a method input or output argument specification.
It is for example used in the input and output argument Properties for methods.
UaArgument::UaArgument | ( | const UaArgument & | other | ) |
Constructs an instance of the class UaArgument with values from another UaArgument object.
other | the other UaArgument used to initialize the object |
UaArgument::UaArgument | ( | const OpcUa_Argument & | other | ) |
Constructs an instance of the class UaArgument with values from another OpcUa_Argument structure.
other | the other OpcUa_Argument used to initialize the object |
UaArgument::UaArgument | ( | const UaExtensionObject & | extensionObject | ) |
Constructs an instance of the class UaArgument initialized with value from a UaExtensionObject.
extensionObject | the extension object containing the Argument |
UaArgument::UaArgument | ( | const OpcUa_ExtensionObject & | extensionObject | ) |
Constructs an instance of the class UaArgument initialized with value from an OpcUa_ExtensionObject structure.
extensionObject | the extension object containing the Argument |
void UaArgument::attach | ( | OpcUa_Argument * | pValue | ) |
Attaches to an existing OpcUa_Argument structure.
Don't manually free the attached structure afterwards, because UaArgument is responsible for it now.
pValue | [in] Parameter to attach to. |
void UaArgument::clear | ( | ) |
Clear the data of the UaArgument.
|
static |
Copy OpcUa_Argument data to a newly allocated OpcUa_Argument.
source | Source to clone. |
|
static |
Copy OpcUa_Argument data to an existing OpcUa_Argument structure.
source | the source of the clone operation. |
copy | the destination of the clone operation. |
OpcUa_Argument * UaArgument::copy | ( | ) | const |
Copy UaArgument data to a newly allocated OpcUa_Argument.
void UaArgument::copyTo | ( | OpcUa_Argument * | pDst | ) | const |
Copy UaArgument data to an existing OpcUa_Argument structure.
pDst | the destination of this copy operation. |
OpcUa_Argument * UaArgument::detach | ( | OpcUa_Argument * | pDst | ) |
Detaches the internal Argument structure from this class.
This way you take over the control of freeing the Argument data. If more than one reference exists, the data is copied to pDst instead of being detached.
pDst | [out] Pointer to an OpcUa_Argument structure that receives the Argument data. |
void UaArgument::getArrayDimensions | ( | UaUInt32Array & | arrayDimensions | ) | const |
Specifies the length of each dimension for an array dataType.
It is intended to describe the capability of the DataType, not the current size.
The number of elements shall be equal to the value of the valueRank. Shall be null if valueRank ≦ 0.
A value of 0 for an individual dimension indicates that the dimension has a variable length.
OpcUa_Int32 UaArgument::getValueRank | ( | ) | const |
Indicates whether the DataType is an array and how many dimensions the array has.
It may have the following values:
bool UaArgument::operator!= | ( | const UaArgument & | other | ) | const |
Compare two UaArgument for inequality.
other | the UaArgument to compare with. |
UaArgument & UaArgument::operator= | ( | const UaArgument & | other | ) |
bool UaArgument::operator== | ( | const UaArgument & | other | ) | const |
Compare two UaArgument for equality.
other | the UaArgument to compare with. |
void UaArgument::setArrayDimensions | ( | const UaUInt32Array & | arrayDimensions | ) |
Specifies the length of each dimension for an array dataType.
It is intended to describe the capability of the DataType, not the current size.
The number of elements shall be equal to the value of the valueRank. Shall be null if valueRank ≦ 0.
A value of 0 for an individual dimension indicates that the dimension has a variable length.
void UaArgument::setValueRank | ( | OpcUa_Int32 | valueRank | ) |
Indicates whether the DataType is an array and how many dimensions the array has.
It may have the following values: