|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
public interface SerialTransport
| Method Summary | |
|---|---|
void |
flush()
Take any actions necessary (possibly none) to remove unsent data from the output path. |
int |
getBaudRate()
Get the current baud rate of the communication channel. |
void |
open()
Causes the communication interface to be opened but does not transmit any serial-layer data. |
byte[] |
receiveBytes(int length,
byte[] messageSpace,
int offset,
int timeoutMillis)
Receive a number of bytes on the serial transport. |
void |
sendBytes(int length,
byte[] message,
int offset,
int timeoutMs)
Send bytes down the serial transport layer. |
void |
setBaudRate(int rate)
Set the current baud rate of the communication channel. |
void |
shutdown()
Close the communication channel. |
| Method Detail |
|---|
void open()
throws ReaderException
ReaderException
void sendBytes(int length,
byte[] message,
int offset,
int timeoutMs)
throws ReaderException
message - array containing the bytes to be sentlength - number of bytes to sendoffset - position in array to send fromtimeoutMs - The duration to wait for the operation to complete.
ReaderException
byte[] receiveBytes(int length,
byte[] messageSpace,
int offset,
int timeoutMillis)
throws ReaderException
length - number of bytes to receivemessageSpace - byte array to store the message in, or null to have one allocatedoffset - location in messageSpace to store bytestimeoutMillis - maximum duration to wait for a message
TimeoutException - if timeoutMillis pass without a message being received
ReaderException
int getBaudRate()
throws ReaderException
ReaderException
void setBaudRate(int rate)
throws ReaderException
rate - the baud rate to set
java.lang.IllegalArgumentException - if the channel does not support the rate
ReaderException
void flush()
throws ReaderException
ReaderException
void shutdown()
throws ReaderException
ReaderException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||