|
RobotCore 1.0
WPILib port to raspberry Pi
|
Classes | |
| enum | Polling |
Public Member Functions | |
| TunableConfig () | |
| TunableConfig (Map< String, String > propertiesMap, boolean robust, String typeString, boolean isMutable, Runnable onTune, boolean alwaysGet) | |
| TunableConfig (Map< String, String > propertiesMap, boolean robust, String typeString, boolean isMutable, Runnable onTune, Polling polling) | |
| TunableConfig | withProperty (String key, String value) |
| TunableConfig | withRobust (boolean robust) |
| TunableConfig | withTypeString (String typeString) |
| TunableConfig | withMutable (boolean isMutable) |
| TunableConfig | withOnTune (Runnable onTune) |
| TunableConfig | withAlwaysGet (boolean alwaysGet) |
| TunableConfig | withPolling (Polling polling) |
| String | getProperties () |
| boolean | isRobust () |
| String | getTypeString () |
| boolean | isMutable () |
| Runnable | getOnTune () |
| boolean | isAlwaysGet () |
| Polling | getPolling () |
Static Public Member Functions | |
| static TunableConfig | of (TunableOption... options) |
Additional optional configuration for tunables. This class is immutable.
Definition at line 15 of file TunableConfig.java.
| org.wpilib.tunable.TunableConfig.TunableConfig | ( | ) |
Creates a TunableConfig with default configuration: no properties, robust=false, no type string, isMutable=true, no callback, and polling=DEFAULT.
Definition at line 45 of file TunableConfig.java.
| org.wpilib.tunable.TunableConfig.TunableConfig | ( | Map< String, String > | propertiesMap, |
| boolean | robust, | ||
| String | typeString, | ||
| boolean | isMutable, | ||
| Runnable | onTune, | ||
| boolean | alwaysGet ) |
Creates a TunableConfig.
| propertiesMap | properties |
| robust | robust flag |
| typeString | type string |
| isMutable | mutable flag |
| onTune | onTune callback; must not throw |
| alwaysGet | always get flag |
Definition at line 64 of file TunableConfig.java.
| org.wpilib.tunable.TunableConfig.TunableConfig | ( | Map< String, String > | propertiesMap, |
| boolean | robust, | ||
| String | typeString, | ||
| boolean | isMutable, | ||
| Runnable | onTune, | ||
| Polling | polling ) |
Creates a TunableConfig.
| propertiesMap | properties |
| robust | robust flag |
| typeString | type string |
| isMutable | mutable flag |
| onTune | onTune callback; must not throw |
| polling | polling behavior |
Definition at line 90 of file TunableConfig.java.
| Runnable org.wpilib.tunable.TunableConfig.getOnTune | ( | ) |
Returns callback to call when the tunable is modified via tune(). This is called immediately after the tunable's tune() function is called. The callback will be called by TunableRegistry#update() and must not throw.
Definition at line 320 of file TunableConfig.java.
| Polling org.wpilib.tunable.TunableConfig.getPolling | ( | ) |
Returns when the backend should poll the tunable's local value.
Definition at line 338 of file TunableConfig.java.
| String org.wpilib.tunable.TunableConfig.getProperties | ( | ) |
Gets properties as a JSON string.
Definition at line 270 of file TunableConfig.java.
| String org.wpilib.tunable.TunableConfig.getTypeString | ( | ) |
Returns the custom type string for the tunable.
Definition at line 299 of file TunableConfig.java.
| boolean org.wpilib.tunable.TunableConfig.isAlwaysGet | ( | ) |
Returns whether the tunable should always get its value.
Definition at line 329 of file TunableConfig.java.
| boolean org.wpilib.tunable.TunableConfig.isMutable | ( | ) |
Returns whether the tunable is mutable. Setting this to false makes the tunable immutable, meaning that the Tunable's set() function will not be called.
Definition at line 309 of file TunableConfig.java.
| boolean org.wpilib.tunable.TunableConfig.isRobust | ( | ) |
Returns whether the tunable should separately echo back its new value after being set.
Definition at line 290 of file TunableConfig.java.
|
static |
Creates a TunableConfig from an array of TunableOption.
| options | options |
Definition at line 128 of file TunableConfig.java.
| TunableConfig org.wpilib.tunable.TunableConfig.withAlwaysGet | ( | boolean | alwaysGet | ) |
Sets the polling behavior to always get or get on change.
| alwaysGet | whether the tunable should always get its value |
Definition at line 250 of file TunableConfig.java.
| TunableConfig org.wpilib.tunable.TunableConfig.withMutable | ( | boolean | isMutable | ) |
Sets the mutable flag.
| isMutable | whether the tunable is mutable; setting this to false makes the tunable immutable, meaning that the Tunable's set() function will not be called |
Definition at line 226 of file TunableConfig.java.
| TunableConfig org.wpilib.tunable.TunableConfig.withOnTune | ( | Runnable | onTune | ) |
Sets the onTune callback.
| onTune | callback to call when the tunable is modified via tune(); this is called immediately after the tunable's tune() function is called. The callback will be called by TunableRegistry#update(). This callback must not throw. |
Definition at line 239 of file TunableConfig.java.
| TunableConfig org.wpilib.tunable.TunableConfig.withPolling | ( | Polling | polling | ) |
Sets the polling behavior.
| polling | polling behavior |
Definition at line 260 of file TunableConfig.java.
| TunableConfig org.wpilib.tunable.TunableConfig.withProperty | ( | String | key, |
| String | value ) |
Sets a property value.
| key | property key |
| value | property value; must be a valid JSON value string (e.g. quoted string, number, true, false, null, object, or array) |
Definition at line 157 of file TunableConfig.java.
| TunableConfig org.wpilib.tunable.TunableConfig.withRobust | ( | boolean | robust | ) |
Sets the robust flag.
| robust | whether the tunable should separately echo back its value after setting |
Definition at line 203 of file TunableConfig.java.
| TunableConfig org.wpilib.tunable.TunableConfig.withTypeString | ( | String | typeString | ) |
Sets the type string.
| typeString | the type string to use for the tunable |
Definition at line 214 of file TunableConfig.java.