Package jmri.jmrit.logix
Class ThrottleSetting
- java.lang.Object
-
- jmri.jmrit.logix.ThrottleSetting
-
public class ThrottleSetting extends java.lang.Object
Oct 2020 - change formats to allow I18N of parameters Jul 2024 - Add the SET_MEMORY action. This makes it possible to trigger external actions beyond just a sensor. DAS
-
-
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_MEMORY
(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_TEXT
(package private) static int
VALUE_TRUE
-
Constructor Summary
Constructors Constructor Description ThrottleSetting()
ThrottleSetting(long time, java.lang.String cmdStr, java.lang.String value, java.lang.String beanName)
ThrottleSetting(long time, java.lang.String cmdStr, java.lang.String value, java.lang.String beanName, float trkSpd)
ThrottleSetting(long time, ThrottleSetting.Command command, int key, java.lang.String value, java.lang.String beanName, float trkSpd)
ThrottleSetting(long time, ThrottleSetting.Command command, int key, ThrottleSetting.ValueType vType, SpeedStepMode ss, float f, java.lang.String tx, java.lang.String beanName)
ThrottleSetting(long time, ThrottleSetting.Command command, int key, ThrottleSetting.ValueType vType, SpeedStepMode ss, float f, java.lang.String tx, java.lang.String beanName, float trkSpd)
ThrottleSetting(ThrottleSetting ts)
-
Method Summary
-
-
-
Field Detail
-
CMD_SPEED
static final int CMD_SPEED
- See Also:
- Constant Field Values
-
CMD_SPEEDSTEP
static final int CMD_SPEEDSTEP
- See Also:
- Constant Field Values
-
CMD_FORWARD
static final int CMD_FORWARD
- See Also:
- Constant Field Values
-
CMD_FTN
static final int CMD_FTN
- See Also:
- Constant Field Values
-
CMD_LATCH
static final int CMD_LATCH
- See Also:
- Constant Field Values
-
CMD_NOOP
static final int CMD_NOOP
- See Also:
- Constant Field Values
-
CMD_SET_SENSOR
static final int CMD_SET_SENSOR
- See Also:
- Constant Field Values
-
CMD_WAIT_SENSOR
static final int CMD_WAIT_SENSOR
- See Also:
- Constant Field Values
-
CMD_RUN_WARRANT
static final int CMD_RUN_WARRANT
- See Also:
- Constant Field Values
-
CMD_SET_MEMORY
static final int CMD_SET_MEMORY
- See Also:
- Constant Field Values
-
VALUE_FLOAT
static final int VALUE_FLOAT
- See Also:
- Constant Field Values
-
VALUE_NOOP
static final int VALUE_NOOP
- See Also:
- Constant Field Values
-
VALUE_INT
static final int VALUE_INT
- See Also:
- Constant Field Values
-
VALUE_STEP
static final int VALUE_STEP
- See Also:
- Constant Field Values
-
VALUE_TEXT
static final int VALUE_TEXT
- See Also:
- Constant Field Values
-
VALUE_TRUE
static final int VALUE_TRUE
- See Also:
- Constant Field Values
-
VALUE_FALSE
static final int VALUE_FALSE
- See Also:
- Constant Field Values
-
VALUE_ON
static final int VALUE_ON
- See Also:
- Constant Field Values
-
VALUE_OFF
static final int VALUE_OFF
- See Also:
- Constant Field Values
-
VALUE_ACTIVE
static final int VALUE_ACTIVE
- See Also:
- Constant Field Values
-
VALUE_INACTIVE
static final int VALUE_INACTIVE
- See Also:
- Constant Field Values
-
IS_TRUE_FALSE
static final int IS_TRUE_FALSE
- See Also:
- Constant Field Values
-
IS_ON_OFF
static final int IS_ON_OFF
- See Also:
- Constant Field Values
-
IS_SENSOR_STATE
static final int IS_SENSOR_STATE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ThrottleSetting
public ThrottleSetting()
-
ThrottleSetting
public ThrottleSetting(long time, ThrottleSetting.Command command, int key, ThrottleSetting.ValueType vType, SpeedStepMode ss, float f, java.lang.String tx, java.lang.String beanName)
-
ThrottleSetting
public ThrottleSetting(long time, ThrottleSetting.Command command, int key, ThrottleSetting.ValueType vType, SpeedStepMode ss, float f, java.lang.String tx, java.lang.String beanName, float trkSpd)
-
ThrottleSetting
public ThrottleSetting(long time, java.lang.String cmdStr, java.lang.String value, java.lang.String beanName)
-
ThrottleSetting
public ThrottleSetting(long time, java.lang.String cmdStr, java.lang.String value, java.lang.String beanName, float trkSpd)
-
ThrottleSetting
public ThrottleSetting(long time, ThrottleSetting.Command command, int key, java.lang.String value, java.lang.String beanName, float trkSpd)
-
ThrottleSetting
public ThrottleSetting(ThrottleSetting ts)
-
-
Method Detail
-
getCommandTypeFromInt
public static ThrottleSetting.Command getCommandTypeFromInt(int typeInt)
-
getValueTypeFromInt
public static ThrottleSetting.ValueType getValueTypeFromInt(int typeInt)
-
getValueFromString
protected static ThrottleSetting.CommandValue getValueFromString(ThrottleSetting.Command command, java.lang.String valueStr) throws JmriException
- Throws:
JmriException
-
setTime
public void setTime(long time)
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
public long getTime()
-
setCommand
public void setCommand(java.lang.String cmdStr)
-
setCommand
public void setCommand(ThrottleSetting.Command command)
-
getCommand
public ThrottleSetting.Command getCommand()
-
setKeyNum
public void setKeyNum(int key)
-
getKeyNum
public int getKeyNum()
-
setValue
public void setValue(java.lang.String valueStr)
-
setValue
public void setValue(ThrottleSetting.CommandValue value)
-
setValue
public void setValue(ThrottleSetting.ValueType t, SpeedStepMode s, float f, java.lang.String tx)
-
getValue
public ThrottleSetting.CommandValue getValue()
-
setTrackSpeed
public void setTrackSpeed(float s)
-
getTrackSpeed
public float getTrackSpeed()
-
setNamedBean
public java.lang.String setNamedBean(ThrottleSetting.Command cmd, java.lang.String name)
-
setNamedBeanHandle
public <T extends NamedBean> void setNamedBeanHandle(NamedBeanHandle<T> bh)
-
getNamedBeanHandle
public NamedBeanHandle<? extends NamedBean> getNamedBeanHandle()
-
getBeanDisplayName
public java.lang.String getBeanDisplayName()
-
getBeanSystemName
public java.lang.String getBeanSystemName()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-