Main Content

getServerStatus

Status of OPC UA server

Description

status = 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.

example

Examples

collapse all

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

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

Input Arguments

collapse all

OPC UA client, specified as an OPC UA client object.

Example: getServerStatus(uaClient)

Output Arguments

collapse all

Status of OPC UA server, returned as a structure containing these 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

Version History

Introduced in R2015b

See Also

Functions