TS SD integration #1653
This commit is contained in:
parent
185a023ada
commit
afe56a64c8
|
@ -85,6 +85,10 @@ public class BinaryProtocol implements BinaryProtocolCommands {
|
|||
|
||||
public static String findCommand(byte command) {
|
||||
switch (command) {
|
||||
case Fields.TS_SD_R_COMMAND:
|
||||
return "SD_R_COMMAND";
|
||||
case Fields.TS_SD_W_COMMAND:
|
||||
return "SD_W_COMMAND";
|
||||
case Fields.TS_PAGE_COMMAND:
|
||||
return "PAGE";
|
||||
case Fields.TS_COMMAND_F:
|
||||
|
|
|
@ -53,6 +53,8 @@ public interface IoStream extends WriteStream, Closeable, StreamStatistics {
|
|||
}
|
||||
|
||||
default void sendPacket(byte[] plainPacket) throws IOException {
|
||||
if (plainPacket.length == 0)
|
||||
throw new IllegalArgumentException("Empty packets are not valid.");
|
||||
byte[] packet;
|
||||
if (BinaryProtocol.PLAIN_PROTOCOL) {
|
||||
packet = plainPacket;
|
||||
|
|
Loading…
Reference in New Issue