C++ Based OPC UA Client/Server/PubSub SDK
1.7.9.586
|
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... | |
UaAddReferencesItem & | operator= (const UaAddReferencesItem &other) |
Assignment operator. More... | |
OpcUa_AddReferencesItem * | copy () 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_AddReferencesItem * | detach (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_AddReferencesItem * | clone (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 OpcUa_AddReferencesItem data to an existing OpcUa_AddReferencesItem structure. More... | |
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.
UaAddReferencesItem::UaAddReferencesItem | ( | const UaAddReferencesItem & | other | ) |
Constructs an instance of the class UaAddReferencesItem with values from another UaAddReferencesItem object.
other | the 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.
other | the 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.
extensionObject | the 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.
extensionObject | the extension object containing the AddReferencesItem |
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.
pValue | [in] Parameter to attach to. |
void UaAddReferencesItem::clear | ( | ) |
Clear the data of the UaAddReferencesItem.
|
static |
Copy OpcUa_AddReferencesItem data to a newly allocated OpcUa_AddReferencesItem.
source | Source to clone. |
|
static |
Copy OpcUa_AddReferencesItem data to an existing OpcUa_AddReferencesItem structure.
source | the source of the clone operation. |
copy | the destination of the clone operation. |
OpcUa_AddReferencesItem * UaAddReferencesItem::copy | ( | ) | const |
Copy UaAddReferencesItem data to a newly allocated OpcUa_AddReferencesItem.
void UaAddReferencesItem::copyTo | ( | OpcUa_AddReferencesItem * | pDst | ) | const |
Copy UaAddReferencesItem data to an existing OpcUa_AddReferencesItem structure.
pDst | the 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.
pDst | [out] Pointer to an OpcUa_AddReferencesItem structure that receives the AddReferencesItem data. |
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.
other | the UaAddReferencesItem to compare with. |
UaAddReferencesItem & UaAddReferencesItem::operator= | ( | const UaAddReferencesItem & | other | ) |
bool UaAddReferencesItem::operator== | ( | const UaAddReferencesItem & | other | ) | const |
Compare two UaAddReferencesItem for equality.
other | the UaAddReferencesItem to compare with. |
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.