sendACK

Declaration

void sendACK(S7RClientSSjToken token) throws S7RClientSSjException.

Purpose

This method will send an "ACK" event back to the Substation ES based on an indicator in the current input data that the Substation ES wants explicit acknowledgment. The "Correlation Id" of the current input data is copied to the "ack" event. An "ack" means the input data has been processed or persisted and that the resource on the Substation ES can be released (see conn.sendNACK).
Note: If the current S7R data does not require an explicit ack/nack, then the method is ignored. If a previous sendACK or sendNACK for the current S7R input data was sent, then this method is ignored.

Parameters

Parameter Description
token The S7RClientSSjToken returned by Connect method.

Return

The method does not return any value when the acknowledgment is successful.

Errors

  • S7RClientSSjException: If an "ack" event cannot be delivered to Substation ES.

Example

S7RClientSSj conn = new S7RClientSSj();
S7RClientSSjToken token = conn.Connect(url, userid, password);
conn.setAutoAck(token, false);  // user will handle ack/nack process
conn.setTimeout(token, 10*1000);  // set 10 second timeout on gets
byte[] dataIn = conn.receiveWait(token);
if (dataIn != null) {
  dataIn = conn.sendData(token);  
  		process it - all ok
  conn.sendACK(token);
}
conn.Disconnect(token);