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
Accessing ServerStatusDataType
Moderator: uasdkcpp
- Support Team
- Hero Member
- Posts: 3068
- Joined: 18 Mar 2011, 15:09
Re: Accessing ServerStatusDataType
The SDK only does a cyclic read on the "State", "SecondsTillShutdown" and "ShutdownReason" members of the ServerStatus, those are available via getters:
If you need the complete ServerStatus Variable you have to set up your own monitoredItem/read.
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
Best regards
Unified Automation Support Team
Unified Automation Support Team