Package jmri.jmrit.dispatcher
Class TrainInfo
java.lang.Object
jmri.jmrit.dispatcher.TrainInfo
TrainInfo is a temporary object specifying New Train information just read
from disk, or to be written to disk
Used 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.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatbooleanintbooleanintreturn restart code for this train, only used for continuous runningintdelayed start code for this trainretrieve the startup delay sensor using the delay sensor nameintintintfloatGets the driver's applied power/regulator during acceleration (0.0..1.0).booleanbooleanintreturns the F number for the Bellintreturns the F number for the Hornintreturns the F number for the LightbooleanfloatGets the maximum speed in scale km/h. 0.0f means "disabled".floatDeprecated, for removal: This API element is subject to removal in a future version.floatGets the Max train length expected during routefloatGets the Max train length expected during runfloatintbooleanbooleanbooleanbooleanDeprecated, for removal: This API element is subject to removal in a future version.intretrieve the restart sensor using the restart sensor namebooleanintreturn restart code for this train, only used for continuous runningbooleanintfloatbooleanbooleanintfloatbooleanfloatbooleanGet the detection typebooleanbooleanbooleanbooleanbooleanGet the GUI units entered (The data is held in scale Meters)booleanbooleanintfloatvoidsetAdditionalTrainWeightMetricTonnes(float value) voidsetAllocateAllTheWay(boolean b) voidsetAllocationMethod(int i) voidsetAutoRun(boolean b) voidvoidvoidsetDelayedRestart(int ds) voidsetDelayedStart(int ds) voidsetDelaySensorName(String sen) voidsetDepartureTimeHr(int hr) voidsetDepartureTimeMin(int min) voidvoidvoidsetDestinationBlockSeq(int i) voidsetDriverPowerPercent(float value) Sets the driver's applied power/regulator during acceleration (0.0..1.0).voidsetDynamicTransit(boolean b) voidsetDynamicTransitCloseLoopIfPossible(boolean b) voidsetFNumberBell(int value) Sets F number for the BellvoidsetFNumberHorn(int value) Sets F number for the HornvoidsetFNumberLight(int value) Sets F number for the LightvoidsetLoadAtStartup(boolean loadAtStartup) voidsetMaxSpeed(float f) voidsetMaxSpeedScaleKmh(float kmh) Sets the maximum speed in scale km/h.voidsetMaxTrainLength(float f) Deprecated, for removal: This API element is subject to removal in a future version.voidsetMaxTrainLengthScaleFeet(float f) Sets the max train length expectedvoidsetMaxTrainLengthScaleMeters(float f) Sets the max train length expected during runvoidsetMinReliableOperatingSpeed(float f) voidvoidsetPriority(int pri) voidvoidsetResetRestartSensor(boolean b) voidsetResetStartSensor(boolean b) voidsetResetWhenDone(boolean b) voidsetResistanceWheels(boolean b) Deprecated, for removal: This API element is subject to removal in a future version.voidsetRestartDelayMin(int s) number of minutes to delay between restarting for continuous runsvoidvoidsetReverseAtEnd(boolean b) voidsetReverseDelayedRestart(int ds) voidsetReverseResetRestartSensor(boolean value) voidsetReverseRestartDelayMin(int value) voidvoidsetRollingResistanceCoeff(float value) voidvoidsetRunInReverse(boolean b) voidsetSoundDecoder(boolean b) voidsetSpeedFactor(float f) voidvoidvoidsetStartBlockSeq(int i) voidsetStopByDistanceMm(float value) voidvoidsetStopBySpeedProfile(boolean b) voidsetStopBySpeedProfileAdjust(float f) voidsetTerminateWhenDone(boolean b) voidSet the detection getvoidsetTrainFromRoster(boolean b) voidsetTrainFromSetLater(boolean b) voidsetTrainFromTrains(boolean b) voidsetTrainFromUser(boolean b) voidsetTrainInTransit(boolean b) voidSets the gui units used to enter or display (The units are always held in scale meters)voidvoidvoidvoidvoidvoidvoidsetUseSpeedProfile(boolean b) voidsetUseStopSensor(boolean value) voidsetVersion(int ver) voidvoidsetWaitTime(float f)
-
Constructor Details
-
TrainInfo
public TrainInfo()
-
-
Method Details
-
setVersion
-
getVersion
-
setTransitName
-
getTransitName
-
setTransitId
-
getTransitId
-
setDynamicTransit
-
getDynamicTransit
-
setDynamicTransitCloseLoopIfPossible
-
getDynamicTransitCloseLoopIfPossible
-
setTrainName
-
getTrainName
-
setRosterId
-
getRosterId
-
getUseStopSensor
-
setUseStopSensor
-
setTrainUserName
-
getTrainUserName
-
setDccAddress
-
getDccAddress
-
setTrainInTransit
-
getTrainInTransit
-
setStartBlockName
-
getStartBlockName
-
setViaBlockName
-
getViaBlockName
-
setStartBlockId
-
getStartBlockId
-
setStartBlockSeq
-
getStartBlockSeq
-
setDestinationBlockName
-
getDestinationBlockName
-
setDestinationBlockId
-
setStopByDistanceMm
-
setStopByDistanceRef
-
getStopByDistanceMm
-
getStopByDistanceRef
-
getDestinationBlockId
-
setDestinationBlockSeq
-
getDestinationBlockSeq
-
setTrainsFrom
-
getTrainsFrom
-
setTrainFromRoster
-
getTrainFromRoster
-
setTrainFromTrains
-
getTrainFromTrains
-
setTrainFromUser
-
getTrainFromUser
-
setTrainFromSetLater
-
getTrainFromSetLater
-
setTerminateWhenDone
-
getTerminateWhenDone
-
setNextTrain
-
getNextTrain
-
setPriority
-
getPriority
-
setAutoRun
-
getAutoRun
-
setResetWhenDone
-
getResetWhenDone
-
setAllocateAllTheWay
-
getAllocateAllTheWay
-
setAllocationMethod
-
getAllocationMethod
-
setUseSpeedProfile
-
getUseSpeedProfile
-
setStopBySpeedProfile
-
getStopBySpeedProfile
-
setStopBySpeedProfileAdjust
-
getStopBySpeedProfileAdjust
-
setReverseAtEnd
-
getReverseAtEnd
-
setDelayedStart
-
getDelayedStart
delayed start code for this train- Returns:
- one of ActiveTrain.NODELAY,TIMEDDELAY,SENSORDELAY
-
setDepartureTimeHr
-
getDepartureTimeHr
-
setDepartureTimeMin
-
getDepartureTimeMin
-
setDelaySensorName
-
getDelaySensorName
-
setReverseDelayedRestart
-
getReverseDelayedRestart
return restart code for this train, only used for continuous running- Returns:
- one of ActiveTrain.NODELAY,TIMEDDELAY,SENSORDELAY
-
setReverseRestartSensorName
-
getReverseRestartSensorName
-
setReverseResetRestartSensor
-
getReverseResetRestartSensor
-
getReverseRestartSensor
-
setReverseRestartDelayMin
-
getReverseRestartDelayMin
-
getDelaySensor
retrieve the startup delay sensor using the delay sensor name- Returns:
- delay sensor, or null if delay sensor name not set
-
getResetStartSensor
-
setResetStartSensor
-
setTrainType
-
getTrainType
-
setDelayedRestart
-
getDelayedRestart
return restart code for this train, only used for continuous running- Returns:
- one of ActiveTrain.NODELAY,TIMEDDELAY,SENSORDELAY
-
setRestartSensorName
-
getRestartSensorName
-
getRestartSensor
retrieve the restart sensor using the restart sensor name- Returns:
- restart sensor, or null if the restart sensor name not set
-
getResetRestartSensor
-
setResetRestartSensor
-
setRestartDelayMin
number of minutes to delay between restarting for continuous runs- Parameters:
s- number of minutes to delay
-
getRestartDelayMin
-
getLoadAtStartup
-
setLoadAtStartup
-
setSpeedFactor
-
getSpeedFactor
-
setMaxSpeed
-
getMaxSpeed
-
setMaxSpeedScaleKmh
Sets the maximum speed in scale km/h. Use 0.0f to disable and fall back to throttle percent.- Parameters:
kmh- scale kilometers per hour
-
getMaxSpeedScaleKmh
Gets the maximum speed in scale km/h. 0.0f means "disabled".- Returns:
- scale km/h
-
setMinReliableOperatingSpeed
-
getMinReliableOperatingSpeed
-
setRampRate
-
getRampRate
-
setTrainDetection
Set the detection get- Parameters:
b-ActiveTrain.TrainDetection
-
getTrainDetection
Get the detection type- Returns:
ActiveTrain.TrainDetection
-
setResistanceWheels
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
b- true or false
-
getResistanceWheels
Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- true or false
-
setRunInReverse
-
getRunInReverse
-
setSoundDecoder
-
getSoundDecoder
-
setFNumberLight
Sets F number for the Light- Parameters:
value- F Number.
-
getFNumberLight
returns the F number for the Light- Returns:
- F Number
-
setFNumberBell
Sets F number for the Bell- Parameters:
value- F Number.
-
getFNumberBell
returns the F number for the Bell- Returns:
- F Number
-
setFNumberHorn
Sets F number for the Horn- Parameters:
value- F Number.
-
getFNumberHorn
returns the F number for the Horn- Returns:
- F Number
-
setMaxTrainLength
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
f- train length
-
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
Sets the max train length expected during run- Parameters:
f- scale Meters.
-
getMaxTrainLengthScaleMeters
Gets the Max train length expected during run- Returns:
- scale meters
-
setMaxTrainLengthScaleFeet
Sets the max train length expected- Parameters:
f- scale Meters.
-
getMaxTrainLengthScaleFeet
Gets the Max train length expected during route- Returns:
- scale meters
-
setTrainLengthUnits
Sets the gui units used to enter or display (The units are always held in scale meters)- Parameters:
value-ActiveTrain.TrainLengthUnits
-
getTrainLengthUnits
Get the GUI units entered (The data is held in scale Meters)- Returns:
ActiveTrain.TrainLengthUnits
-
setWaitTime
-
getWaitTime
-
setBlockName
-
getBlockName
-
setAdditionalTrainWeightMetricTonnes
-
getAdditionalTrainWeightMetricTonnes
-
setRollingResistanceCoeff
-
getRollingResistanceCoeff
-
setDriverPowerPercent
Sets the driver's applied power/regulator during acceleration (0.0..1.0). -
getDriverPowerPercent
Gets the driver's applied power/regulator during acceleration (0.0..1.0).
-
getMaxTrainLengthScaleMeters()orgetMaxTrainLengthScaleFeet()