Package gda.device
Interface CharReadableDev
- All Known Subinterfaces:
Serial
- All Known Implementing Classes:
DummySerialDevice,SerialBase,SerialComm
public interface CharReadableDev
An interface for devices capable of having characters read from them.
-
Method Summary
Modifier and TypeMethodDescriptionvoidflush()Flushes any unread characters from the device.charreadChar()Reads a character from the device.voidsetReadTimeout(int time) Sets the maximum length of time to wait for a character to become available to read.
-
Method Details
-
readChar
Reads a character from the device.- Returns:
- the character read
- Throws:
DeviceException
-
flush
Flushes any unread characters from the device.- Throws:
DeviceException
-
setReadTimeout
Sets the maximum length of time to wait for a character to become available to read.- Parameters:
time- the length of time in milliseconds.- Throws:
DeviceException
-