Package jmri.jmrit.dispatcher
Class TrainInfo
- java.lang.Object
-
- jmri.jmrit.dispatcher.TrainInfo
-
public class TrainInfo extends java.lang.Object
TrainInfo is a temporary object specifying New Train information just read from disk, or to be written to diskUsed in conjunction with TrainInfoFile.java to save and retrieve New Train information
When adding a new item of New Train information, modifications need to be made to TrainInfoFile.java and dispatcher-traininfo.DTD as well as this module.
-
-
Constructor Summary
Constructors Constructor Description TrainInfo()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
getAllocateAllTheWay()
int
getAllocationMethod()
boolean
getAutoRun()
java.lang.String
getBlockName()
java.lang.String
getDccAddress()
int
getDelayedRestart()
return restart code for this train, only used for continuous runningint
getDelayedStart()
delayed start code for this trainSensor
getDelaySensor()
retrieve the startup delay sensor using the delay sensor namejava.lang.String
getDelaySensorName()
int
getDepartureTimeHr()
int
getDepartureTimeMin()
java.lang.String
getDestinationBlockId()
java.lang.String
getDestinationBlockName()
int
getDestinationBlockSeq()
boolean
getLoadAtStartup()
java.lang.Float
getMaxSpeed()
float
getMaxTrainLength()
Deprecated, for removal: This API element is subject to removal in a future version.float
getMaxTrainLengthScaleFeet()
Gets the Max train length expected during routefloat
getMaxTrainLengthScaleMeters()
Gets the Max train length expected during runfloat
getMinReliableOperatingSpeed()
java.lang.String
getNextTrain()
int
getPriority()
java.lang.String
getRampRate()
boolean
getResetRestartSensor()
boolean
getResetStartSensor()
boolean
getResetWhenDone()
boolean
getResistanceWheels()
Deprecated, for removal: This API element is subject to removal in a future version.int
getRestartDelayMin()
Sensor
getRestartSensor()
retrieve the restart sensor using the restart sensor namejava.lang.String
getRestartSensorName()
boolean
getReverseAtEnd()
int
getReverseDelayedRestart()
return restart code for this train, only used for continuous runningboolean
getReverseResetRestartSensor()
int
getReverseRestartDelayMin()
Sensor
getReverseRestartSensor()
java.lang.String
getReverseRestartSensorName()
java.lang.String
getRosterId()
boolean
getRunInReverse()
boolean
getSoundDecoder()
java.lang.Float
getSpeedFactor()
java.lang.String
getStartBlockId()
java.lang.String
getStartBlockName()
int
getStartBlockSeq()
boolean
getStopBySpeedProfile()
float
getStopBySpeedProfileAdjust()
boolean
getTerminateWhenDone()
ActiveTrain.TrainDetection
getTrainDetection()
Get the detection typeboolean
getTrainFromRoster()
boolean
getTrainFromSetLater()
boolean
getTrainFromTrains()
boolean
getTrainFromUser()
boolean
getTrainInTransit()
ActiveTrain.TrainLengthUnits
getTrainLengthUnits()
Get the GUI units entered (The data is held in scale Meters)java.lang.String
getTrainName()
DispatcherFrame.TrainsFrom
getTrainsFrom()
java.lang.String
getTrainType()
java.lang.String
getTrainUserName()
java.lang.String
getTransitId()
java.lang.String
getTransitName()
boolean
getUseSpeedProfile()
int
getVersion()
float
getWaitTime()
void
setAllocateAllTheWay(boolean b)
void
setAllocationMethod(int i)
void
setAutoRun(boolean b)
void
setBlockName(java.lang.String s)
void
setDccAddress(java.lang.String s)
void
setDelayedRestart(int ds)
void
setDelayedStart(int ds)
void
setDelaySensorName(java.lang.String sen)
void
setDepartureTimeHr(int hr)
void
setDepartureTimeMin(int min)
void
setDestinationBlockId(java.lang.String s)
void
setDestinationBlockName(java.lang.String s)
void
setDestinationBlockSeq(int i)
void
setLoadAtStartup(boolean loadAtStartup)
void
setMaxSpeed(float f)
void
setMaxTrainLength(float f)
Deprecated, for removal: This API element is subject to removal in a future version.void
setMaxTrainLengthScaleFeet(float f)
Sets the max train length expectedvoid
setMaxTrainLengthScaleMeters(float f)
Sets the max train length expected during runvoid
setMinReliableOperatingSpeed(float f)
void
setNextTrain(java.lang.String s)
void
setPriority(int pri)
void
setRampRate(java.lang.String s)
void
setResetRestartSensor(boolean b)
void
setResetStartSensor(boolean b)
void
setResetWhenDone(boolean b)
void
setResistanceWheels(boolean b)
Deprecated, for removal: This API element is subject to removal in a future version.void
setRestartDelayMin(int s)
number of minutes to delay between restarting for continuous runsvoid
setRestartSensorName(java.lang.String sen)
void
setReverseAtEnd(boolean b)
void
setReverseDelayedRestart(int ds)
void
setReverseResetRestartSensor(boolean value)
void
setReverseRestartDelayMin(int value)
void
setReverseRestartSensorName(java.lang.String value)
void
setRosterId(java.lang.String s)
void
setRunInReverse(boolean b)
void
setSoundDecoder(boolean b)
void
setSpeedFactor(float f)
void
setStartBlockId(java.lang.String s)
void
setStartBlockName(java.lang.String s)
void
setStartBlockSeq(int i)
void
setStopBySpeedProfile(boolean b)
void
setStopBySpeedProfileAdjust(float f)
void
setTerminateWhenDone(boolean b)
void
setTrainDetection(ActiveTrain.TrainDetection b)
Set the detection getvoid
setTrainFromRoster(boolean b)
void
setTrainFromSetLater(boolean b)
void
setTrainFromTrains(boolean b)
void
setTrainFromUser(boolean b)
void
setTrainInTransit(boolean b)
void
setTrainLengthUnits(ActiveTrain.TrainLengthUnits value)
Sets the gui units used to enter or display (The units are always held in scale meters)void
setTrainName(java.lang.String s)
void
setTrainsFrom(DispatcherFrame.TrainsFrom value)
void
setTrainType(java.lang.String s)
void
setTrainUserName(java.lang.String s)
void
setTransitId(java.lang.String s)
void
setTransitName(java.lang.String s)
void
setUseSpeedProfile(boolean b)
void
setVersion(int ver)
void
setWaitTime(float f)
-
-
-
Constructor Detail
-
TrainInfo
public TrainInfo()
-
-
Method Detail
-
setVersion
public void setVersion(int ver)
-
getVersion
public int getVersion()
-
setTransitName
public void setTransitName(java.lang.String s)
-
getTransitName
public java.lang.String getTransitName()
-
setTransitId
public void setTransitId(java.lang.String s)
-
getTransitId
public java.lang.String getTransitId()
-
setTrainName
public void setTrainName(java.lang.String s)
-
getTrainName
public java.lang.String getTrainName()
-
setRosterId
public void setRosterId(java.lang.String s)
-
getRosterId
public java.lang.String getRosterId()
-
setTrainUserName
public void setTrainUserName(java.lang.String s)
-
getTrainUserName
public java.lang.String getTrainUserName()
-
setDccAddress
public void setDccAddress(java.lang.String s)
-
getDccAddress
public java.lang.String getDccAddress()
-
setTrainInTransit
public void setTrainInTransit(boolean b)
-
getTrainInTransit
public boolean getTrainInTransit()
-
setStartBlockName
public void setStartBlockName(java.lang.String s)
-
getStartBlockName
public java.lang.String getStartBlockName()
-
setStartBlockId
public void setStartBlockId(java.lang.String s)
-
getStartBlockId
public java.lang.String getStartBlockId()
-
setStartBlockSeq
public void setStartBlockSeq(int i)
-
getStartBlockSeq
public int getStartBlockSeq()
-
setDestinationBlockName
public void setDestinationBlockName(java.lang.String s)
-
getDestinationBlockName
public java.lang.String getDestinationBlockName()
-
setDestinationBlockId
public void setDestinationBlockId(java.lang.String s)
-
getDestinationBlockId
public java.lang.String getDestinationBlockId()
-
setDestinationBlockSeq
public void setDestinationBlockSeq(int i)
-
getDestinationBlockSeq
public int getDestinationBlockSeq()
-
setTrainsFrom
public void setTrainsFrom(DispatcherFrame.TrainsFrom value)
-
getTrainsFrom
public DispatcherFrame.TrainsFrom getTrainsFrom()
-
setTrainFromRoster
public void setTrainFromRoster(boolean b)
-
getTrainFromRoster
public boolean getTrainFromRoster()
-
setTrainFromTrains
public void setTrainFromTrains(boolean b)
-
getTrainFromTrains
public boolean getTrainFromTrains()
-
setTrainFromUser
public void setTrainFromUser(boolean b)
-
getTrainFromUser
public boolean getTrainFromUser()
-
setTrainFromSetLater
public void setTrainFromSetLater(boolean b)
-
getTrainFromSetLater
public boolean getTrainFromSetLater()
-
setTerminateWhenDone
public void setTerminateWhenDone(boolean b)
-
getTerminateWhenDone
public boolean getTerminateWhenDone()
-
setNextTrain
public void setNextTrain(java.lang.String s)
-
getNextTrain
public java.lang.String getNextTrain()
-
setPriority
public void setPriority(int pri)
-
getPriority
public int getPriority()
-
setAutoRun
public void setAutoRun(boolean b)
-
getAutoRun
public boolean getAutoRun()
-
setResetWhenDone
public void setResetWhenDone(boolean b)
-
getResetWhenDone
public boolean getResetWhenDone()
-
setAllocateAllTheWay
public void setAllocateAllTheWay(boolean b)
-
getAllocateAllTheWay
public boolean getAllocateAllTheWay()
-
setAllocationMethod
public void setAllocationMethod(int i)
-
getAllocationMethod
public int getAllocationMethod()
-
setUseSpeedProfile
public void setUseSpeedProfile(boolean b)
-
getUseSpeedProfile
public boolean getUseSpeedProfile()
-
setStopBySpeedProfile
public void setStopBySpeedProfile(boolean b)
-
getStopBySpeedProfile
public boolean getStopBySpeedProfile()
-
setStopBySpeedProfileAdjust
public void setStopBySpeedProfileAdjust(float f)
-
getStopBySpeedProfileAdjust
public float getStopBySpeedProfileAdjust()
-
setReverseAtEnd
public void setReverseAtEnd(boolean b)
-
getReverseAtEnd
public boolean getReverseAtEnd()
-
setDelayedStart
public void setDelayedStart(int ds)
-
getDelayedStart
public int getDelayedStart()
delayed start code for this train- Returns:
- one of ActiveTrain.NODELAY,TIMEDDELAY,SENSORDELAY
-
setDepartureTimeHr
public void setDepartureTimeHr(int hr)
-
getDepartureTimeHr
public int getDepartureTimeHr()
-
setDepartureTimeMin
public void setDepartureTimeMin(int min)
-
getDepartureTimeMin
public int getDepartureTimeMin()
-
setDelaySensorName
public void setDelaySensorName(java.lang.String sen)
-
getDelaySensorName
public java.lang.String getDelaySensorName()
-
setReverseDelayedRestart
public void setReverseDelayedRestart(int ds)
-
getReverseDelayedRestart
public int getReverseDelayedRestart()
return restart code for this train, only used for continuous running- Returns:
- one of ActiveTrain.NODELAY,TIMEDDELAY,SENSORDELAY
-
setReverseRestartSensorName
public void setReverseRestartSensorName(java.lang.String value)
-
getReverseRestartSensorName
public java.lang.String getReverseRestartSensorName()
-
setReverseResetRestartSensor
public void setReverseResetRestartSensor(boolean value)
-
getReverseResetRestartSensor
public boolean getReverseResetRestartSensor()
-
getReverseRestartSensor
public Sensor getReverseRestartSensor()
-
setReverseRestartDelayMin
public void setReverseRestartDelayMin(int value)
-
getReverseRestartDelayMin
public int getReverseRestartDelayMin()
-
getDelaySensor
public Sensor getDelaySensor()
retrieve the startup delay sensor using the delay sensor name- Returns:
- delay sensor, or null if delay sensor name not set
-
getResetStartSensor
public boolean getResetStartSensor()
-
setResetStartSensor
public void setResetStartSensor(boolean b)
-
setTrainType
public void setTrainType(java.lang.String s)
-
getTrainType
public java.lang.String getTrainType()
-
setDelayedRestart
public void setDelayedRestart(int ds)
-
getDelayedRestart
public int getDelayedRestart()
return restart code for this train, only used for continuous running- Returns:
- one of ActiveTrain.NODELAY,TIMEDDELAY,SENSORDELAY
-
setRestartSensorName
public void setRestartSensorName(java.lang.String sen)
-
getRestartSensorName
public java.lang.String getRestartSensorName()
-
getRestartSensor
public Sensor getRestartSensor()
retrieve the restart sensor using the restart sensor name- Returns:
- restart sensor, or null if the restart sensor name not set
-
getResetRestartSensor
public boolean getResetRestartSensor()
-
setResetRestartSensor
public void setResetRestartSensor(boolean b)
-
setRestartDelayMin
public void setRestartDelayMin(int s)
number of minutes to delay between restarting for continuous runs- Parameters:
s
- number of minutes to delay
-
getRestartDelayMin
public int getRestartDelayMin()
-
getLoadAtStartup
public boolean getLoadAtStartup()
-
setLoadAtStartup
public void setLoadAtStartup(boolean loadAtStartup)
-
setSpeedFactor
public void setSpeedFactor(float f)
-
getSpeedFactor
public java.lang.Float getSpeedFactor()
-
setMaxSpeed
public void setMaxSpeed(float f)
-
getMaxSpeed
public java.lang.Float getMaxSpeed()
-
setMinReliableOperatingSpeed
public void setMinReliableOperatingSpeed(float f)
-
getMinReliableOperatingSpeed
public float getMinReliableOperatingSpeed()
-
setRampRate
public void setRampRate(java.lang.String s)
-
getRampRate
public java.lang.String getRampRate()
-
setTrainDetection
public void setTrainDetection(ActiveTrain.TrainDetection b)
Set the detection get- Parameters:
b
-ActiveTrain.TrainDetection
-
getTrainDetection
public ActiveTrain.TrainDetection getTrainDetection()
Get the detection type- Returns:
ActiveTrain.TrainDetection
-
setResistanceWheels
@Deprecated(since="5.7.6", forRemoval=true) public void setResistanceWheels(boolean b)
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
b
- true or false
-
getResistanceWheels
@Deprecated(since="5.7.6", forRemoval=true) public boolean getResistanceWheels()
Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- true or false
-
setRunInReverse
public void setRunInReverse(boolean b)
-
getRunInReverse
public boolean getRunInReverse()
-
setSoundDecoder
public void setSoundDecoder(boolean b)
-
getSoundDecoder
public boolean getSoundDecoder()
-
setMaxTrainLength
@Deprecated(since="5.9.7", forRemoval=true) public void setMaxTrainLength(float f)
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
f
- train length
-
getMaxTrainLength
@Deprecated(since="5.9.7", forRemoval=true) public float getMaxTrainLength()
Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- train length of in units of the writing application
-
setMaxTrainLengthScaleMeters
public void setMaxTrainLengthScaleMeters(float f)
Sets the max train length expected during run- Parameters:
f
- scale Meters.
-
getMaxTrainLengthScaleMeters
public float getMaxTrainLengthScaleMeters()
Gets the Max train length expected during run- Returns:
- scale meters
-
setMaxTrainLengthScaleFeet
public void setMaxTrainLengthScaleFeet(float f)
Sets the max train length expected- Parameters:
f
- scale Meters.
-
getMaxTrainLengthScaleFeet
public float getMaxTrainLengthScaleFeet()
Gets the Max train length expected during route- Returns:
- scale meters
-
setTrainLengthUnits
public void setTrainLengthUnits(ActiveTrain.TrainLengthUnits value)
Sets the gui units used to enter or display (The units are always held in scale meters)- Parameters:
value
-ActiveTrain.TrainLengthUnits
-
getTrainLengthUnits
public ActiveTrain.TrainLengthUnits getTrainLengthUnits()
Get the GUI units entered (The data is held in scale Meters)- Returns:
ActiveTrain.TrainLengthUnits
-
setWaitTime
public void setWaitTime(float f)
-
getWaitTime
public float getWaitTime()
-
setBlockName
public void setBlockName(java.lang.String s)
-
getBlockName
public java.lang.String getBlockName()
-
-