jmri.jmrit.tracker
Class StoppingBlock
java.lang.Object
jmri.jmrit.tracker.StoppingBlock
public class StoppingBlock
- extends Object
Stop a train in a block if required.
Watches a Block object that is passing around a Throttle object
as it's value. When the Block goes OCCUPIED, check whether a
signal is telling the train to stop; if so, force the Throttle
to zero speed.
This contains multiple SignalHead objects, each associated with a Path that
contains one or more BeanSettings (e.g. Turnout positions) and directions.
When needed, this consults the paths to see which one is active (has it's
Turnouts set) and corresponds to the current direction of the block. There
should be exactly one of these, which will then identify which signal to monitor.
Limitations:
- Current implementation does not protect against changing
direction and backing out of the block
- Should track speed at time of stop and restore it on restart (or
should it not restart? Optional restart?)
- Author:
- Bob Jacobsen Copyright (C) 2006
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StoppingBlock
public StoppingBlock(Block b)
addSignal
public void addSignal(SignalHead s,
int dir)
addSignal
public void addSignal(SignalHead s1,
SignalHead s2,
int dir)
setSpeeds
public void setSpeeds(float s,
float f)
Copyright © 1997 - 2011 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: