package at.acdp.urweb.rtde.packets; import at.acdp.urweb.rtde.RTDEClient; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import static at.acdp.urweb.rtde.CommandType.RTDE_REQUEST_PROTOCOL_VERSION; public class RtdeRequestProtocolVersion implements IRtdeData { public boolean success; private int replySize; public RtdeRequestProtocolVersion() { } @Override public int getType() { return RTDE_REQUEST_PROTOCOL_VERSION; } @Override public RtdeRequestProtocolVersion read(DataInputStream d, int length) throws IOException { success = d.readBoolean(); return this; } @Override public RtdeRequestProtocolVersion send(DataOutputStream dos) throws IOException { sendHeader(dos, 2); dos.writeShort(RTDEClient.RTDE_PROTOCOL_VERSION); dos.flush(); return this; } }