ccd
Class SynchronousCcdDriver<T>

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by io.AbstractDriver
                  extended by ccd.AbstractCcdDriver<T>
                      extended by ccd.SynchronousCcdDriver<T>
All Implemented Interfaces:
CcdDriver<T>, Driver, Cloneable, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying
Direct Known Subclasses:
E2VDriver, FechnerDriver, FireDriver, FireDriverWish, GigeDriver, MagellanDriver, MagellanDriver, ScienceCcdDriver, StreamingCcdDriver

public abstract class SynchronousCcdDriver<T>
extends AbstractCcdDriver<T>

A blocking ccd-driver acts on the CcdDriver.expose(), CcdDriver.exposeBias(), and CcdDriver.exposeDark() methods. This abstract base class allows the #startExpose and #startDarkExpose to be wrapped around.

See Also:
AsynchronousCcdDriver

Nested Class Summary
protected  class SynchronousCcdDriver.ExposureThread
          An exposure thread simly calls CcdDriver.expose() or CcdDriver.exposeDark(), depending on the argument it was constructed with.
 
Nested classes/interfaces inherited from class ccd.AbstractCcdDriver
AbstractCcdDriver.Endurance, AbstractCcdDriver.Exposure, AbstractCcdDriver.Shot
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private  Thread running
          A thread that exposes.
 
Fields inherited from class ccd.AbstractCcdDriver
KEY_AMPLIFIERS, KEY_AREAREADOUT, KEY_COLUMNPOST, KEY_COLUMNPRIOR, KEY_COLUMNREADOUT, KEY_FIXEDREADOUT, KEY_INITSIZE, KEY_ROWPOST, KEY_ROWPRIOR, KEY_ROWREADOUT, KEY_XBINNING, KEY_XCHIPSIZE, KEY_XORIGIN, KEY_XSIZE, KEY_YBINNING, KEY_YCHIPSIZE, KEY_YORIGIN, KEY_YSIZE
 
Fields inherited from class io.AbstractDriver
KEY_DRIVERNAME
 
Fields inherited from class util.PropertyBundles
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES
 
Fields inherited from class util.PropertyResources
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR
 
Fields inherited from interface ccd.CcdDriver
FITSEXTENSION
 
Fields inherited from interface util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Fields inherited from interface util.PropertySupplying
CONFIG, KEY_CLASS
 
Constructor Summary
protected SynchronousCcdDriver(Map<String,String> info)
          Constructor.
 
Method Summary
 boolean ensureReady()
          We are ready if we either have no exposure thread or if this thread is dead.
 boolean isExposing()
          We are exposing if the running thread is not equal null and alive.
 Thread threadedDarkExpose()
          Starts a dark exposure.
 Thread threadedExpose()
          Starts an exposure.
 
Methods inherited from class ccd.AbstractCcdDriver
getChipSize, getReadoutTime, init, open, openController
 
Methods inherited from class io.AbstractDriver
createDriver, equals, getDriverName, hashCode
 
Methods inherited from class util.PropertyBundles
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource
 
Methods inherited from class util.PropertyResources
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, keyCreate, keyCreate, reload, setApplet
 
Methods inherited from class util.PropertyContainer
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ccd.CcdDriver
expose, exposeBias, exposeDark, getBinning, getBufferType, getCcdInfo, getDataBuffer, getExposureTime, getWindow, setBinning, setDataBuffer, setExposureTime, setWindow
 
Methods inherited from interface io.Driver
close, getDriverName, isOpen
 
Methods inherited from interface util.ResourceSupplying
getResource, getResourceAsStream, getResources
 
Methods inherited from interface util.PropertySupplying
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties
 

Field Detail

running

private Thread running
A thread that exposes. Initialized with threadedExpose().

Constructor Detail

SynchronousCcdDriver

protected SynchronousCcdDriver(Map<String,String> info)
Constructor. Does not open the connection, this is done in AbstractCcdDriver.open().

Method Detail

threadedExpose

public Thread threadedExpose()
                      throws IOException
Starts an exposure. This method generates a thread and starts it that calls the CcdDriver.expose() method. The thread returned will be interrupted if an I/O error occurs during reading.

Returns:
The thread that ends when the exposure is done.
Throws:
IOException - Any subclass of IOException.
See Also:
expose

threadedDarkExpose

public Thread threadedDarkExpose()
                          throws IOException
Starts a dark exposure. This method generates a thread and starts it that calls the CcdDriver.exposeDark() method. The thread returned will be interrupted if an I/O error occurs during reading.

Returns:
The thread that ends when the exposure is done.
Throws:
IOException - Any subclass of IOException.
See Also:
expose

isExposing

public boolean isExposing()
We are exposing if the running thread is not equal null and alive.


ensureReady

public boolean ensureReady()
We are ready if we either have no exposure thread or if this thread is dead.

Returns:
True, if data is ready.