nl.lxtreme.ols.api.devices
Interface Device

All Superinterfaces:
Closeable

public interface Device
extends Closeable

Interface for implementing device controllers. Each supported device must implement at least this interface.


Method Summary
 AcquisitionTask createAcquisitionTask(AcquisitionProgressListener aProgressListener)
          Creates a new AcquisitionTask for acquiring data from the device.
 CancelTask createCancelTask()
          Creates a new CancelTask for canceling the current acquisition from the device, if the device needs something special to do this.
 String getName()
          Returns a descriptive name of this device controller.
 boolean isSetup()
          Returns whether this device is already set up or not.
 boolean setupCapture(Window aParent)
          Allows this device controller to set up the device by means of presenting an UI.
 
Methods inherited from interface java.io.Closeable
close
 

Method Detail

createAcquisitionTask

AcquisitionTask createAcquisitionTask(AcquisitionProgressListener aProgressListener)
                                      throws IOException
Creates a new AcquisitionTask for acquiring data from the device.

Parameters:
aProgressListener - the acquisition progress listener the acquisition task can use to report its progress, cannot be null.
Returns:
a new acquisition task, never null.
Throws:
IOException - in case of I/O problems during the creation of the acquisition task.

createCancelTask

CancelTask createCancelTask()
                            throws IOException
Creates a new CancelTask for canceling the current acquisition from the device, if the device needs something special to do this.

Returns:
a new cancel task, if null the running acquisition is simply cancelled.
Throws:
IOException - in case of I/O problems during the creating of the cancellation task.

getName

String getName()
Returns a descriptive name of this device controller.

Returns:
name of the controller, cannot be null.

isSetup

boolean isSetup()
Returns whether this device is already set up or not.

Returns:
true if there is a "valid" setup for this device, false otherwise.

setupCapture

boolean setupCapture(Window aParent)
Allows this device controller to set up the device by means of presenting an UI.

Parameters:
aParent - the parent window that can be used to display (modal) dialogs, can be null.
Returns:
true if the setup is successfully completed (the user acknowledged the setup), false if the setup is aborted by the user.


Copyright © 2012 L'Xtreme IT consultancy. All Rights Reserved.