|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.implementation.AbstractNamedBean
jmri.jmrit.logix.Warrant
public class Warrant
An Warrant contains the operating permissions and directives needed for a train to proceed from an Origin to a Destination
Version 1.11 - remove setting of SignalHeads
| Field Summary | |
|---|---|
static int |
ABORT
|
static int |
HALT
|
static int |
MODE_LEARN
|
static int |
MODE_NONE
|
static int |
MODE_RUN
|
static int |
RESUME
|
static int |
RUNNING
|
static int |
SPEED_RESTRICTED
|
static int |
WAIT
|
| Fields inherited from interface jmri.NamedBean |
|---|
INCONSISTENT, UNKNOWN |
| Constructor Summary | |
|---|---|
Warrant(String sName,
String uName)
Create an object with no route defined. |
|
| Method Summary | |
|---|---|
void |
addBlockOrder(BlockOrder order)
Add permanently saved BlockOrder |
void |
addThrottleCommand(ThrottleSetting ts)
|
String |
allocateRoute()
Allocate the current saved blocks of this warrant. |
void |
clearAll()
|
boolean |
controlRunTrain(int idx)
Pause and resume auto-running train |
void |
deAllocate()
Deallocates blocks from the current BlockOrder list |
BlockOrder |
getCurrentBlockOrder()
|
int |
getCurrentCommandIndex()
|
int |
getCurrentOrderIndex()
|
DccLocoAddress |
getDccAddress()
|
BlockOrder |
getfirstOrder()
Return permanently saved Origin |
BlockOrder |
getLastOrder()
Return permanently saved Destination |
List<BlockOrder> |
getOrders()
Return permanently saved BlockOrders |
boolean |
getRunBlind()
|
int |
getRunMode()
Methods for running trains |
String |
getRunningMessage()
|
static SignalSpeedMap |
getSpeedMap()
|
int |
getState()
Provide generic access to internal state. |
List<ThrottleSetting> |
getThrottleCommands()
|
String |
getTrainId()
|
BlockOrder |
getViaOrder()
Return permanently saved BlockOrder that must be included in the route |
boolean |
hasRouteSet()
Turnouts and signals are set for the route |
boolean |
isAllocated()
Listeners are installed for the route |
void |
notifyThrottleFound(DccThrottle t)
Get notification that a throttle has been found as you requested. |
void |
propertyChange(PropertyChangeEvent evt)
|
boolean |
routeIsFree()
Test if the permanent saved blocks of this warrant are free (unoccupied and unallocated) |
boolean |
routeIsOccupied()
Test if the permanent saved blocks of this warrant are occupied |
String |
runAutoTrain(boolean run)
Starts or ends an automated train run. |
void |
setDccAddress(DccLocoAddress address)
|
String |
setRoute(int delay,
List<BlockOrder> orders)
Set the route paths and turnouts for the warrant. |
void |
setRunBlind(boolean runBlind)
|
void |
setState(int state)
Provide generic access to internal state. |
String |
setThrottleFactor(String sFactor)
|
boolean |
setTrainId(String id)
|
void |
setViaOrder(BlockOrder order)
|
| Methods inherited from class jmri.implementation.AbstractNamedBean |
|---|
addPropertyChangeListener, dispose, getComment, getDisplayName, getNumPropertyChangeListeners, getProperty, getPropertyChangeListeners, getPropertyKeys, getSystemName, getUserName, removePropertyChangeListener, setComment, setProperty, setUserName |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MODE_NONE
public static final int MODE_LEARN
public static final int MODE_RUN
public static final int HALT
public static final int RESUME
public static final int ABORT
public static final int WAIT
public static final int RUNNING
public static final int SPEED_RESTRICTED
| Constructor Detail |
|---|
public Warrant(String sName,
String uName)
| Method Detail |
|---|
public static final SignalSpeedMap getSpeedMap()
public int getState()
NamedBeanThis generally shouldn't be used by Java code; use the class-specific form instead. (E.g. getCommandedState in Turnout) This provided to make Jython script access easier to read.
getState in interface NamedBeanpublic void setState(int state)
NamedBeanThis generally shouldn't be used by Java code; use the class-specific form instead. (E.g. setCommandedState in Turnout) This provided to make Jython script access easier to read.
setState in interface NamedBeanpublic void clearAll()
public List<BlockOrder> getOrders()
public void addBlockOrder(BlockOrder order)
public BlockOrder getfirstOrder()
public BlockOrder getLastOrder()
public BlockOrder getViaOrder()
public void setViaOrder(BlockOrder order)
public BlockOrder getCurrentBlockOrder()
public int getCurrentOrderIndex()
public List<ThrottleSetting> getThrottleCommands()
public void addThrottleCommand(ThrottleSetting ts)
public String getTrainId()
public boolean setTrainId(String id)
public DccLocoAddress getDccAddress()
public void setDccAddress(DccLocoAddress address)
public boolean getRunBlind()
public void setRunBlind(boolean runBlind)
public String setThrottleFactor(String sFactor)
public boolean isAllocated()
public boolean hasRouteSet()
public boolean routeIsFree()
public boolean routeIsOccupied()
public int getRunMode()
public String runAutoTrain(boolean run)
run - set Run throttle command or Stop
public String getRunningMessage()
public int getCurrentCommandIndex()
public boolean controlRunTrain(int idx)
public void notifyThrottleFound(DccThrottle t)
ThrottleListener
notifyThrottleFound in interface ThrottleListenert - An instantiation of the DccThrottle with the address requested.public String allocateRoute()
public void deAllocate()
public String setRoute(int delay,
List<BlockOrder> orders)
delay - - delay in seconds, between setting signals and throwing turnoutsorders - - BlockOrder list of route. If null, use permanent warrant copy.
public void propertyChange(PropertyChangeEvent evt)
propertyChange in interface PropertyChangeListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||