|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.TransitSectionAction
public class TransitSectionAction
This class holds information and options for a Action to be applied when an automated train enters, exits, or is inside of a Section in a Transit.
A TransitSection holds specified TrainsitSectionActions. A TransitSection may have as many TransitSectionActions as appropriate. Each TransitSectionAction belongs to one and only one TransitSection.
TransitSectionActions are specified in two parts: 1. The "When" part specifies when after the automated train enters the Section the action is to be initiated. Optionally, each "when" may be delayed by a specified time (in milliseconds). 2. The "What" part specified what action is to occur.
TransitSectionActions are created and editted in the Transit Table, when Transits are defined.
This class provides support for SENSORACTIVE and SENSORINACTIVE "when"'s.
This file is part of JMRI.
JMRI is open source software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.
JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
| Field Summary | |
|---|---|
static int |
BLOCKENTRY
|
static int |
BLOCKEXIT
|
static int |
ENTRY
|
static int |
EXIT
|
static int |
LOCOFUNCTION
|
static int |
NUM_WHATS
Constants designating the "what" (the action to be taken) of the Action |
static int |
NUM_WHENS
Constants representing the "when" (when the action is to be initiated) of the Action |
static int |
PAUSE
|
static int |
RAMPTRAINSPEED
|
static int |
SENSORACTIVE
|
static int |
SENSORINACTIVE
|
static int |
SETCURRENTSPEED
|
static int |
SETLIGHT
|
static int |
SETMAXSPEED
|
static int |
SETSENSORACTIVE
|
static int |
SETSENSORINACTIVE
|
static int |
SOUNDHORN
|
static int |
SOUNDHORNPATTERN
|
static int |
STARTBELL
|
static int |
STOPBELL
|
static int |
TOMANUALMODE
|
static int |
TRAINSTART
|
static int |
TRAINSTOP
|
| Constructor Summary | |
|---|---|
TransitSectionAction(int when,
int what)
Main constructor method |
|
TransitSectionAction(int when,
int what,
int dataWhen,
int dataWhat1,
int dataWhat2,
String sWhen,
String sWhat)
Convenience constructor |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int NUM_WHENS
public static final int ENTRY
public static final int EXIT
public static final int BLOCKENTRY
public static final int BLOCKEXIT
public static final int TRAINSTOP
public static final int TRAINSTART
public static final int SENSORACTIVE
public static final int SENSORINACTIVE
public static final int NUM_WHATS
public static final int PAUSE
public static final int SETMAXSPEED
public static final int SETCURRENTSPEED
public static final int RAMPTRAINSPEED
public static final int TOMANUALMODE
public static final int SETLIGHT
public static final int STARTBELL
public static final int STOPBELL
public static final int SOUNDHORN
public static final int SOUNDHORNPATTERN
public static final int LOCOFUNCTION
public static final int SETSENSORACTIVE
public static final int SETSENSORINACTIVE
| Constructor Detail |
|---|
public TransitSectionAction(int when,
int what)
public TransitSectionAction(int when,
int what,
int dataWhen,
int dataWhat1,
int dataWhat2,
String sWhen,
String sWhat)
| Method Detail |
|---|
public int getWhenCode()
public void setWhenCode(int n)
public int getWhatCode()
public void setWhatCode(int n)
public int getDataWhen()
public void setDataWhen(int n)
public int getDataWhat1()
public void setDataWhat1(int n)
public int getDataWhat2()
public void setDataWhat2(int n)
public String getStringWhen()
public void setStringWhen(String s)
public String getStringWhat()
public void setStringWhat(String s)
public void initialize()
public Thread getWaitingThread()
public void setWaitingThread(Thread t)
public boolean getWaitingForSectionExit()
public void setWaitingForSectionExit(boolean w)
public TransitSection getTargetTransitSection()
public void setTargetTransitSection(TransitSection ts)
public boolean getWaitingForBlock()
public void setWaitingForBlock(boolean w)
public boolean getWaitingForSensor()
public void setWaitingForSensor(boolean w)
public Sensor getTriggerSensor()
public void setTriggerSensor(Sensor s)
public PropertyChangeListener getSensorListener()
public void setSensorListener(PropertyChangeListener l)
public void disposeSensorListener()
public void dispose()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||