getServerStatus (opcua)

Status of OPC UA server

Syntax

sstat = getServerStatus(UaClient)

Description

sstat = getServerStatus(UaClient) retrieves the status of the OPC UA server connected to UaClient. UaClient must be a scalar connected OPC UA client, not a vector of clients.

sstat is returned as a structure containing the following fields:

Field nameDescription
StartTimeTime the server started (MATLAB datetime)
CurrentTimeCurrent time on the server (MATLAB datetime)
StateState of the server (character vector)
BuildInfoStructure describing the build information for the server, including ManufacturerName, ProductName, and SoftwareVersion
SecondsTillShutdownIf the server is shutting down, how long until shutdown occurs
ShutdownReasonReason for the server shutdown, or an empty character vector

Examples

Connect an OPC UA client and retrieve the status of its server.

s = opcuaserverinfo('localhost');
UaClient = opcua(s);
connect(UaClient);
sstat = getServerStatus(UaClient)
sstat =
              StartTime: 10-Jun-2015 16:39:17
            CurrentTime: 10-Jun-2015 16:55:00
                  State: 'Running'
              BuildInfo: [1x1 struct]
    SecondsTillShutdown: 0
         ShutdownReason: ''

Introduced in R2015b