Package jmri.jmrit.logix
Class BlockOrder
- java.lang.Object
-
- jmri.jmrit.logix.BlockOrder
-
public class BlockOrder extends java.lang.Object
A BlockOrder is a row in the route of the warrant. It contains where the warranted train enters a block, the path it takes and where it exits the block. (The route is a list of BlockOrder.) The Engineer is notified when the train enters the block.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BlockOrder(BlockOrder bo)
BlockOrder(OBlock block)
BlockOrder(OBlock block, java.lang.String path, java.lang.String entry, java.lang.String exit)
Create BlockOrder.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected TrainOrder
allocatePaths(Warrant warrant, boolean allocate)
OBlock
getBlock()
protected float
getEntranceSpace()
java.lang.String
getEntryName()
protected Portal
getEntryPortal()
java.lang.String
getExitName()
protected Portal
getExitPortal()
int
getIndex()
protected OPath
getPath()
protected float
getPathLength()
java.lang.String
getPathName()
protected java.lang.String
getPermissibleEntranceSpeed()
Check signals for entrance into next block.protected static java.lang.String
getPermissibleSpeedAt(BlockOrder bo)
protected NamedBean
getSignal()
Get the signal protecting entry into the block of this BlockOrder.protected java.lang.String
pathsConnect(OPath path1, Portal exit, OBlock block)
protected void
setBlock(OBlock block)
protected void
setEntryName(java.lang.String name)
protected void
setExitName(java.lang.String name)
void
setIndex(int idx)
protected java.lang.String
setPath(Warrant warrant)
protected void
setPathLength(float len)
protected void
setPathName(java.lang.String path)
Set Path.java.lang.String
toString()
-
-
-
Constructor Detail
-
BlockOrder
public BlockOrder(@Nonnull OBlock block)
-
BlockOrder
public BlockOrder(@Nonnull OBlock block, java.lang.String path, java.lang.String entry, java.lang.String exit)
Create BlockOrder.- Parameters:
block
- OBlock of this orderpath
- MUST be a path in the blocKentry
- MUST be a name of a Portal to the pathexit
- MUST be a name of a Portal to the path
-
BlockOrder
protected BlockOrder(@Nonnull BlockOrder bo)
-
-
Method Detail
-
setIndex
public void setIndex(int idx)
-
getIndex
public int getIndex()
-
setEntryName
protected void setEntryName(java.lang.String name)
-
getEntryName
public java.lang.String getEntryName()
-
setExitName
protected void setExitName(java.lang.String name)
-
getExitName
public java.lang.String getExitName()
-
setPathName
protected void setPathName(java.lang.String path)
Set Path. Note that the Path's 'fromPortal' and 'toPortal' have no bearing on the BlockOrder's entryPortal and exitPortal.- Parameters:
path
- Name of the OPath connecting the entry and exit Portals
-
getPathName
public java.lang.String getPathName()
-
allocatePaths
@Nonnull protected TrainOrder allocatePaths(@Nonnull Warrant warrant, boolean allocate)
-
pathsConnect
@CheckForNull protected java.lang.String pathsConnect(@Nonnull OPath path1, @CheckForNull Portal exit, @CheckForNull OBlock block)
-
getPermissibleSpeedAt
protected static java.lang.String getPermissibleSpeedAt(BlockOrder bo)
-
setPathLength
protected void setPathLength(float len)
-
getPathLength
protected float getPathLength()
-
getEntryPortal
@CheckForNull protected Portal getEntryPortal()
-
getExitPortal
@CheckForNull protected Portal getExitPortal()
-
getPermissibleEntranceSpeed
protected java.lang.String getPermissibleEntranceSpeed()
Check signals for entrance into next block.- Returns:
- speed
-
getEntranceSpace
protected float getEntranceSpace()
-
getSignal
@CheckForNull protected NamedBean getSignal()
Get the signal protecting entry into the block of this BlockOrder.- Returns:
- signal
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-