C++ Based OPC UA Client/Server SDK  1.5.5.355

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...
 
UaAddNodesItemoperator= (const UaAddNodesItem &other)
 Assignment operator. More...
 
OpcUa_AddNodesItemcopy () 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_AddNodesItemdetach (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_AddNodesItemclone (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)
 Copy OpcUa_AddNodesItem data to an existing OpcUa_AddNodesItem structure. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

UaAddNodesItem::UaAddNodesItem ( const UaAddNodesItem other)

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

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

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

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

Parameters
extensionObjectthe extension object containing the AddNodesItem

Member Function Documentation

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.

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

Clear the data of the UaAddNodesItem.

OpcUa_AddNodesItem * UaAddNodesItem::clone ( const OpcUa_AddNodesItem source)
static

Copy OpcUa_AddNodesItem data to a newly allocated OpcUa_AddNodesItem.

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

Copy OpcUa_AddNodesItem data to an existing OpcUa_AddNodesItem structure.

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

Copy UaAddNodesItem data to a newly allocated OpcUa_AddNodesItem.

Returns
pointer to a newly allocated OpcUa_AddNodesItem.
void UaAddNodesItem::copyTo ( OpcUa_AddNodesItem pDst) const

Copy UaAddNodesItem data to an existing OpcUa_AddNodesItem structure.

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

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

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

Assignment operator.

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

Compare two UaAddNodesItem for equality.

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


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