getReturnCode
Purpose
This method gets ReturnCode value from the previously received message in the current buffer. Normally this is zero. If ReturnCode is not zero, then a problem is indicated from the Substation ES side. Look at ReasonCode, Id and DataContent for more information on what the error is.
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.getReturnCode(token) == 0) { process dataIn } conn.Disconnect(token)
Copyright © 2020. Cloud Software Group, Inc. All Rights Reserved.