getCorrelationId

Declaration

byte[] getCorrelationId(S7RClientSSjToken token).

Purpose

This method gets CorrelationId value from the previous message in the current buffer. This is the value that Substation ES stores.

Parameters

Parameter Description
token The S7RClientSSjToken returned by Connect method.

Return

The method returns byte[] value of Correlation Id field. The size is 24 bytes in length. This is not translated, it is the exact value stored by the Substation ES.

Example

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