isConnected

Declaration

boolean isConnected(S7RClientSSjToken token).

Purpose

This method tests whether the connection for this token is valid (connected to the Substation ES).

Parameters

Parameter Description
token The S7RClientSSjToken returned by Connect method.

Return

The method returns a boolean value, where true means connection is still active and false means the connection is NOT active or token is bad.

Example

S7RClientSSj conn = new S7RClientSSj();
S7RClientSSjToken token = conn.Connect(url, userid, password);
if (conn.isConnected(token)) {
byte[] dataIn = conn.receiveWait(token);
if (dataIn != null)  processData(dataIn);
conn.Disconnect(token);
}