C++ UA Server SDK
1.5.0.318
|
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 ¤tTime, 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... | |
UaServerStatusDataType & | operator= (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 (OpcUa_ServerStatusDataType *pValue) |
Attaches to an existing OpcUa_ServerStatusDataType structure. More... | |
OpcUa_ServerStatusDataType * | detach (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 ¤tTime) |
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_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 OpcUa_ServerStatusDataType data to an existing OpcUa_ServerStatusDataType structure. More... | |
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.
UaServerStatusDataType::UaServerStatusDataType | ( | const UaServerStatusDataType & | other | ) |
Constructs an instance of the class UaServerStatusDataType with values from another UaServerStatusDataType object.
other | the 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.
other | the 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.
extensionObject | the 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.
extensionObject | the extension object containing the ServerStatusDataType |
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.
pValue | [in] Parameter to attach to. |
void UaServerStatusDataType::clear | ( | ) |
Clear the data of the UaServerStatusDataType.
|
static |
Copy OpcUa_ServerStatusDataType data to a newly allocated OpcUa_ServerStatusDataType.
source | Source to clone. |
|
static |
Copy OpcUa_ServerStatusDataType data to an existing OpcUa_ServerStatusDataType structure.
source | the source of the clone operation. |
copy | the destination of the clone operation. |
OpcUa_ServerStatusDataType * UaServerStatusDataType::copy | ( | ) | const |
Copy UaServerStatusDataType data to a newly allocated OpcUa_ServerStatusDataType.
void UaServerStatusDataType::copyTo | ( | OpcUa_ServerStatusDataType * | pDst | ) | const |
Copy UaServerStatusDataType data to an existing OpcUa_ServerStatusDataType structure.
pDst | the 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.
pDst | [out] Pointer to an OpcUa_ServerStatusDataType structure that receives the ServerStatusDataType data. |
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.
other | the UaServerStatusDataType to compare with. |
UaServerStatusDataType & UaServerStatusDataType::operator= | ( | const UaServerStatusDataType & | other | ) |
Assignment operator.
other | the UaServerStatusDataType to assign. |
bool UaServerStatusDataType::operator== | ( | const UaServerStatusDataType & | other | ) | const |
Compare two UaServerStatusDataType for equality.
other | the UaServerStatusDataType to compare with. |
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.