Class AllocationRequest
- java.lang.Object
-
- jmri.jmrit.dispatcher.AllocationRequest
-
public class AllocationRequest extends java.lang.Object
This class holds information and options for an AllocationRequestt.An AllocationRequest holds the following information: Section to be allocated Active Train requesting the allocation
A AllocationRequests is referenced via a list in DispatcherFrame, which serves as a manager for AllocationRequest objects.
AllocationRequests are transient, and are not saved to disk.
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
Fields Modifier and Type Field Description (package private) Block
mWaitingOnBlock
-
Constructor Summary
Constructors Constructor Description AllocationRequest(Section s, int num, int dir, ActiveTrain at)
Create an AllocationRequest.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addMeetingTrain(ActiveTrain at)
void
dispose()
protected ActiveTrain
getActiveTrain()
protected java.lang.String
getActiveTrainName()
protected java.util.ArrayList<ActiveTrain>
getMeetingTrainList()
Section
getSection()
protected int
getSectionDirection()
protected java.lang.String
getSectionDirectionName()
java.lang.String
getSectionName()
protected int
getSectionSeqNumber()
protected boolean
getWaitingForTrain()
protected void
removeMeetingTrain(ActiveTrain at)
void
setWaitingForSignalMast(SignalMast sm)
protected void
setWaitingForTrain(boolean set)
protected void
setWaitingOnBlock(Block b)
-
-
-
Field Detail
-
mWaitingOnBlock
Block mWaitingOnBlock
-
-
Constructor Detail
-
AllocationRequest
public AllocationRequest(Section s, int num, int dir, ActiveTrain at)
Create an AllocationRequest.- Parameters:
s
- the requested sectionnum
- the sequence number for the requested sectiondir
- the direction the train is traveling on the sectionat
- the train for which the section is requested
-
-
Method Detail
-
getSection
public Section getSection()
-
getSectionName
public java.lang.String getSectionName()
-
getActiveTrain
protected ActiveTrain getActiveTrain()
-
getActiveTrainName
protected java.lang.String getActiveTrainName()
-
getSectionSeqNumber
protected int getSectionSeqNumber()
-
getSectionDirection
protected int getSectionDirection()
-
getSectionDirectionName
protected java.lang.String getSectionDirectionName()
-
getWaitingForTrain
protected boolean getWaitingForTrain()
-
setWaitingForTrain
protected void setWaitingForTrain(boolean set)
-
addMeetingTrain
protected void addMeetingTrain(ActiveTrain at)
-
removeMeetingTrain
protected void removeMeetingTrain(ActiveTrain at)
-
getMeetingTrainList
protected java.util.ArrayList<ActiveTrain> getMeetingTrainList()
-
dispose
public void dispose()
-
setWaitingForSignalMast
public void setWaitingForSignalMast(SignalMast sm)
-
setWaitingOnBlock
protected void setWaitingOnBlock(Block b)
-
-