public class MicrosecondsOption extends Option
Modifier and Type | Field and Description |
---|---|
protected int |
defaultValue |
protected int |
value |
ADDRESS_OPTION, BOOLEAN_OPTION, ENUM_OPTION, FLOAT_OPTION, INT_OPTION, MICROSECONDS_OPTION, PAGES_OPTION, RAW, READABLE, set, STRING_OPTION, XML
Modifier | Constructor and Description |
---|---|
protected |
MicrosecondsOption(OptionSet set,
String name,
String desc,
int defaultUs)
Create a new microsecond option.
|
Modifier and Type | Method and Description |
---|---|
int |
getDefaultMicroseconds()
Read the default value of the option in microseconds.
|
int |
getDefaultMilliseconds()
Read the default value of the option in milliseconds.
|
int |
getMicroseconds()
Read the current value of the option in microseconds.
|
int |
getMilliseconds()
Read the current value of the option in milliseconds.
|
void |
setDefaultMicrosends(int value)
Modify the default value of the option.
|
void |
setMicroseconds(int value)
Update the value of the option, echoing the change if the echoOptions
option is set.
|
protected int defaultValue
protected int value
protected MicrosecondsOption(OptionSet set, String name, String desc, int defaultUs)
set
- The option set this option belongs to.name
- The space separated name for the option.desc
- The purpose of the optiondefaultUs
- The default value of the option (usec).public int getMicroseconds()
public int getMilliseconds()
public int getDefaultMicroseconds()
public int getDefaultMilliseconds()
public void setMicroseconds(int value)
value
- The new value for the option.public void setDefaultMicrosends(int value)
value
- The new default value for the option.