C++ Based OPC UA Client/Server SDK  1.5.5.355

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

#include <uaserveronnetwork.h>

Public Member Functions

 UaServerOnNetwork ()
 Constructs an instance of the class UaServerOnNetwork with empty default values.
 
 UaServerOnNetwork (const UaServerOnNetwork &other)
 Constructs an instance of the class UaServerOnNetwork with values from another UaServerOnNetwork object. More...
 
 UaServerOnNetwork (const OpcUa_ServerOnNetwork &other)
 Constructs an instance of the class UaServerOnNetwork with values from another OpcUa_ServerOnNetwork structure. More...
 
 UaServerOnNetwork (OpcUa_UInt32 recordId, const UaString &serverName, const UaString &discoveryUrl, const UaStringArray &serverCapabilities)
 Constructs an instance of the class UaServerOnNetwork with values provided in the constructor.
 
 UaServerOnNetwork (const UaExtensionObject &extensionObject)
 Constructs an instance of the class UaServerOnNetwork initialized with value from a UaExtensionObject. More...
 
 UaServerOnNetwork (const OpcUa_ExtensionObject &extensionObject)
 Constructs an instance of the class UaServerOnNetwork initialized with value from an OpcUa_ExtensionObject structure. More...
 
 ~UaServerOnNetwork ()
 Destroys the UaServerOnNetwork object.
 
void clear ()
 Clear the data of the UaServerOnNetwork. More...
 
bool operator== (const UaServerOnNetwork &other) const
 Compare two UaServerOnNetwork for equality. More...
 
bool operator!= (const UaServerOnNetwork &other) const
 Compare two UaServerOnNetwork for inequality. More...
 
UaServerOnNetworkoperator= (const UaServerOnNetwork &other)
 Assignment operator. More...
 
OpcUa_ServerOnNetwork * copy () const
 Copy UaServerOnNetwork data to a newly allocated OpcUa_ServerOnNetwork. More...
 
void copyTo (OpcUa_ServerOnNetwork *pDst) const
 Copy UaServerOnNetwork data to an existing OpcUa_ServerOnNetwork structure. More...
 
void attach (OpcUa_ServerOnNetwork *pValue)
 Attaches to an existing OpcUa_ServerOnNetwork structure. More...
 
OpcUa_ServerOnNetwork * detach (OpcUa_ServerOnNetwork *pDst)
 Detaches the internal ServerOnNetwork structure from this class. More...
 
OpcUa_UInt32 getRecordId () const
 Returns the RecordId.
 
UaString getServerName () const
 Returns the ServerName.
 
UaString getDiscoveryUrl () const
 Returns the DiscoveryUrl.
 
void getServerCapabilities (UaStringArray &serverCapabilities) const
 Returns the ServerCapabilities.
 
void setRecordId (OpcUa_UInt32 recordId)
 Sets the RecordId.
 
void setServerName (const UaString &serverName)
 Sets the ServerName.
 
void setDiscoveryUrl (const UaString &discoveryUrl)
 Sets the DiscoveryUrl.
 
void setServerCapabilities (const UaStringArray &serverCapabilities)
 Sets the ServerCapabilities.
 

Static Public Member Functions

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

Detailed Description

Wrapper class for the UA stack structure OpcUa_ServerOnNetwork.

This class encapsulates the native OpcUa_ServerOnNetwork structure and handles memory allocation and cleanup for you. UaServerOnNetwork uses implicit sharing to avoid needless copying and to boost the performance. Only if you modify a shared ServerOnNetwork it creates a copy for that (copy-on-write). So assigning another UaServerOnNetwork or passing it as parameter needs constant time and is nearly as fast as assigning a pointer.

Constructor & Destructor Documentation

UaServerOnNetwork::UaServerOnNetwork ( const UaServerOnNetwork other)

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

Parameters
otherthe other UaServerOnNetwork used to initialize the object
UaServerOnNetwork::UaServerOnNetwork ( const OpcUa_ServerOnNetwork &  other)

Constructs an instance of the class UaServerOnNetwork with values from another OpcUa_ServerOnNetwork structure.

Parameters
otherthe other OpcUa_ServerOnNetwork used to initialize the object
UaServerOnNetwork::UaServerOnNetwork ( const UaExtensionObject extensionObject)

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

Parameters
extensionObjectthe extension object containing the ServerOnNetwork
UaServerOnNetwork::UaServerOnNetwork ( const OpcUa_ExtensionObject extensionObject)

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

Parameters
extensionObjectthe extension object containing the ServerOnNetwork

Member Function Documentation

void UaServerOnNetwork::attach ( OpcUa_ServerOnNetwork *  pValue)

Attaches to an existing OpcUa_ServerOnNetwork structure.

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

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

Clear the data of the UaServerOnNetwork.

OpcUa_ServerOnNetwork * UaServerOnNetwork::clone ( const OpcUa_ServerOnNetwork &  source)
static

Copy OpcUa_ServerOnNetwork data to a newly allocated OpcUa_ServerOnNetwork.

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

Copy OpcUa_ServerOnNetwork data to an existing OpcUa_ServerOnNetwork structure.

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

Copy UaServerOnNetwork data to a newly allocated OpcUa_ServerOnNetwork.

Returns
pointer to a newly allocated OpcUa_ServerOnNetwork.
void UaServerOnNetwork::copyTo ( OpcUa_ServerOnNetwork *  pDst) const

Copy UaServerOnNetwork data to an existing OpcUa_ServerOnNetwork structure.

Parameters
pDstthe destination of this copy operation.
OpcUa_ServerOnNetwork * UaServerOnNetwork::detach ( OpcUa_ServerOnNetwork *  pDst)

Detaches the internal ServerOnNetwork structure from this class.

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

Parameters
pDst[out] Pointer to an OpcUa_ServerOnNetwork structure that receives the ServerOnNetwork data.
Returns
If the function succeeds, pDst is returned, otherwise 0 is returned.
bool UaServerOnNetwork::operator!= ( const UaServerOnNetwork other) const

Compare two UaServerOnNetwork for inequality.

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

Assignment operator.

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

Compare two UaServerOnNetwork for equality.

Parameters
otherthe UaServerOnNetwork to compare with.
Returns
true if equal, false if not.

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