ccd
Class JCamera.ExposeThread

java.lang.Object
  extended by java.lang.Thread
      extended by ccd.JCamera.ExposeThread
All Implemented Interfaces:
Runnable
Enclosing class:
JCamera

protected class JCamera.ExposeThread
extends Thread

The exposure thread repeadetly calls the ccd's CcdDriver.expose() method until stopped or until the predefined number of exposures is reached. Whenever a new exposure finished, signaled by a return of the CcdDriver.expose() method, a JCamera.DisplayThread is notified to retrieve the data.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
private  boolean cancel
          If true, we cancel exposure taking.
private  int count
          The number of images to take.
private  nom.tam.fits.Fits current
          The fits currently retrieved.
private  JCamera.DisplayThread display
          The display thread linked to the read-out thread.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
protected JCamera.ExposeThread(int maxexposures)
          Constructs a new, non auto-starting exposure thread.
 
Method Summary
protected  nom.tam.fits.Fits getCurrentFits()
          Retrieves the last CCD exposure name.
 void run()
          Runs the exposure.
protected  void setCancel(boolean yes)
          Sets the cancel flag.
protected  void setDisplayThread(JCamera.DisplayThread show)
          We hand over a handle to the image thread to let the exposure thread yell if the network retrieval of the fits is too slow.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

display

private JCamera.DisplayThread display
The display thread linked to the read-out thread.


count

private int count
The number of images to take. Zero means run forever.


current

private nom.tam.fits.Fits current
The fits currently retrieved.


cancel

private boolean cancel
If true, we cancel exposure taking.

Constructor Detail

JCamera.ExposeThread

protected JCamera.ExposeThread(int maxexposures)
Constructs a new, non auto-starting exposure thread. The connection is established, if not already up. The record and play icons of the enclosing class are disabled. The binning and exposure time as well as the read-out window is queried from the enclosing class.

Method Detail

setDisplayThread

protected void setDisplayThread(JCamera.DisplayThread show)
We hand over a handle to the image thread to let the exposure thread yell if the network retrieval of the fits is too slow.


run

public void run()
Runs the exposure. Whenever the CcdDriver.expose() method returns, we notify the main class.

Specified by:
run in interface Runnable
Overrides:
run in class Thread

setCancel

protected void setCancel(boolean yes)
Sets the cancel flag.


getCurrentFits

protected nom.tam.fits.Fits getCurrentFits()
Retrieves the last CCD exposure name.