Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 1630 → Rev 1688

/dongfang_FC_rewrite_tool/src/dongfang/mkt/main/VariablesReader.java
6,8 → 6,8
import dongfang.mkt.comm.MKConnection;
import dongfang.mkt.comm.serial.RXTXSerialPort;
import dongfang.mkt.frames.RequestFrame;
import dongfang.mkt.frames.VariablesRequestFrame;
import dongfang.mkt.frames.VariablesResponseFrame;
import dongfang.mkt.frames.ReadVariablesRequestFrame;
import dongfang.mkt.frames.ReadVariablesResponseFrame;
 
public class VariablesReader {
private static int[] readVariables(String portIdentifier) throws IOException {
16,9 → 16,9
FrameQueue q = new FrameQueue(port);
int[] variables = null;
VariablesRequestFrame frame = new VariablesRequestFrame(RequestFrame.FC_ADDRESS);
ReadVariablesRequestFrame frame = new ReadVariablesRequestFrame(RequestFrame.FC_ADDRESS);
q.sendRequest(frame);
VariablesResponseFrame r = (VariablesResponseFrame) q.getResponseFor(frame, 5000);
ReadVariablesResponseFrame r = (ReadVariablesResponseFrame) q.getResponseFor(frame, 5000);
if (r == null) {
System.err.println("ERROR. Timeout waiting for response.");
} else {