Class Param<T>
java.lang.Object
frc.spectrumLib.params.Param<T>
- Type Parameters:
T- the value type
- Direct Known Subclasses:
BooleanParam, DoubleParam, IntParam, StringParam
public abstract sealed class Param<T>
extends Object
permits DoubleParam, IntParam, BooleanParam, StringParam
One tunable value, declared in code with a name, type, default, units and optional bounds, and
resolved from the layers described in
Params. Declare params through a ParamGroup. Read and change them on the main thread only.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe value types a params file and the transport can carry. -
Method Summary
Modifier and TypeMethodDescriptionget()The current value.The default in the declaration.group()key()doublemax()Upper bound, or NaN when the type has none.doublemin()Lower bound, or NaN when the type has none.path()group/key, the name used in logs, NT and messages.source()Which layer the current value came from.abstract Param.Typetype()units()intversion()Goes up by one each time the value changes, for code that must act on a change (re-sending a setting to a device, say): keep the last version seen and compare.
-
Method Details
-
get
The current value. -
getDefault
The default in the declaration. -
group
-
key
-
path
group/key, the name used in logs, NT and messages. -
units
-
source
Which layer the current value came from. -
version
public int version()Goes up by one each time the value changes, for code that must act on a change (re-sending a setting to a device, say): keep the last version seen and compare. -
type
-
min
public double min()Lower bound, or NaN when the type has none. -
max
public double max()Upper bound, or NaN when the type has none.
-