public class SerialCommunicator.SerialWriter
extends java.lang.Object
Constructor and Description |
---|
SerialWriter(java.io.OutputStream out) |
Modifier and Type | Method and Description |
---|---|
int |
getUnprocessedRequestCount()
Return the value of the counter that determines the amount of currently sent, but unresolved requests.
|
void |
informAboutProcessedRequest()
Inform this writer that one of the requests it send have been resolved.
|
boolean |
sendData(int[] data,
boolean waitForConfirm)
Send the data provided to the module, returning true on success, false otherwise.
|
void |
sendGUIElementRenumber(byte origNumber,
byte targetNumber)
Send an GUI_ELEMENT_RENUMBER command to the module.
|
void |
sendInit()
Send an INIT command to the module.
|
void |
sendInit2()
Send an INIT2 command to the module.
|
void |
sendNOTOk()
Send an NotOK (Negative ACK) command to the module.
|
void |
sendOk()
Send an OK (positive ACK) command to the module.
|
public void informAboutProcessedRequest()
public int getUnprocessedRequestCount()
public void sendOk()
public void sendNOTOk()
public void sendInit()
public void sendInit2()
public void sendGUIElementRenumber(byte origNumber, byte targetNumber)
public boolean sendData(int[] data, boolean waitForConfirm) throws java.io.IOException
data
- the data to send, array of ints from 0 to 255.waitForConfirm
- whether we should actively wait for the reply (true) or not (false)java.io.IOException
- when something goes wrong