|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.wpi.first.wpilibj.smartdashboard.SmartDashboard
public class SmartDashboard
The SmartDashboard
class is the bridge between robot programs and the SmartDashboard on the
laptop.
When a value is put into the SmartDashboard here, it pops up on the SmartDashboard on the laptop. Users can put values into and get values from the SmartDashboard
Constructor Summary | |
---|---|
SmartDashboard()
|
Method Summary | |
---|---|
static java.lang.String |
diagnoseErrorCode(int code)
Deprecated. |
static boolean |
getBoolean(java.lang.String key)
Returns the value at the specified key. |
static boolean |
getBoolean(java.lang.String key,
boolean defaultValue)
Returns the value at the specified key. |
static SmartDashboardData |
getData(java.lang.String key)
Returns the value at the specified key. |
static double |
getDouble(java.lang.String key)
Returns the value at the specified key. |
static double |
getDouble(java.lang.String key,
double defaultValue)
Returns the value at the specified key. |
static int |
getInt(java.lang.String key)
Returns the value at the specified key. |
static int |
getInt(java.lang.String key,
int defaultValue)
Returns the value at the specified key. |
static java.lang.String |
getString(java.lang.String key)
Returns the value at the specified key. |
static java.lang.String |
getString(java.lang.String key,
java.lang.String defaultValue)
Returns the value at the specified key. |
static void |
init()
Deprecated. no longer necessary |
static int |
log(boolean value,
java.lang.String name)
Deprecated. use putInt(java.lang.String, int) instead |
static int |
log(byte value,
java.lang.String name)
Deprecated. use putInt(java.lang.String, int) |
static int |
log(char value,
java.lang.String name)
Deprecated. use putInt(java.lang.String, int) |
static int |
log(double value,
java.lang.String name)
Deprecated. use putDouble(java.lang.String, double) |
static int |
log(float value,
java.lang.String name)
Deprecated. use putDouble(java.lang.String, double) |
static int |
log(int value,
java.lang.String name)
Deprecated. use putInt(java.lang.String, int) |
static int |
log(long value,
java.lang.String name)
Deprecated. use putInt(java.lang.String, int) |
static int |
log(short value,
java.lang.String name)
Deprecated. use putInt(java.lang.String, int) |
static int |
log(java.lang.String value,
java.lang.String name)
Deprecated. use putString(java.lang.String, java.lang.String) |
static void |
putBoolean(java.lang.String key,
boolean value)
Maps the specified key to the specified value in this table. |
static void |
putData(SmartDashboardNamedData value)
Maps the specified key (where the key is the name of the SmartDashboardNamedData
to the specified value in this table. |
static void |
putData(java.lang.String key,
SmartDashboardData value)
Maps the specified key to the specified value in this table. |
static void |
putDouble(java.lang.String key,
double value)
Maps the specified key to the specified value in this table. |
static void |
putInt(java.lang.String key,
int value)
Maps the specified key to the specified value in this table. |
static void |
putString(java.lang.String key,
java.lang.String value)
Maps the specified key to the specified value in this table. |
static void |
useBlockingIO(boolean value)
Deprecated. |
static int |
useProfile(java.lang.String name)
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SmartDashboard()
Method Detail |
---|
public static void putData(java.lang.String key, SmartDashboardData value)
key
- the keyvalue
- the value
java.lang.IllegalArgumentException
- if key is nullpublic static void putData(SmartDashboardNamedData value)
SmartDashboardNamedData
to the specified value in this table.
The value can be retrieved by calling the get method with a key that is equal to the original key.
value
- the value
java.lang.IllegalArgumentException
- if key is nullpublic static SmartDashboardData getData(java.lang.String key) throws NetworkTableKeyNotDefined
key
- the key
NetworkTableKeyNotDefined
- if there is no value mapped to by the key
java.lang.IllegalArgumentException
- if the value mapped to by the key is not a SmartDashboardData
java.lang.IllegalArgumentException
- if the key is nullpublic static void putBoolean(java.lang.String key, boolean value)
key
- the keyvalue
- the value
java.lang.IllegalArgumentException
- if key is nullpublic static boolean getBoolean(java.lang.String key) throws NetworkTableKeyNotDefined
key
- the key
NetworkTableKeyNotDefined
- if there is no value mapped to by the key
java.lang.IllegalArgumentException
- if the value mapped to by the key is not a boolean
java.lang.IllegalArgumentException
- if the key is nullpublic static boolean getBoolean(java.lang.String key, boolean defaultValue)
key
- the keydefaultValue
- returned if the key doesn't exist
java.lang.IllegalArgumentException
- if the value mapped to by the key is not a boolean
java.lang.IllegalArgumentException
- if the key is nullpublic static void putInt(java.lang.String key, int value)
key
- the keyvalue
- the value
java.lang.IllegalArgumentException
- if key is nullpublic static int getInt(java.lang.String key) throws NetworkTableKeyNotDefined
key
- the key
NetworkTableKeyNotDefined
- if there is no value mapped to by the key
java.lang.IllegalArgumentException
- if the value mapped to by the key is not an int
java.lang.IllegalArgumentException
- if the key is nullpublic static int getInt(java.lang.String key, int defaultValue)
key
- the keydefaultValue
- the value returned if the key is undefined
NetworkTableKeyNotDefined
- if there is no value mapped to by the key
java.lang.IllegalArgumentException
- if the value mapped to by the key is not an int
java.lang.IllegalArgumentException
- if the key is nullpublic static void putDouble(java.lang.String key, double value)
key
- the keyvalue
- the value
java.lang.IllegalArgumentException
- if key is nullpublic static double getDouble(java.lang.String key) throws NetworkTableKeyNotDefined
key
- the key
NoSuchEleNetworkTableKeyNotDefinedmentException
- if there is no value mapped to by the key
java.lang.IllegalArgumentException
- if the value mapped to by the key is not a double
java.lang.IllegalArgumentException
- if the key is null
NetworkTableKeyNotDefined
public static double getDouble(java.lang.String key, double defaultValue)
key
- the keydefaultValue
- the value returned if the key is undefined
NoSuchEleNetworkTableKeyNotDefinedmentException
- if there is no value mapped to by the key
java.lang.IllegalArgumentException
- if the value mapped to by the key is not a double
java.lang.IllegalArgumentException
- if the key is nullpublic static void putString(java.lang.String key, java.lang.String value)
key
- the keyvalue
- the value
java.lang.IllegalArgumentException
- if key or value is nullpublic static java.lang.String getString(java.lang.String key) throws NetworkTableKeyNotDefined
key
- the key
NetworkTableKeyNotDefined
- if there is no value mapped to by the key
java.lang.IllegalArgumentException
- if the value mapped to by the key is not a string
java.lang.IllegalArgumentException
- if the key is nullpublic static java.lang.String getString(java.lang.String key, java.lang.String defaultValue)
key
- the keydefaultValue
- The value returned if the key is undefined
NetworkTableKeyNotDefined
- if there is no value mapped to by the key
java.lang.IllegalArgumentException
- if the value mapped to by the key is not a string
java.lang.IllegalArgumentException
- if the key is nullpublic static void init()
public static int log(byte value, java.lang.String name)
putInt(java.lang.String, int)
value
- The value to be displayed on the client.name
- The name of the field.
public static int log(char value, java.lang.String name)
putInt(java.lang.String, int)
value
- The value to be displayed on the client.name
- The name of the field.
public static int log(int value, java.lang.String name)
putInt(java.lang.String, int)
value
- The value to send.name
- The name of the field.
public static int log(long value, java.lang.String name)
putInt(java.lang.String, int)
value
- The value to send.name
- The name of the field.
public static int log(short value, java.lang.String name)
putInt(java.lang.String, int)
value
- The value to send.name
- The name of the field.
public static int log(float value, java.lang.String name)
putDouble(java.lang.String, double)
value
- The value to send.name
- The name of the field.
public static int log(double value, java.lang.String name)
putDouble(java.lang.String, double)
value
- The value to send.name
- The name of the field.
public static int log(java.lang.String value, java.lang.String name)
putString(java.lang.String, java.lang.String)
value
- The value to send. This may be at most 63 characters in length.name
- The name of the field.
public static int log(boolean value, java.lang.String name)
putInt(java.lang.String, int)
instead
value
- The value to send.name
- The name of the field.
public static int useProfile(java.lang.String name)
public static java.lang.String diagnoseErrorCode(int code)
public static void useBlockingIO(boolean value)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |