stella.roof
Class BaaderDome.OpenHatch

java.lang.Object
  extended by java.lang.Thread
      extended by stella.roof.BaaderDome.OpenHatch
All Implemented Interfaces:
Runnable
Enclosing class:
BaaderDome

private class BaaderDome.OpenHatch
extends Thread

A thread that turns on the hatch motor for opening and turns it off automatically after a specified wait time. If the hardware improves and the limit switch can be queried, this should be incorporated as a premature return of the thread, but note that this thread may also be used for correct handling of slit moves.

Thread does automatically start.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
(package private)  long timeout
          The time the motor is on at most.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
private BaaderDome.OpenHatch(long maxtime)
          Creates and starts a open-hatch thread with the specified timeout.
 
Method Summary
 void run()
          On run, we synchronize on the imbedder object reference, turn on the mototrs, wait and turn them off again.
 
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

timeout

long timeout
The time the motor is on at most.

Constructor Detail

BaaderDome.OpenHatch

private BaaderDome.OpenHatch(long maxtime)
Creates and starts a open-hatch thread with the specified timeout.

Method Detail

run

public void run()
On run, we synchronize on the imbedder object reference, turn on the mototrs, wait and turn them off again. On IO Exception, we interrupt ourself.

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