jmri.jmrit.tracker
Class StoppingBlock

java.lang.Object
  extended by 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:

Author:
Bob Jacobsen Copyright (C) 2006

Constructor Summary
StoppingBlock(Block b)
           
 
Method Summary
 void addSignal(SignalHead s, int dir)
           
 void addSignal(SignalHead s1, SignalHead s2, int dir)
           
 void setSpeeds(float s, float f)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StoppingBlock

public StoppingBlock(Block b)
Method Detail

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 - 2009 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