C++ Based OPC UA Client/Server/PubSub SDK  1.7.6.537

Wrapper class for the UA stack structure OpcUa_AddReferencesItem. More...

#include <uaaddreferencesitem.h>

Public Member Functions

 UaAddReferencesItem ()
 Constructs an instance of the class UaAddReferencesItem with empty default values.
 
 UaAddReferencesItem (const UaAddReferencesItem &other)
 Constructs an instance of the class UaAddReferencesItem with values from another UaAddReferencesItem object. More...
 
 UaAddReferencesItem (const OpcUa_AddReferencesItem &other)
 Constructs an instance of the class UaAddReferencesItem with values from another OpcUa_AddReferencesItem structure. More...
 
 UaAddReferencesItem (const UaNodeId &sourceNodeId, const UaNodeId &referenceTypeId, OpcUa_Boolean isForward, const UaString &targetServerUri, const UaExpandedNodeId &targetNodeId, OpcUa_NodeClass targetNodeClass)
 Constructs an instance of the class UaAddReferencesItem with values provided in the constructor.
 
 UaAddReferencesItem (const UaExtensionObject &extensionObject)
 Constructs an instance of the class UaAddReferencesItem initialized with value from a UaExtensionObject. More...
 
 UaAddReferencesItem (const OpcUa_ExtensionObject &extensionObject)
 Constructs an instance of the class UaAddReferencesItem initialized with value from an OpcUa_ExtensionObject structure. More...
 
 ~UaAddReferencesItem ()
 Destroys the UaAddReferencesItem object.
 
void clear ()
 Clear the data of the UaAddReferencesItem. More...
 
bool operator== (const UaAddReferencesItem &other) const
 Compare two UaAddReferencesItem for equality. More...
 
bool operator!= (const UaAddReferencesItem &other) const
 Compare two UaAddReferencesItem for inequality. More...
 
UaAddReferencesItemoperator= (const UaAddReferencesItem &other)
 Assignment operator. More...
 
OpcUa_AddReferencesItemcopy () const
 Copy UaAddReferencesItem data to a newly allocated OpcUa_AddReferencesItem. More...
 
void copyTo (OpcUa_AddReferencesItem *pDst) const
 Copy UaAddReferencesItem data to an existing OpcUa_AddReferencesItem structure. More...
 
void attach (OpcUa_AddReferencesItem *pValue)
 Attaches to an existing OpcUa_AddReferencesItem structure. More...
 
OpcUa_AddReferencesItemdetach (OpcUa_AddReferencesItem *pDst)
 Detaches the internal AddReferencesItem structure from this class. More...
 
UaNodeId getSourceNodeId () const
 NodeId of the node to which the reference is to be added. More...
 
UaNodeId getReferenceTypeId () const
 NodeId of the ReferenceType that defines the reference.
 
OpcUa_Boolean getIsForward () const
 If the value is TRUE, the Server creates a forward reference; if the value is FALSE, the Server creates an inverse Reference.
 
UaString getTargetServerUri () const
 URI of the remote Server. More...
 
UaExpandedNodeId getTargetNodeId () const
 Expanded NodeId of the target node.
 
OpcUa_NodeClass getTargetNodeClass () const
 NodeClass of the target node. More...
 
void setSourceNodeId (const UaNodeId &sourceNodeId)
 NodeId of the node to which the reference is to be added. More...
 
void setReferenceTypeId (const UaNodeId &referenceTypeId)
 NodeId of the ReferenceType that defines the reference.
 
void setIsForward (OpcUa_Boolean isForward)
 If the value is TRUE, the Server creates a forward reference; if the value is FALSE, the Server creates an inverse Reference.
 
void setTargetServerUri (const UaString &targetServerUri)
 URI of the remote Server. More...
 
void setTargetNodeId (const UaExpandedNodeId &targetNodeId)
 Expanded NodeId of the target node.
 
void setTargetNodeClass (OpcUa_NodeClass targetNodeClass)
 NodeClass of the target node. More...
 

Static Public Member Functions

static OpcUa_AddReferencesItemclone (const OpcUa_AddReferencesItem &source)
 Copy OpcUa_AddReferencesItem data to a newly allocated OpcUa_AddReferencesItem. More...
 
static void cloneTo (const OpcUa_AddReferencesItem &source, OpcUa_AddReferencesItem &copy)
 Copy OpcUa_AddReferencesItem data to an existing OpcUa_AddReferencesItem structure. More...
 

Detailed Description

Wrapper class for the UA stack structure OpcUa_AddReferencesItem.

This class encapsulates the native OpcUa_AddReferencesItem structure and handles memory allocation and cleanup for you. UaAddReferencesItem uses implicit sharing to avoid needless copying and to boost the performance. Only if you modify a shared AddReferencesItem it creates a copy for that (copy-on-write). So assigning another UaAddReferencesItem 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 referencesToAdd parameter of the AddReferences Service.

Constructor & Destructor Documentation

UaAddReferencesItem::UaAddReferencesItem ( const UaAddReferencesItem other)

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

Parameters
otherthe other UaAddReferencesItem used to initialize the object
UaAddReferencesItem::UaAddReferencesItem ( const OpcUa_AddReferencesItem other)

Constructs an instance of the class UaAddReferencesItem with values from another OpcUa_AddReferencesItem structure.

Parameters
otherthe other OpcUa_AddReferencesItem used to initialize the object
UaAddReferencesItem::UaAddReferencesItem ( const UaExtensionObject extensionObject)

Constructs an instance of the class UaAddReferencesItem initialized with value from a UaExtensionObject.

Parameters
extensionObjectthe extension object containing the AddReferencesItem
UaAddReferencesItem::UaAddReferencesItem ( const OpcUa_ExtensionObject extensionObject)

Constructs an instance of the class UaAddReferencesItem initialized with value from an OpcUa_ExtensionObject structure.

Parameters
extensionObjectthe extension object containing the AddReferencesItem

Member Function Documentation

void UaAddReferencesItem::attach ( OpcUa_AddReferencesItem pValue)

Attaches to an existing OpcUa_AddReferencesItem structure.

Don't manually free the attached structure afterwards, because UaAddReferencesItem is responsible for it now.

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

Clear the data of the UaAddReferencesItem.

OpcUa_AddReferencesItem * UaAddReferencesItem::clone ( const OpcUa_AddReferencesItem source)
static

Copy OpcUa_AddReferencesItem data to a newly allocated OpcUa_AddReferencesItem.

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

Copy OpcUa_AddReferencesItem data to an existing OpcUa_AddReferencesItem structure.

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

Copy UaAddReferencesItem data to a newly allocated OpcUa_AddReferencesItem.

Returns
pointer to a newly allocated OpcUa_AddReferencesItem.
void UaAddReferencesItem::copyTo ( OpcUa_AddReferencesItem pDst) const

Copy UaAddReferencesItem data to an existing OpcUa_AddReferencesItem structure.

Parameters
pDstthe destination of this copy operation.
OpcUa_AddReferencesItem * UaAddReferencesItem::detach ( OpcUa_AddReferencesItem pDst)

Detaches the internal AddReferencesItem structure from this class.

This way you take over the control of freeing the AddReferencesItem data. If more than one reference exists, the data is copied to pDst instead of being detached.

Parameters
pDst[out] Pointer to an OpcUa_AddReferencesItem structure that receives the AddReferencesItem data.
Returns
If the function succeeds, pDst is returned, otherwise 0 is returned.
UaNodeId UaAddReferencesItem::getSourceNodeId ( ) const

NodeId of the node to which the reference is to be added.

The source node shall always exist in the Server to add the reference. The IsForward parameter can be set to FALSE if the target node is on the local Server and the source node on the remote Server.

OpcUa_NodeClass UaAddReferencesItem::getTargetNodeClass ( ) const

NodeClass of the target node.

The Client shall specify this since the target node might not be accessible directly by the Server.

UaString UaAddReferencesItem::getTargetServerUri ( ) const

URI of the remote Server.

If this parameter is not null, it overrides the serverIndex in the TargetNodeId.

bool UaAddReferencesItem::operator!= ( const UaAddReferencesItem other) const

Compare two UaAddReferencesItem for inequality.

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

Assignment operator.

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

Compare two UaAddReferencesItem for equality.

Parameters
otherthe UaAddReferencesItem to compare with.
Returns
true if equal, false if not.
void UaAddReferencesItem::setSourceNodeId ( const UaNodeId sourceNodeId)

NodeId of the node to which the reference is to be added.

The source node shall always exist in the Server to add the reference. The IsForward parameter can be set to FALSE if the target node is on the local Server and the source node on the remote Server.

void UaAddReferencesItem::setTargetNodeClass ( OpcUa_NodeClass  targetNodeClass)

NodeClass of the target node.

The Client shall specify this since the target node might not be accessible directly by the Server.

void UaAddReferencesItem::setTargetServerUri ( const UaString targetServerUri)

URI of the remote Server.

If this parameter is not null, it overrides the serverIndex in the TargetNodeId.


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