示例#1
0
 /** Sends a command by breaking it into entries and sending each entry. */
 private void sendCommand(BaseCommand<?> command, int maxSendAttempts) {
   for (Entry entry : EntryDispatcher.toEntries(command)) sendEntry(entry, maxSendAttempts);
 }
示例#2
0
 /** Reads input from the device and dispatches the result to the command listener. */
 private void processInputData() throws IOException {
   out.write(Protocol.PC_READY.value);
   out.flush();
   InputBuffer buffer = InputBuffer.readFrom(in);
   dispatcher.dispatch(buffer.entries);
 }