Package jmri.implementation
Class RawTurnoutOperator
- java.lang.Object
-
- java.lang.Thread
-
- jmri.TurnoutOperator
-
- jmri.implementation.RawTurnoutOperator
-
- All Implemented Interfaces:
java.lang.Runnable
public class RawTurnoutOperator extends TurnoutOperator
Concrete subclass of TurnoutOperator for a turnout that has no feedback. This operator sends raw NMRA accessory decoder packets to the layout instead of using the built in turnout code. It should be used only with turnouts with DIRECT, ONESENSOR or TWOSENSOR feedback. This class is based on the NoFeedbackTurnoutOperator class.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jmri.TurnoutOperator
TurnoutOperator.TurnoutOperatorException
-
-
Field Summary
Fields Modifier and Type Field Description (package private) int
address
(package private) CommandStation
c
(package private) long
interval
(package private) int
maxTries
(package private) int
tries
-
Fields inherited from class jmri.TurnoutOperator
myTurnout
-
-
Constructor Summary
Constructors Constructor Description RawTurnoutOperator(AbstractTurnout t, long i, int mt)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
run()
Do the autmation for a turnout with no feedback.-
Methods inherited from class jmri.TurnoutOperator
operatorCheck
-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Constructor Detail
-
RawTurnoutOperator
public RawTurnoutOperator(AbstractTurnout t, long i, int mt)
-
-
Method Detail
-
run
public void run()
Do the autmation for a turnout with no feedback. This means try maxTries times at an interval of interval. 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 interfacejava.lang.Runnable
- Overrides:
run
in classjava.lang.Thread
-
-