apps.cornwall
Class CrrSection

Show UML class diagram
java.lang.Object
  extended by jmri.jmrit.automat.AbstractAutomaton
      extended by apps.cornwall.CrrSection
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
CrrSection10A, CrrSection10B, CrrSection11A, CrrSection11B, CrrSection12A, CrrSection12B, CrrSection13A, CrrSection13B, CrrSection14A, CrrSection14B, CrrSection15A, CrrSection15B, CrrSection16A, CrrSection16B, CrrSection17A, CrrSection17B, CrrSection17C, CrrSection18A, CrrSection18B, CrrSection19A, CrrSection19B, CrrSection1A, CrrSection1B, CrrSection20A, CrrSection20B, CrrSection21A, CrrSection21B, CrrSection22A, CrrSection2A, CrrSection2B, CrrSection3A, CrrSection3B, CrrSection4A, CrrSection4B, CrrSection5A, CrrSection5B, CrrSection6A, CrrSection6B, CrrSection7A, CrrSection7B, CrrSection8A, CrrSection8B, CrrSection9A, CrrSection9B

public abstract class CrrSection
extends AbstractAutomaton

Abstract base class for Cornwall RR automation.

Defines useful constants, and handles basic structure of hte update process.


Nested Class Summary
 
Nested classes/interfaces inherited from class jmri.jmrit.automat.AbstractAutomaton
AbstractAutomaton.MsgFrame
 
Field Summary
(package private) static int ACTIVE
           
(package private) static Sensor[] bo
          Java array of Sensor objects corresponding to BO() occupancy sensors in the C/MRI code.
(package private) static int CLOSED
           
(package private) static int DARK
           
(package private) static int FLASHYELLOW
           
(package private) static Sensor gate
          Java sensor object representing the "gate" input
(package private) static int GREEN
           
(package private) static int INACTIVE
           
(package private)  NamedBean[] inputs
          Array of sensors and/or turnouts needed as inputs; changes in these will kick off processing
(package private) static org.slf4j.Logger log
           
(package private) static int RED
           
(package private) static Turnout[] si
          Java array of Turnout objects corresponding to SI() signal outputs in the C/MRI code.
(package private)  SignalHead sig
          References the signalhead to be controlled.
(package private) static int THROWN
           
(package private) static Sensor[] tu
          Java array of Sensor objects corresponding to TU() turnout sensors in the C/MRI code.
(package private) static int YELLOW
           
 
Fields inherited from class jmri.jmrit.automat.AbstractAutomaton
promptOnWait
 
Constructor Summary
CrrSection()
           
 
Method Summary
(package private) abstract  void defineIO()
          Locate and define the output Signal object, stored in sig
protected  boolean handle()
          Watch sensors, and when it changes adjust outputs to match.
protected  void init()
          Obtain the output object, sets the output to an initial state to make sure everything is consistent at the start.
(package private) abstract  void setOutput()
          Calculate the signal settings
 
Methods inherited from class jmri.jmrit.automat.AbstractAutomaton
getCount, getName, getThrottle, getThrottle, readServiceModeCV, run, setName, setTurnouts, start, stop, wait, waitChange, waitMsec, waitSensorActive, waitSensorActive, waitSensorChange, waitSensorChange, waitSensorInactive, waitSensorInactive, waitSensorState, waitSensorState, waitTurnoutConsistent, writeOpsModeCV, writeServiceModeCV
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RED

static final int RED
See Also:
Constant Field Values

YELLOW

static final int YELLOW
See Also:
Constant Field Values

GREEN

static final int GREEN
See Also:
Constant Field Values

DARK

static final int DARK
See Also:
Constant Field Values

FLASHYELLOW

static final int FLASHYELLOW
See Also:
Constant Field Values

ACTIVE

static final int ACTIVE
See Also:
Constant Field Values

INACTIVE

static final int INACTIVE
See Also:
Constant Field Values

CLOSED

static final int CLOSED
See Also:
Constant Field Values

THROWN

static final int THROWN
See Also:
Constant Field Values

sig

SignalHead sig
References the signalhead to be controlled.


inputs

NamedBean[] inputs
Array of sensors and/or turnouts needed as inputs; changes in these will kick off processing


gate

static Sensor gate
Java sensor object representing the "gate" input


tu

static Sensor[] tu
Java array of Sensor objects corresponding to TU() turnout sensors in the C/MRI code. Note that TU[1] is like TU(1) in BASIC, so there's an extra null entry at the beginning (as TU[0]).

Initialization of the contents happens when the first CrrSection object constructor is run.


bo

static Sensor[] bo
Java array of Sensor objects corresponding to BO() occupancy sensors in the C/MRI code. Note that BO[1] is like BO(1) in BASIC, so there's an extra null entry at the beginning (as BO[0]).

Initialization of the contents happens when the first CrrSection object constructor is run.


si

static Turnout[] si
Java array of Turnout objects corresponding to SI() signal outputs in the C/MRI code. Note that SI[1] is like SI(1) in BASIC, so there's an extra null entry at the beginning (as SI[0]).

Initialization of the contents happens when the first CrrSection object constructor is run.


log

static org.slf4j.Logger log
Constructor Detail

CrrSection

CrrSection()
Method Detail

setOutput

abstract void setOutput()
Calculate the signal settings


defineIO

abstract void defineIO()
Locate and define the output Signal object, stored in sig


init

protected void init()
Obtain the output object, sets the output to an initial state to make sure everything is consistent at the start.

Overrides:
init in class AbstractAutomaton

handle

protected boolean handle()
Watch sensors, and when it changes adjust outputs to match.

Overrides:
handle in class AbstractAutomaton
Returns:
Always returns true to continue operation


Copyright © 1997-2014 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