io
Interface Driver
- All Known Subinterfaces:
- CcdDriver<T>, Cooldown, DomeDriver, EthReading, FitsDriver, MultiAxes, OneWireDriver, PilarDriver, Positioning, Resettable, Shutter, StreamIODriver, TelescopeDriver
- All Known Implementing Classes:
- AbstractCcdDriver, AbstractDriver, AbstractPilarDriver, AbstractSerialDriver, AbstractSocketDriver, AsynchronousCcdDriver, BaaderDome, CalibUnit, CastingRS485Server, CommunicationHandler, DummyRS485, E2VDriver, FechnerDriver, FilterWheel, FireDriver, FireDriverWish, GenericMoxa, GetterSetter, GigeDriver, GregorDriver, JanosDriver, JRS485Config, JRS485Simulator, JWheel.DummyAxes, LinearPositioner, MagellanDriver, MagellanDriver, MiniWheel, MotorController, MoxaAnalog, MoxaDigital, MoxaTemperature, NudamConfig, OpenPilarSocket, OpenPilarSocket.PilarTest, Pilar3Socket, Pilar3Socket.PilarTest, PollingRS485Server, PythonClient, RelativeWheel, RS485Configurator, RS485ReadWriteServer, RS485Scan, RS485Server, ScienceCcdDriver, SerialDriver, ServerClient, StreamingCcdDriver, SynchronousCcdDriver, UpsDriver, WatchdogRS485Server, WifsipWheel, WindmillShutter
public interface Driver
A simple interface describing an object that can be used as a device driver.
It supports only two methods, #init to perform some basic steps
when the driver is loaded, like opening a serial port for a
RS485Server, and close() to perform some clean-up operations
when the driver is unloaded, e.g. closing of a serial port.
|
Method Summary |
boolean |
close()
Performs clean-up step when the driver is unloaded. |
String |
getDriverName()
If more than one driver of a certain class is present, but registering
is only allowed to a certain driver, we can use this method to
distinguish between different instances of the driver. |
boolean |
isOpen()
Queries the initalization status of the driver. |
boolean |
open()
Performs initialization steps when the driver is loaded for the first
time. |
open
boolean open()
throws IOException
- Performs initialization steps when the driver is loaded for the first
time. A driver that communicates with the serial port will open
the port in this instance.
- Returns:
- True if initialization was successful.
- Throws:
IOException
isOpen
boolean isOpen()
- Queries the initalization status of the driver. If the driver has been
successfully initalized this method should return true.
- Returns:
- True, if a previous initialization was successful
close
boolean close()
throws IOException
- Performs clean-up step when the driver is unloaded. A serial-port driver
will probably close the serial port in this method.
- Returns:
- True if clean-up was successful.
- Throws:
IOException
getDriverName
String getDriverName()
- If more than one driver of a certain class is present, but registering
is only allowed to a certain driver, we can use this method to
distinguish between different instances of the driver.