|
2012 FRC Java API |
|||||||||
| 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 String |
diagnoseErrorCode(int code)
Deprecated. |
static boolean |
getBoolean(String key)
Returns the value at the specified key. |
static boolean |
getBoolean(String key,
boolean defaultValue)
Returns the value at the specified key. |
static SmartDashboardData |
getData(String key)
Returns the value at the specified key. |
static double |
getDouble(String key)
Returns the value at the specified key. |
static double |
getDouble(String key,
double defaultValue)
Returns the value at the specified key. |
static int |
getInt(String key)
Returns the value at the specified key. |
static int |
getInt(String key,
int defaultValue)
Returns the value at the specified key. |
static String |
getString(String key)
Returns the value at the specified key. |
static String |
getString(String key,
String defaultValue)
Returns the value at the specified key. |
static void |
init()
Deprecated. no longer necessary |
static int |
log(boolean value,
String name)
Deprecated. use putInt(java.lang.String, int) instead |
static int |
log(byte value,
String name)
Deprecated. use putInt(java.lang.String, int) |
static int |
log(char value,
String name)
Deprecated. use putInt(java.lang.String, int) |
static int |
log(double value,
String name)
Deprecated. use putDouble(java.lang.String, double) |
static int |
log(float value,
String name)
Deprecated. use putDouble(java.lang.String, double) |
static int |
log(int value,
String name)
Deprecated. use putInt(java.lang.String, int) |
static int |
log(long value,
String name)
Deprecated. use putInt(java.lang.String, int) |
static int |
log(short value,
String name)
Deprecated. use putInt(java.lang.String, int) |
static int |
log(String value,
String name)
Deprecated. use putString(java.lang.String, java.lang.String) |
static void |
putBoolean(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(String key,
SmartDashboardData value)
Maps the specified key to the specified value in this table. |
static void |
putDouble(String key,
double value)
Maps the specified key to the specified value in this table. |
static void |
putInt(String key,
int value)
Maps the specified key to the specified value in this table. |
static void |
putString(String key,
String value)
Maps the specified key to the specified value in this table. |
static void |
useBlockingIO(boolean value)
Deprecated. |
static int |
useProfile(String name)
Deprecated. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SmartDashboard()
| Method Detail |
|---|
public static void putData(String key,
SmartDashboardData value)
key - the keyvalue - the value
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
IllegalArgumentException - if key is null
public static SmartDashboardData getData(String key)
throws NetworkTableKeyNotDefined
key - the key
NetworkTableKeyNotDefined - if there is no value mapped to by the key
IllegalArgumentException - if the value mapped to by the key is not a SmartDashboardData
IllegalArgumentException - if the key is null
public static void putBoolean(String key,
boolean value)
key - the keyvalue - the value
IllegalArgumentException - if key is null
public static boolean getBoolean(String key)
throws NetworkTableKeyNotDefined
key - the key
NetworkTableKeyNotDefined - if there is no value mapped to by the key
IllegalArgumentException - if the value mapped to by the key is not a boolean
IllegalArgumentException - if the key is null
public static boolean getBoolean(String key,
boolean defaultValue)
key - the keydefaultValue - returned if the key doesn't exist
IllegalArgumentException - if the value mapped to by the key is not a boolean
IllegalArgumentException - if the key is null
public static void putInt(String key,
int value)
key - the keyvalue - the value
IllegalArgumentException - if key is null
public static int getInt(String key)
throws NetworkTableKeyNotDefined
key - the key
NetworkTableKeyNotDefined - if there is no value mapped to by the key
IllegalArgumentException - if the value mapped to by the key is not an int
IllegalArgumentException - if the key is null
public static int getInt(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
IllegalArgumentException - if the value mapped to by the key is not an int
IllegalArgumentException - if the key is null
public static void putDouble(String key,
double value)
key - the keyvalue - the value
IllegalArgumentException - if key is null
public static double getDouble(String key)
throws NetworkTableKeyNotDefined
key - the key
NoSuchEleNetworkTableKeyNotDefinedmentException - if there is no value mapped to by the key
IllegalArgumentException - if the value mapped to by the key is not a double
IllegalArgumentException - if the key is null
NetworkTableKeyNotDefined
public static double getDouble(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
IllegalArgumentException - if the value mapped to by the key is not a double
IllegalArgumentException - if the key is null
public static void putString(String key,
String value)
key - the keyvalue - the value
IllegalArgumentException - if key or value is null
public static String getString(String key)
throws NetworkTableKeyNotDefined
key - the key
NetworkTableKeyNotDefined - if there is no value mapped to by the key
IllegalArgumentException - if the value mapped to by the key is not a string
IllegalArgumentException - if the key is null
public static String getString(String key,
String defaultValue)
key - the keydefaultValue - The value returned if the key is undefined
NetworkTableKeyNotDefined - if there is no value mapped to by the key
IllegalArgumentException - if the value mapped to by the key is not a string
IllegalArgumentException - if the key is nullpublic static void init()
public static int log(byte value,
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,
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,
String name)
putInt(java.lang.String, int)
value - The value to send.name - The name of the field.
public static int log(long value,
String name)
putInt(java.lang.String, int)
value - The value to send.name - The name of the field.
public static int log(short value,
String name)
putInt(java.lang.String, int)
value - The value to send.name - The name of the field.
public static int log(float value,
String name)
putDouble(java.lang.String, double)
value - The value to send.name - The name of the field.
public static int log(double value,
String name)
putDouble(java.lang.String, double)
value - The value to send.name - The name of the field.
public static int log(String value,
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,
String name)
putInt(java.lang.String, int) instead
value - The value to send.name - The name of the field.
public static int useProfile(String name)
public static String diagnoseErrorCode(int code)
public static void useBlockingIO(boolean value)
|
2012 FRC Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||