Revert "proxy progress one more go? it makes no sense :("
This reverts commit dc5be4f0
This commit is contained in:
parent
dc5be4f053
commit
93f56e1b27
|
@ -4,7 +4,6 @@ import com.opensr5.Logger;
|
|||
import com.opensr5.io.DataListener;
|
||||
import com.opensr5.io.WriteStream;
|
||||
import com.rusefi.binaryprotocol.BinaryProtocol;
|
||||
import com.rusefi.binaryprotocol.IncomingDataBuffer;
|
||||
import com.rusefi.binaryprotocol.IoHelper;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -41,8 +40,6 @@ public interface IoStream extends WriteStream {
|
|||
write(packet);
|
||||
}
|
||||
|
||||
IncomingDataBuffer getDataBuffer();
|
||||
|
||||
/**
|
||||
* @param listener would be invoked from unknown implementation-dependent thread
|
||||
*/
|
||||
|
|
|
@ -5,7 +5,6 @@ import com.fazecast.jSerialComm.SerialPortDataListener;
|
|||
import com.fazecast.jSerialComm.SerialPortEvent;
|
||||
import com.opensr5.Logger;
|
||||
import com.opensr5.io.DataListener;
|
||||
import com.rusefi.binaryprotocol.IncomingDataBuffer;
|
||||
import com.rusefi.io.IoStream;
|
||||
|
||||
/**
|
||||
|
@ -19,7 +18,6 @@ public class SerialIoStreamJSerialComm implements IoStream {
|
|||
private SerialPort sp;
|
||||
private final String port;
|
||||
private final Logger logger;
|
||||
private final IncomingDataBuffer dataBuffer;
|
||||
|
||||
/**
|
||||
* @see #openPort(String, Logger)
|
||||
|
@ -28,12 +26,6 @@ public class SerialIoStreamJSerialComm implements IoStream {
|
|||
this.sp = sp;
|
||||
this.port = port;
|
||||
this.logger = logger;
|
||||
dataBuffer = IncomingDataBuffer.createDataBuffer(this, logger);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IncomingDataBuffer getDataBuffer() {
|
||||
return dataBuffer;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -2,7 +2,6 @@ package com.rusefi.io.tcp;
|
|||
|
||||
import com.opensr5.Logger;
|
||||
import com.opensr5.io.DataListener;
|
||||
import com.rusefi.binaryprotocol.IncomingDataBuffer;
|
||||
import com.rusefi.io.ByteReader;
|
||||
import com.rusefi.io.IoStream;
|
||||
|
||||
|
@ -21,7 +20,6 @@ public class TcpIoStream implements IoStream {
|
|||
private final OutputStream output;
|
||||
private final Logger logger;
|
||||
private boolean isClosed;
|
||||
private final IncomingDataBuffer dataBuffer;
|
||||
|
||||
public TcpIoStream(Logger logger, Socket socket) throws IOException {
|
||||
this(logger, new BufferedInputStream(socket.getInputStream()), socket.getOutputStream());
|
||||
|
@ -35,12 +33,6 @@ public class TcpIoStream implements IoStream {
|
|||
throw new NullPointerException("output");
|
||||
this.output = output;
|
||||
this.input = input;
|
||||
dataBuffer = IncomingDataBuffer.createDataBuffer(this, logger);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IncomingDataBuffer getDataBuffer() {
|
||||
return dataBuffer;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -39,7 +39,7 @@ public class SerialAutoChecker implements Runnable {
|
|||
public void run() {
|
||||
IoStream stream = SerialIoStreamJSerialComm.openPort(serialPort, logger);
|
||||
Logger logger = FileLog.LOGGER;
|
||||
IncomingDataBuffer incomingData = stream.getDataBuffer();
|
||||
IncomingDataBuffer incomingData = IncomingDataBuffer.createDataBuffer(stream, logger);
|
||||
try {
|
||||
stream.sendPacket(new byte[]{BinaryProtocolCommands.COMMAND_HELLO}, logger);
|
||||
byte[] response = incomingData.getPacket(logger, "", false);
|
||||
|
|
|
@ -308,7 +308,7 @@ public class ConsoleTools {
|
|||
}
|
||||
IoStream stream = SerialIoStreamJSerialComm.openPort(autoDetectedPort, FileLog.LOGGER);
|
||||
Logger logger = FileLog.LOGGER;
|
||||
IncomingDataBuffer incomingData = stream.getDataBuffer();
|
||||
IncomingDataBuffer incomingData = IncomingDataBuffer.createDataBuffer(stream, logger);
|
||||
byte[] commandBytes = BinaryProtocol.getTextCommandBytes("hello");
|
||||
stream.sendPacket(commandBytes, logger);
|
||||
// skipping response
|
||||
|
|
Loading…
Reference in New Issue