Package jmri.jmrit.logix
Class ThrottleSetting
java.lang.Object
jmri.jmrit.logix.ThrottleSetting
public class ThrottleSetting extends Object
Oct 2020 - change formats to allow I18N of parameters
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ThrottleSetting.Command
static class
ThrottleSetting.CommandValue
static class
ThrottleSetting.ValueType
-
Field Summary
Fields Modifier and Type Field Description (package private) static int
CMD_FORWARD
(package private) static int
CMD_FTN
(package private) static int
CMD_LATCH
(package private) static int
CMD_NOOP
(package private) static int
CMD_RUN_WARRANT
(package private) static int
CMD_SET_SENSOR
(package private) static int
CMD_SPEED
(package private) static int
CMD_SPEEDSTEP
(package private) static int
CMD_WAIT_SENSOR
(package private) static int
IS_ON_OFF
(package private) static int
IS_SENSOR_STATE
(package private) static int
IS_TRUE_FALSE
(package private) static int
VALUE_ACTIVE
(package private) static int
VALUE_FALSE
(package private) static int
VALUE_FLOAT
(package private) static int
VALUE_INACTIVE
(package private) static int
VALUE_INT
(package private) static int
VALUE_NOOP
(package private) static int
VALUE_OFF
(package private) static int
VALUE_ON
(package private) static int
VALUE_STEP
(package private) static int
VALUE_TRUE
-
Constructor Summary
Constructors Constructor Description ThrottleSetting()
ThrottleSetting(long time, String cmdStr, String value, String beanName)
ThrottleSetting(long time, String cmdStr, String value, String beanName, float trkSpd)
ThrottleSetting(long time, ThrottleSetting.Command command, int key, String value, String beanName, float trkSpd)
ThrottleSetting(long time, ThrottleSetting.Command command, int key, ThrottleSetting.ValueType vType, SpeedStepMode ss, float f, String beanName)
ThrottleSetting(long time, ThrottleSetting.Command command, int key, ThrottleSetting.ValueType vType, SpeedStepMode ss, float f, String beanName, float trkSpd)
ThrottleSetting(ThrottleSetting ts)
-
Method Summary
Modifier and Type Method Description String
getBeanDisplayName()
String
getBeanSystemName()
ThrottleSetting.Command
getCommand()
static ThrottleSetting.Command
getCommandTypeFromInt(int typeInt)
int
getKeyNum()
NamedBeanHandle<? extends NamedBean>
getNamedBeanHandle()
long
getTime()
float
getTrackSpeed()
ThrottleSetting.CommandValue
getValue()
static ThrottleSetting.ValueType
getValueTypeFromInt(int typeInt)
void
setCommand(String cmdStr)
void
setCommand(ThrottleSetting.Command command)
void
setKeyNum(int key)
String
setNamedBean(ThrottleSetting.Command cmd, String name)
<T extends NamedBean>
voidsetNamedBeanHandle(NamedBeanHandle<T> bh)
void
setTime(long time)
Time is an object so that a "synch to block entry" notation can be used rather than elapsed time.void
setTrackSpeed(float s)
void
setValue(String valueStr)
void
setValue(ThrottleSetting.CommandValue value)
void
setValue(ThrottleSetting.ValueType t, SpeedStepMode s, float f)
String
toString()
-
Field Details
-
CMD_SPEED
- See Also:
- Constant Field Values
-
CMD_SPEEDSTEP
- See Also:
- Constant Field Values
-
CMD_FORWARD
- See Also:
- Constant Field Values
-
CMD_FTN
- See Also:
- Constant Field Values
-
CMD_LATCH
- See Also:
- Constant Field Values
-
CMD_NOOP
- See Also:
- Constant Field Values
-
CMD_SET_SENSOR
- See Also:
- Constant Field Values
-
CMD_WAIT_SENSOR
- See Also:
- Constant Field Values
-
CMD_RUN_WARRANT
- See Also:
- Constant Field Values
-
VALUE_FLOAT
- See Also:
- Constant Field Values
-
VALUE_NOOP
- See Also:
- Constant Field Values
-
VALUE_INT
- See Also:
- Constant Field Values
-
VALUE_STEP
- See Also:
- Constant Field Values
-
VALUE_TRUE
- See Also:
- Constant Field Values
-
VALUE_FALSE
- See Also:
- Constant Field Values
-
VALUE_ON
- See Also:
- Constant Field Values
-
VALUE_OFF
- See Also:
- Constant Field Values
-
VALUE_ACTIVE
- See Also:
- Constant Field Values
-
VALUE_INACTIVE
- See Also:
- Constant Field Values
-
IS_TRUE_FALSE
- See Also:
- Constant Field Values
-
IS_ON_OFF
- See Also:
- Constant Field Values
-
IS_SENSOR_STATE
- See Also:
- Constant Field Values
-
-
Constructor Details
-
ThrottleSetting
public ThrottleSetting() -
ThrottleSetting
public ThrottleSetting(long time, ThrottleSetting.Command command, int key, ThrottleSetting.ValueType vType, SpeedStepMode ss, float f, String beanName) -
ThrottleSetting
public ThrottleSetting(long time, ThrottleSetting.Command command, int key, ThrottleSetting.ValueType vType, SpeedStepMode ss, float f, String beanName, float trkSpd) -
ThrottleSetting
-
ThrottleSetting
-
ThrottleSetting
public ThrottleSetting(long time, ThrottleSetting.Command command, int key, String value, String beanName, float trkSpd) -
ThrottleSetting
-
-
Method Details
-
getCommandTypeFromInt
-
getValueTypeFromInt
-
setTime
Time is an object so that a "synch to block entry" notation can be used rather than elapsed time.- Parameters:
time
- the time in some unit
-
getTime
-
setCommand
-
setCommand
-
getCommand
-
setKeyNum
-
getKeyNum
-
setValue
-
setValue
-
setValue
-
getValue
-
setTrackSpeed
-
getTrackSpeed
-
setNamedBean
-
setNamedBeanHandle
-
getNamedBeanHandle
-
getBeanDisplayName
-
getBeanSystemName
-
toString
-