C++ UA Server SDK
1.5.0.318
|
Wrapper class for the UA stack structure OpcUa_AddNodesItem. More...
#include <uaaddnodesitem.h>
Public Member Functions | |
UaAddNodesItem () | |
Constructs an instance of the class UaAddNodesItem with empty default values. | |
UaAddNodesItem (const UaAddNodesItem &other) | |
Constructs an instance of the class UaAddNodesItem with values from another UaAddNodesItem object. More... | |
UaAddNodesItem (const OpcUa_AddNodesItem &other) | |
Constructs an instance of the class UaAddNodesItem with values from another OpcUa_AddNodesItem structure. More... | |
UaAddNodesItem (const UaExpandedNodeId &parentNodeId, const UaNodeId &referenceTypeId, const UaExpandedNodeId &requestedNewNodeId, const UaQualifiedName &browseName, OpcUa_NodeClass nodeClass, UaExtensionObject &nodeAttributes, const UaExpandedNodeId &typeDefinition) | |
Constructs an instance of the class UaAddNodesItem with values provided in the constructor. | |
UaAddNodesItem (const UaExtensionObject &extensionObject) | |
Constructs an instance of the class UaAddNodesItem initialized with value from a UaExtensionObject. More... | |
UaAddNodesItem (const OpcUa_ExtensionObject &extensionObject) | |
Constructs an instance of the class UaAddNodesItem initialized with value from an OpcUa_ExtensionObject structure. More... | |
~UaAddNodesItem () | |
Destroys the UaAddNodesItem object. | |
void | clear () |
Clear the data of the UaAddNodesItem. More... | |
bool | operator== (const UaAddNodesItem &other) const |
Compare two UaAddNodesItem for equality. More... | |
bool | operator!= (const UaAddNodesItem &other) const |
Compare two UaAddNodesItem for inequality. More... | |
UaAddNodesItem & | operator= (const UaAddNodesItem &other) |
Assignment operator. More... | |
OpcUa_AddNodesItem * | copy () const |
Copy UaAddNodesItem data to a newly allocated OpcUa_AddNodesItem. More... | |
void | copyTo (OpcUa_AddNodesItem *pDst) const |
Copy UaAddNodesItem data to an existing OpcUa_AddNodesItem structure. More... | |
void | attach (OpcUa_AddNodesItem *pValue) |
Attaches to an existing OpcUa_AddNodesItem structure. More... | |
OpcUa_AddNodesItem * | detach (OpcUa_AddNodesItem *pDst) |
Detaches the internal AddNodesItem structure from this class. More... | |
UaExpandedNodeId | getParentNodeId () const |
ExpandedNodeId of the parent node for the reference. | |
UaNodeId | getReferenceTypeId () const |
NodeId of the hierarchical ReferenceType to use for the reference from the parent node to the new node. | |
UaExpandedNodeId | getRequestedNewNodeId () const |
Client requested expanded NodeId of the node to add. More... | |
UaQualifiedName | getBrowseName () const |
The browse name of the node to add. | |
OpcUa_NodeClass | getNodeClass () const |
NodeClass of the node to add. | |
UaExtensionObject | getNodeAttributes () const |
The attributes that are specific to the NodeClass. More... | |
UaExpandedNodeId | getTypeDefinition () const |
NodeId of the TypeDefinitionNode for the node to add. More... | |
void | setParentNodeId (const UaExpandedNodeId &parentNodeId) |
ExpandedNodeId of the parent node for the reference. | |
void | setReferenceTypeId (const UaNodeId &referenceTypeId) |
NodeId of the hierarchical ReferenceType to use for the reference from the parent node to the new node. | |
void | setRequestedNewNodeId (const UaExpandedNodeId &requestedNewNodeId) |
Client requested expanded NodeId of the node to add. More... | |
void | setBrowseName (const UaQualifiedName &browseName) |
The browse name of the node to add. | |
void | setNodeClass (OpcUa_NodeClass nodeClass) |
NodeClass of the node to add. | |
void | setNodeAttributes (UaExtensionObject &nodeAttributes) |
The attributes that are specific to the NodeClass. More... | |
void | setTypeDefinition (const UaExpandedNodeId &typeDefinition) |
NodeId of the TypeDefinitionNode for the node to add. More... | |
Static Public Member Functions | |
static OpcUa_AddNodesItem * | clone (const OpcUa_AddNodesItem &source) |
Copy OpcUa_AddNodesItem data to a newly allocated OpcUa_AddNodesItem. More... | |
static void | cloneTo (const OpcUa_AddNodesItem &source, OpcUa_AddNodesItem ©) |
Copy OpcUa_AddNodesItem data to an existing OpcUa_AddNodesItem structure. More... | |
Wrapper class for the UA stack structure OpcUa_AddNodesItem.
This class encapsulates the native OpcUa_AddNodesItem structure and handles memory allocation and cleanup for you. UaAddNodesItem uses implicit sharing to avoid needless copying and to boost the performance. Only if you modify a shared AddNodesItem it creates a copy for that (copy-on-write). So assigning another UaAddNodesItem or passing it as parameter needs constant time and is nearly as fast as assigning a pointer.
A structure that is defined as the type of the nodesToAdd parameter of the AddNodes Service.
UaAddNodesItem::UaAddNodesItem | ( | const UaAddNodesItem & | other | ) |
Constructs an instance of the class UaAddNodesItem with values from another UaAddNodesItem object.
other | the other UaAddNodesItem used to initialize the object |
UaAddNodesItem::UaAddNodesItem | ( | const OpcUa_AddNodesItem & | other | ) |
Constructs an instance of the class UaAddNodesItem with values from another OpcUa_AddNodesItem structure.
other | the other OpcUa_AddNodesItem used to initialize the object |
UaAddNodesItem::UaAddNodesItem | ( | const UaExtensionObject & | extensionObject | ) |
Constructs an instance of the class UaAddNodesItem initialized with value from a UaExtensionObject.
extensionObject | the extension object containing the AddNodesItem |
UaAddNodesItem::UaAddNodesItem | ( | const OpcUa_ExtensionObject & | extensionObject | ) |
Constructs an instance of the class UaAddNodesItem initialized with value from an OpcUa_ExtensionObject structure.
extensionObject | the extension object containing the AddNodesItem |
void UaAddNodesItem::attach | ( | OpcUa_AddNodesItem * | pValue | ) |
Attaches to an existing OpcUa_AddNodesItem structure.
Don't manually free the attached structure afterwards, because UaAddNodesItem is responsible for it now.
pValue | [in] Parameter to attach to. |
void UaAddNodesItem::clear | ( | ) |
Clear the data of the UaAddNodesItem.
|
static |
Copy OpcUa_AddNodesItem data to a newly allocated OpcUa_AddNodesItem.
source | Source to clone. |
|
static |
Copy OpcUa_AddNodesItem data to an existing OpcUa_AddNodesItem structure.
source | the source of the clone operation. |
copy | the destination of the clone operation. |
OpcUa_AddNodesItem * UaAddNodesItem::copy | ( | ) | const |
Copy UaAddNodesItem data to a newly allocated OpcUa_AddNodesItem.
void UaAddNodesItem::copyTo | ( | OpcUa_AddNodesItem * | pDst | ) | const |
Copy UaAddNodesItem data to an existing OpcUa_AddNodesItem structure.
pDst | the destination of this copy operation. |
OpcUa_AddNodesItem * UaAddNodesItem::detach | ( | OpcUa_AddNodesItem * | pDst | ) |
Detaches the internal AddNodesItem structure from this class.
This way you take over the control of freeing the AddNodesItem data. If more than one reference exists, the data is copied to pDst instead of being detached.
pDst | [out] Pointer to an OpcUa_AddNodesItem structure that receives the AddNodesItem data. |
UaExtensionObject UaAddNodesItem::getNodeAttributes | ( | ) | const |
The attributes that are specific to the NodeClass.
A Client is allowed to omit values for some or all attributes. If an attribute value is omitted, the Server shall use the default values from the TypeDefinitionNode. If a TypeDefinitionNode was not provided, the Server shall choose a suitable default value.
The Server may still add an optional attribute to the node with an appropriate default value even if the Client does not specify a value.
UaExpandedNodeId UaAddNodesItem::getRequestedNewNodeId | ( | ) | const |
Client requested expanded NodeId of the node to add.
The server index in the expanded NodeId shall be 0.
If the Server cannot use this NodeId, it rejects this node and returns the appropriate error code.
If the Client does not want to request a NodeId, it sets the value of this parameter to the null expanded NodeId.
If the node to add is a ReferenceType node, its NodeId should be a numeric id. See Part 3 of the OPC UA specification for a description of ReferenceType NodeIds.
UaExpandedNodeId UaAddNodesItem::getTypeDefinition | ( | ) | const |
NodeId of the TypeDefinitionNode for the node to add.
This parameter shall be null for all node classes other than Object and Variable, in which case it shall be provided.
bool UaAddNodesItem::operator!= | ( | const UaAddNodesItem & | other | ) | const |
Compare two UaAddNodesItem for inequality.
other | the UaAddNodesItem to compare with. |
UaAddNodesItem & UaAddNodesItem::operator= | ( | const UaAddNodesItem & | other | ) |
bool UaAddNodesItem::operator== | ( | const UaAddNodesItem & | other | ) | const |
Compare two UaAddNodesItem for equality.
other | the UaAddNodesItem to compare with. |
void UaAddNodesItem::setNodeAttributes | ( | UaExtensionObject & | nodeAttributes | ) |
The attributes that are specific to the NodeClass.
A Client is allowed to omit values for some or all attributes. If an attribute value is omitted, the Server shall use the default values from the TypeDefinitionNode. If a TypeDefinitionNode was not provided, the Server shall choose a suitable default value.
The Server may still add an optional attribute to the node with an appropriate default value even if the Client does not specify a value.
void UaAddNodesItem::setRequestedNewNodeId | ( | const UaExpandedNodeId & | requestedNewNodeId | ) |
Client requested expanded NodeId of the node to add.
The server index in the expanded NodeId shall be 0.
If the Server cannot use this NodeId, it rejects this node and returns the appropriate error code.
If the Client does not want to request a NodeId, it sets the value of this parameter to the null expanded NodeId.
If the node to add is a ReferenceType node, its NodeId should be a numeric id. See Part 3 of the OPC UA specification for a description of ReferenceType NodeIds.
void UaAddNodesItem::setTypeDefinition | ( | const UaExpandedNodeId & | typeDefinition | ) |
NodeId of the TypeDefinitionNode for the node to add.
This parameter shall be null for all node classes other than Object and Variable, in which case it shall be provided.