setAutoAck

Declaration

void setAutoAck(S7RClientSSjToken token, boolean flag).

Purpose

This method sets the autoAck feature to true (on) or false (off). The default is on (true). This will automatically perform a conn.sendACK call.

Parameters

Parameter Description

token

The S7RClientSSjToken returned by Connect method.
flag This value is either true or false.

Return

The method does not return any value.

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) {
  conn.setTimeout(token, 5*1000);  // set 5 second timeout on registration response
  conn.sendRegistration(token, ServiceType.Trigger, “myServiceName”);
}
conn.Disconnect(token);