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) BlockmWaitingOnBlock
-
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 voidaddMeetingTrain(ActiveTrain at)voiddispose()protected ActiveTraingetActiveTrain()protected java.lang.StringgetActiveTrainName()protected java.util.ArrayList<ActiveTrain>getMeetingTrainList()SectiongetSection()protected intgetSectionDirection()protected java.lang.StringgetSectionDirectionName()java.lang.StringgetSectionName()protected intgetSectionSeqNumber()protected booleangetWaitingForTrain()protected voidremoveMeetingTrain(ActiveTrain at)voidsetWaitingForSignalMast(SignalMast sm)protected voidsetWaitingForTrain(boolean set)protected voidsetWaitingOnBlock(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)
-
-