Page 1 of 1

Accessing ServerStatusDataType

Posted: 06 Apr 2023, 12:31
by MAJS
I am working on an OPC UA Client, and I want to display the OPC UA Server's ServerStatusDataType information to the user.

I have read the forum thread below:

https://forum.unified-automation.com/viewtopic.php?f=18&t=2539&p=5505&hilit=serverstatus#p5505

It mentions that the "the client SDK does a cyclic read on the ServerStatus". Does the SDK make available the information obtained during this read? Or do I need to set up a MonitoredItem to get the ServerStatusDataType?

Yours,
Mark Short

Re: Accessing ServerStatusDataType

Posted: 26 Jul 2023, 15:08
by Support Team
The SDK only does a cyclic read on the "State", "SecondsTillShutdown" and "ShutdownReason" members of the ServerStatus, those are available via getters:

Code: Select all

https://documentation.unified-automation.com/uasdkcpp/1.8.1/html/classUaClientSdk_1_1UaSession.html#a202a565abf1b33bb6b507fce4129fdde
https://documentation.unified-automation.com/uasdkcpp/1.8.1/html/classUaClientSdk_1_1UaSession.html#a4d55431ae82519278df90a970ff9d6ea
https://documentation.unified-automation.com/uasdkcpp/1.8.1/html/classUaClientSdk_1_1UaSession.html#a121da434f846a03dcf725d82fbcea524
If you need the complete ServerStatus Variable you have to set up your own monitoredItem/read.