|
RobotCore 1.0
WPILib port to raspberry Pi
|
Classes | |
| class | TunableStruct |
| class | TunableStructArray |
| class | TunableProtobuf |
| interface | CustomTunable |
Public Member Functions | |
| abstract void | set (T value) |
| abstract T | get () |
| T | mutate () |
| void | accept (T value) |
| abstract Class< T > | getTypeClass () |
| Public Member Functions inherited from org.wpilib.tunable.TunableBase | |
| boolean | isRobust () |
| String | getProperties () |
| TunableConfig | getConfig () |
| boolean | hasChanged () |
| boolean | supportsChangeNotification () |
| void | resetChanged () |
Static Public Member Functions | |
| static< T > Tunable< T > | createNull (Class< T > cls) |
| static< T > Tunable< T > | createNullConfig (Class< T > cls, TunableConfig config) |
| static< T > Tunable< T > | create (T initialValue) |
| static< T > Tunable< T > | create (T initialValue, Struct< T > struct) |
| static< T > Tunable< T > | create (T initialValue, Protobuf< T, ?> proto) |
| static< T > Tunable< T > | create (Supplier< T > getter, Consumer< T > setter, Class< T > cls) |
| static< T > Tunable< T > | createConfig (T initialValue, TunableConfig config) |
| static< T > Tunable< T > | createConfig (T initialValue, Struct< T > struct, TunableConfig config) |
| static< T > Tunable< T > | createConfig (T initialValue, Protobuf< T, ?> proto, TunableConfig config) |
| static< T > Tunable< T > | createConfig (Supplier< T > getter, Consumer< T > setter, Class< T > cls, TunableConfig config) |
Protected Member Functions | |
| Tunable (TunableConfig config) | |
| Tunable (TunableConfig config, boolean supportsChangeNotification) | |
| Protected Member Functions inherited from org.wpilib.tunable.TunableBase | |
| TunableBase (TunableConfig config) | |
| TunableBase (TunableConfig config, boolean supportsChangeNotification) | |
| void | markChanged () |
Additional Inherited Members | |
| Protected Attributes inherited from org.wpilib.tunable.TunableBase | |
| boolean | m_changed |
|
protected |
|
protected |
Constructs a tunable.
| config | tunable config |
| supportsChangeNotification | whether the tunable notifies backends when it changes |
Definition at line 614 of file Tunable.java.
| void org.wpilib.tunable.Tunable< T >.accept | ( | T | value | ) |
Definition at line 653 of file Tunable.java.
|
static |
Creates a tunable object with the given getter and setter.
The getter and setter must not throw.
| <T> | data type |
| getter | getter for the tunable value |
| setter | setter for the tunable value |
| cls | class of the tunable type |
Definition at line 473 of file Tunable.java.
|
static |
Creates a tunable object with the given initial value.
| <T> | data type |
| initialValue | the initial value |
Definition at line 432 of file Tunable.java.
|
static |
Creates a tunable object with a specific Protobuf serializer.
| <T> | data type |
| initialValue | the initial value |
| proto | protobuf serializer |
Definition at line 457 of file Tunable.java.
|
static |
Creates a tunable object with a specific Struct serializer.
| <T> | data type |
| initialValue | the initial value |
| struct | struct serializer |
Definition at line 444 of file Tunable.java.
|
static |
Creates a tunable object with the given getter and setter and config.
The getter and setter must not throw.
| <T> | data type |
| getter | getter for the tunable value |
| setter | setter for the tunable value |
| cls | class of the tunable type |
| config | tunable config |
Definition at line 557 of file Tunable.java.
|
static |
Creates a tunable object with a specific Protobuf serializer.
| <T> | data type |
| initialValue | the initial value (may be null) |
| proto | protobuf serializer |
| config | tunable config |
Definition at line 540 of file Tunable.java.
|
static |
Creates a tunable object with a specific Struct serializer.
| <T> | data type |
| initialValue | the initial value (may be null) |
| struct | struct serializer |
| config | tunable config |
Definition at line 526 of file Tunable.java.
|
static |
Creates a tunable object with the given config and initial value.
| <T> | data type |
| initialValue | the initial value |
| config | tunable config |
Definition at line 485 of file Tunable.java.
|
static |
Creates a tunable object with a null initial value.
| <T> | data type |
| cls | class of the tunable type |
Definition at line 409 of file Tunable.java.
|
static |
Creates a tunable object with the given config and a null initial value.
| <T> | data type |
| cls | class of the tunable type |
| config | tunable config |
Definition at line 421 of file Tunable.java.
|
abstract |
Gets the value.
Implementations must not throw.
|
abstract |
Gets the class of the tunable type. This is used for determining which type handler to use.
| T org.wpilib.tunable.Tunable< T >.mutate | ( | ) |
Gets the value for in-place mutation and marks this tunable changed.
This is useful for mutable structured/protobuf values where modifying the object returned by get() would otherwise bypass set(Object) and not notify backends. For immutable values, prefer set(Object). For variable-length arrays, use set(Object) with a new array to change the length.
Definition at line 647 of file Tunable.java.
|
abstract |
Sets the value.
Implementations must not throw.
| value | value |