isConnected (opcua)

Determine if OPC UA client object is connected to server

Syntax

tf = isConnected(UaClient)

Description

tf = isConnected(UaClient) returns true (logical 1) if the client UaClient is connected to the server, or false (logical 0) otherwise. If UaClient is a vector of client objects, tf is a vector representing the connected state of each client.

Examples

Connect an OPC UA client and view its connection status.

s = opcuaserverinfo('localhost');
UaClient = opcua(s);
connect(UaClient);
isConnected(UaClient)
1
disconnect(UaClient);
isConnected(UaClient)
0

Introduced in R2015b