Class StoppingBlock


  • public class StoppingBlock
    extends java.lang.Object
    Stop a train in a block if required.

    Watches a Block object that is passing around a Throttle object as its 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 its 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?)