C++ Based OPC UA Client/Server SDK  1.5.5.355

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 ()
 Destroys the UaServerStatusDataType object.
 
void clear ()
 Clear the data of the UaServerStatusDataType. More...
 
bool operator== (const UaServerStatusDataType &other) const
 Compare two UaServerStatusDataType for equality. More...
 
bool operator!= (const UaServerStatusDataType &other) const
 Compare two UaServerStatusDataType for inequality. More...
 
UaServerStatusDataTypeoperator= (const UaServerStatusDataType &other)
 Assignment operator. More...
 
OpcUa_ServerStatusDataTypecopy () 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 (OpcUa_ServerStatusDataType *pValue)
 Attaches to an existing OpcUa_ServerStatusDataType structure. More...
 
OpcUa_ServerStatusDataTypedetach (OpcUa_ServerStatusDataType *pDst)
 Detaches the internal ServerStatusDataType structure from this class. More...
 
UaDateTime getStartTime () const
 Time (UTC) the server was started. More...
 
UaDateTime getCurrentTime () const
 The current time (UTC) as known by the server.
 
OpcUa_ServerState getState () const
 The current state of the server.
 
UaBuildInfo getBuildInfo () const
 Build information of the server.
 
OpcUa_UInt32 getSecondsTillShutdown () const
 Approximate number of seconds until the server will be shut down. More...
 
UaLocalizedText getShutdownReason () const
 An optional localized text indicating the reason for the shutdown. More...
 
void setStartTime (const UaDateTime &startTime)
 Time (UTC) the server was started. More...
 
void setCurrentTime (const UaDateTime &currentTime)
 The current time (UTC) as known by the server.
 
void setState (OpcUa_ServerState state)
 The current state of the server.
 
void setBuildInfo (const UaBuildInfo &buildInfo)
 Build information of the server.
 
void setSecondsTillShutdown (OpcUa_UInt32 secondsTillShutdown)
 Approximate number of seconds until the server will be shut down. More...
 
void setShutdownReason (const UaLocalizedText &shutdownReason)
 An optional localized text indicating the reason for the shutdown. More...
 

Static Public Member Functions

static OpcUa_ServerStatusDataTypeclone (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.

Contains elements that describe the status of the Server.

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 ( OpcUa_ServerStatusDataType pValue)

Attaches to an existing OpcUa_ServerStatusDataType structure.

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

Parameters
pValue[in] Parameter 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
pointer to a newly allocated OpcUa_ServerStatusDataType.
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
pointer 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 freeing the ServerStatusDataType data. If more than one reference exists, the data is copied to pDst instead of being detached.

Parameters
pDst[out] Pointer to an OpcUa_ServerStatusDataType structure that receives the ServerStatusDataType data.
Returns
If the function succeeds, pDst is returned, otherwise 0 is returned.
OpcUa_UInt32 UaServerStatusDataType::getSecondsTillShutdown ( ) const

Approximate number of seconds until the server will be shut down.

The value is only relevant once the state changes into SHUTDOWN.

UaLocalizedText UaServerStatusDataType::getShutdownReason ( ) const

An optional localized text indicating the reason for the shutdown.

The value is only relevant once the state changes into SHUTDOWN.

UaDateTime UaServerStatusDataType::getStartTime ( ) const

Time (UTC) the server was started.

This is constant for the server instance and is not reset when the server changes state. Each instance of a server should keep the time when the process started.

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

Compare two UaServerStatusDataType for inequality.

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

Assignment operator.

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

Compare two UaServerStatusDataType for equality.

Parameters
otherthe UaServerStatusDataType to compare with.
Returns
true if equal, false if not.
void UaServerStatusDataType::setSecondsTillShutdown ( OpcUa_UInt32  secondsTillShutdown)

Approximate number of seconds until the server will be shut down.

The value is only relevant once the state changes into SHUTDOWN.

void UaServerStatusDataType::setShutdownReason ( const UaLocalizedText shutdownReason)

An optional localized text indicating the reason for the shutdown.

The value is only relevant once the state changes into SHUTDOWN.

void UaServerStatusDataType::setStartTime ( const UaDateTime startTime)

Time (UTC) the server was started.

This is constant for the server instance and is not reset when the server changes state. Each instance of a server should keep the time when the process started.


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