sendData

Declaration

void sendData(S7RClientSSjToken token, String|byte[] inMsg, String|byte[] correlationId).

Purpose

This method sends data to the Substation ES and then receives the response. The receive is done with a timeout. See setTimeout method for setting the timeout value.

Parameters

Parameter Description
token The S7RClientSSjToken returned by Connect method.
input message String or byte[].
correlation Id String or byte[].

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
conn.sendData(token, “this is data”, “correlation id”);
conn.receiveWait(token);
byte[] dataIn = conn.getDataContent(token);  
process it
conn.Disconnect(token);