UA Server SDK C++ Bundle  1.4.0.258
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
UaServerStatusDataType Class Reference

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

#include <uaserverstatusdatatype.h>

Public Member Functions

 UaServerStatusDataType ()
 Constructs an instance of the class UaServerStatusDataType with empty default values.
 
 UaServerStatusDataType (const UaServerStatusDataType &other)
 Constructs an instance of the class UaServerStatusDataType with values from another UaServerStatusDataType object. More...
 
 UaServerStatusDataType (const OpcUa_ServerStatusDataType &other)
 Constructs an instance of the class UaServerStatusDataType with values from another OpcUa_ServerStatusDataType structure. More...
 
 UaServerStatusDataType (const UaDateTime &startTime, const UaDateTime &currentTime, OpcUa_ServerState state, const UaBuildInfo &buildInfo, OpcUa_UInt32 secondsTillShutdown, const UaLocalizedText &shutdownReason)
 Constructs an instance of the class UaServerStatusDataType with values provided in the constructor.
 
 UaServerStatusDataType (const UaExtensionObject &extensionObject)
 Constructs an instance of the class UaServerStatusDataType initialized with value from a UaExtensionObject. More...
 
 UaServerStatusDataType (const OpcUa_ExtensionObject &extensionObject)
 Constructs an instance of the class UaServerStatusDataType initialized with value from an OpcUa_ExtensionObject structure. More...
 
 UaServerStatusDataType (UaExtensionObject &extensionObject, OpcUa_Boolean bDetach)
 
 UaServerStatusDataType (OpcUa_ExtensionObject &extensionObject, OpcUa_Boolean bDetach)
 
 ~UaServerStatusDataType ()
 Destroys the UaServerStatusDataType object.
 
void clear ()
 Clear the data of the UaServerStatusDataType. More...
 
bool operator== (const UaServerStatusDataType &other) const
 Compare two UaServerStatusDataType if they are similar. More...
 
bool operator!= (const UaServerStatusDataType &other) const
 Returns true if the other UaServerStatusDataType is not equal to this. More...
 
UaServerStatusDataTypeoperator= (const UaServerStatusDataType &other)
 Assignment operator. More...
 
OpcUa_ServerStatusDataType * copy () const
 Copy UaServerStatusDataType data to a newly allocated OpcUa_ServerStatusDataType. More...
 
void copyTo (OpcUa_ServerStatusDataType *pDst) const
 Copy UaServerStatusDataType data to an existing OpcUa_ServerStatusDataType structure. More...
 
void attach (const OpcUa_ServerStatusDataType *pValue)
 Attaches the data of the parameter pValue. More...
 
OpcUa_ServerStatusDataType * detach (OpcUa_ServerStatusDataType *pDst)
 Detaches the internal ServerStatusDataType structure from this class. More...
 
void toVariant (UaVariant &variant) const
 
void toVariant (OpcUa_Variant &variant) const
 
void toVariant (UaVariant &variant, OpcUa_Boolean bDetach)
 
void toVariant (OpcUa_Variant &variant, OpcUa_Boolean bDetach)
 
void toDataValue (UaDataValue &dataValue, OpcUa_Boolean updateTimeStamps) const
 
void toDataValue (OpcUa_DataValue &dataValue, OpcUa_Boolean updateTimeStamps) const
 
void toDataValue (UaDataValue &dataValue, OpcUa_Boolean bDetach, OpcUa_Boolean updateTimeStamps)
 
void toDataValue (OpcUa_DataValue &dataValue, OpcUa_Boolean bDetach, OpcUa_Boolean updateTimeStamps)
 
void toExtensionObject (UaExtensionObject &extensionObject) const
 
void toExtensionObject (OpcUa_ExtensionObject &extensionObject) const
 
void toExtensionObject (UaExtensionObject &extensionObject, OpcUa_Boolean bDetach)
 
void toExtensionObject (OpcUa_ExtensionObject &extensionObject, OpcUa_Boolean bDetach)
 
OpcUa_StatusCode setServerStatusDataType (const UaExtensionObject &extensionObject)
 
OpcUa_StatusCode setServerStatusDataType (const OpcUa_ExtensionObject &extensionObject)
 
OpcUa_StatusCode setServerStatusDataType (UaExtensionObject &extensionObject, OpcUa_Boolean bDetach)
 
OpcUa_StatusCode setServerStatusDataType (OpcUa_ExtensionObject &extensionObject, OpcUa_Boolean bDetach)
 
void setServerStatusDataType (const UaDateTime &startTime, const UaDateTime &currentTime, OpcUa_ServerState state, const UaBuildInfo &buildInfo, OpcUa_UInt32 secondsTillShutdown, const UaLocalizedText &shutdownReason)
 
UaDateTime getStartTime () const
 
UaDateTime getCurrentTime () const
 
OpcUa_ServerState getState () const
 
UaBuildInfo getBuildInfo () const
 
OpcUa_UInt32 getSecondsTillShutdown () const
 
UaLocalizedText getShutdownReason () const
 
void setStartTime (const UaDateTime &startTime)
 
void setCurrentTime (const UaDateTime &currentTime)
 
void setState (OpcUa_ServerState state)
 
void setBuildInfo (const UaBuildInfo &buildInfo)
 
void setSecondsTillShutdown (OpcUa_UInt32 secondsTillShutdown)
 
void setShutdownReason (const UaLocalizedText &shutdownReason)
 

Static Public Member Functions

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

Detailed Description

Wrapper class for the UA stack structure OpcUa_ServerStatusDataType.

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

Constructor & Destructor Documentation

UaServerStatusDataType::UaServerStatusDataType ( const UaServerStatusDataType other)

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

Parameters
otherthe other UaServerStatusDataType used to initialize the object
UaServerStatusDataType::UaServerStatusDataType ( const OpcUa_ServerStatusDataType &  other)

Constructs an instance of the class UaServerStatusDataType with values from another OpcUa_ServerStatusDataType structure.

Parameters
otherthe other OpcUa_ServerStatusDataType used to initialize the object
UaServerStatusDataType::UaServerStatusDataType ( const UaExtensionObject extensionObject)

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

Parameters
extensionObjectthe extension object containing the ServerStatusDataType
UaServerStatusDataType::UaServerStatusDataType ( const OpcUa_ExtensionObject &  extensionObject)

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

Parameters
extensionObjectthe extension object containing the ServerStatusDataType

Member Function Documentation

void UaServerStatusDataType::attach ( const OpcUa_ServerStatusDataType *  pValue)

Attaches the data of the parameter pValue.

Don't clear the data of pValue afterwards manually, because UaServerStatusDataType is responsible for it now.

Parameters
[in]pValueParameter to attach to.
void UaServerStatusDataType::clear ( )

Clear the data of the UaServerStatusDataType.

OpcUa_ServerStatusDataType * UaServerStatusDataType::clone ( const OpcUa_ServerStatusDataType &  source)
static

Copy OpcUa_ServerStatusDataType data to a newly allocated OpcUa_ServerStatusDataType.

Parameters
sourceSource to clone.
Returns
new copy.
void UaServerStatusDataType::cloneTo ( const OpcUa_ServerStatusDataType &  source,
OpcUa_ServerStatusDataType &  copy 
)
static

Copy OpcUa_ServerStatusDataType data to an existing OpcUa_ServerStatusDataType structure.

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

Copy UaServerStatusDataType data to a newly allocated OpcUa_ServerStatusDataType.

Returns
data to a newly allocated OpcUa_ServerStatusDataType.
void UaServerStatusDataType::copyTo ( OpcUa_ServerStatusDataType *  pDst) const

Copy UaServerStatusDataType data to an existing OpcUa_ServerStatusDataType structure.

Parameters
pDstthe destination of this copy operation.
OpcUa_ServerStatusDataType * UaServerStatusDataType::detach ( OpcUa_ServerStatusDataType *  pDst)

Detaches the internal ServerStatusDataType structure from this class.

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

Returns
If the function succeeds, pDst is returned, otherwise 0 is returned.
Parameters
[out]pDstPointer to OpcUa_ServerStatusDataType structure that receives the ServerStatusDataType data.
bool UaServerStatusDataType::operator!= ( const UaServerStatusDataType other) const

Returns true if the other UaServerStatusDataType is not equal to this.

See Also
operator==
Parameters
otherthe UaServerStatusDataType to compare.
Returns
true if other is not equal to this.
UaServerStatusDataType & UaServerStatusDataType::operator= ( const UaServerStatusDataType other)

Assignment operator.

Parameters
otherthe UaServerStatusDataType to assign.
Returns
Assignment operator.
bool UaServerStatusDataType::operator== ( const UaServerStatusDataType other) const

Compare two UaServerStatusDataType if they are similar.

Parameters
otherthe UaServerStatusDataType to compare.
Returns
true if similar, false if not.

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