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 Type
    Method
    Description
    void
    Flushes any unread characters from the device.
    char
    Reads a character from the device.
    void
    setReadTimeout(int time)
    Sets the maximum length of time to wait for a character to become available to read.
  • Method Details

    • readChar

      char readChar() throws DeviceException
      Reads a character from the device.
      Returns:
      the character read
      Throws:
      DeviceException
    • flush

      void flush() throws DeviceException
      Flushes any unread characters from the device.
      Throws:
      DeviceException
    • setReadTimeout

      void setReadTimeout(int time) throws DeviceException
      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