jmri.implementation
Class SensorTurnoutOperator

java.lang.Object
  extended by java.lang.Thread
      extended by jmri.TurnoutOperator
          extended by jmri.implementation.SensorTurnoutOperator
All Implemented Interfaces:
Runnable

public class SensorTurnoutOperator
extends TurnoutOperator


Nested Class Summary
 
Nested classes/interfaces inherited from class jmri.TurnoutOperator
TurnoutOperator.TurnoutOperatorException
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class jmri.TurnoutOperator
myTurnout
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
SensorTurnoutOperator(AbstractTurnout t, long i, int mt)
           
 
Method Summary
 void run()
          Do the autmation for a turnout with sensor feedback.
 
Methods inherited from class jmri.TurnoutOperator
operatorCheck
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SensorTurnoutOperator

public SensorTurnoutOperator(AbstractTurnout t,
                             long i,
                             int mt)
Method Detail

run

public void run()
Do the autmation for a turnout with sensor feedback. Keep trying up to maxTries until the sensor tells us the change has actually happened. Note the call to operatorCheck each time we're about to actually do something - if we're no longer the current operator this throws TurnoutOperatorException which just terminates the thread.

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


Copyright © 1997 - 2010 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads