RobotCore 1.0
WPILib port to raspberry Pi
Loading...
Searching...
No Matches
org.wpilib.tunable.TunableInt Class Referenceabstract
Inheritance diagram for org.wpilib.tunable.TunableInt:
org.wpilib.tunable.TunableBase

Public Member Functions

abstract void set (int value)
abstract int get ()
int getAsInt ()
void accept (int value)
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 TunableInt create ()
static TunableInt create (int initialValue)
static TunableInt create (IntSupplier getter, IntConsumer setter)
static TunableInt createConfig (TunableConfig config)
static TunableInt createConfig (int initialValue, TunableConfig config)
static TunableInt createConfig (IntSupplier getter, IntConsumer setter, TunableConfig config)

Protected Member Functions

 TunableInt (TunableConfig config)
 TunableInt (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

Detailed Description

A tunable integer.

Definition at line 11 of file TunableInt.java.

Constructor & Destructor Documentation

◆ TunableInt() [1/2]

org.wpilib.tunable.TunableInt.TunableInt ( TunableConfig config)
protected

Constructs a tunable integer.

Parameters
configtunable config

Definition at line 122 of file TunableInt.java.

◆ TunableInt() [2/2]

org.wpilib.tunable.TunableInt.TunableInt ( TunableConfig config,
boolean supportsChangeNotification )
protected

Constructs a tunable integer.

Parameters
configtunable config
supportsChangeNotificationwhether the tunable notifies backends when it changes

Definition at line 132 of file TunableInt.java.

Member Function Documentation

◆ accept()

void org.wpilib.tunable.TunableInt.accept ( int value)

Definition at line 160 of file TunableInt.java.

◆ create() [1/3]

TunableInt org.wpilib.tunable.TunableInt.create ( )
static

Creates a tunable integer with the initial value of 0.

Returns
a tunable integer

Definition at line 17 of file TunableInt.java.

◆ create() [2/3]

TunableInt org.wpilib.tunable.TunableInt.create ( int initialValue)
static

Creates a tunable integer with the given initial value.

Parameters
initialValueinitial value
Returns
a tunable integer

Definition at line 27 of file TunableInt.java.

◆ create() [3/3]

TunableInt org.wpilib.tunable.TunableInt.create ( IntSupplier getter,
IntConsumer setter )
static

Creates a tunable integer with the given getter and setter.

The getter and setter must not throw.

Parameters
gettergetter for the tunable value
settersetter for the tunable value
Returns
a tunable integer

Definition at line 40 of file TunableInt.java.

◆ createConfig() [1/3]

TunableInt org.wpilib.tunable.TunableInt.createConfig ( int initialValue,
TunableConfig config )
static

Creates a tunable integer with the given initial value and config.

Parameters
initialValueinitial value
configtunable config
Returns
a tunable integer

Definition at line 61 of file TunableInt.java.

◆ createConfig() [2/3]

TunableInt org.wpilib.tunable.TunableInt.createConfig ( IntSupplier getter,
IntConsumer setter,
TunableConfig config )
static

Creates a tunable integer with the given getter, setter, and config.

The getter and setter must not throw.

Parameters
gettergetter for the tunable value
settersetter for the tunable value
configtunable config
Returns
a tunable integer

Definition at line 91 of file TunableInt.java.

◆ createConfig() [3/3]

TunableInt org.wpilib.tunable.TunableInt.createConfig ( TunableConfig config)
static

Creates a tunable integer with the given config and an initial value of 0.

Parameters
configtunable config
Returns
a tunable integer

Definition at line 50 of file TunableInt.java.

◆ get()

abstract int org.wpilib.tunable.TunableInt.get ( )
abstract

Gets the value.

Implementations must not throw.

Returns
value

◆ getAsInt()

int org.wpilib.tunable.TunableInt.getAsInt ( )

Definition at line 155 of file TunableInt.java.

◆ set()

abstract void org.wpilib.tunable.TunableInt.set ( int value)
abstract

Sets the value.

Implementations must not throw.

Parameters
valuevalue

The documentation for this class was generated from the following file: