| 
 | " 2013 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 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 double | getDouble(String key)Deprecated. Use getNumberinstead | 
| static double | getDouble(String key,
          double defaultValue)Deprecated. Use getNumberinstead. | 
| static int | getInt(String key)Deprecated. Use getNumberinstead | 
| static int | getInt(String key,
       int defaultValue)Deprecated. Use getNumberinstead | 
| static double | getNumber(String key)Returns the value at the specified key. | 
| static double | getNumber(String key,
          double 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 | putBoolean(String key,
           boolean value)Maps the specified key to the specified value in this table. | 
| static void | putData(NamedSendable value)Maps the specified key (where the key is the name of the SmartDashboardNamedDatato the specified value in this table. | 
| static void | putData(String key,
        Sendable data)Maps the specified key to the specified value in this table. | 
| static void | putDouble(String key,
          double value)Deprecated. Use putNumberinstead | 
| static void | putInt(String key,
       int value)Deprecated. Use putNumber methodinstead | 
| static void | putNumber(String key,
          double 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. | 
| 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,
                           Sendable data)
key - the keydata - the value
IllegalArgumentException - if key is nullpublic static void putData(NamedSendable 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 void putBoolean(String key,
                              boolean value)
key - the keyvalue - the value
IllegalArgumentException - if key is null
public static boolean getBoolean(String key)
                          throws TableKeyNotDefinedException
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
TableKeyNotDefinedException
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 putNumber(String key,
                             double value)
key - the keyvalue - the value
IllegalArgumentException - if key is null
public static double getNumber(String key)
                        throws TableKeyNotDefinedException
key - the key
TableKeyNotDefinedException - 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 double getNumber(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 TableKeyNotDefinedException
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
TableKeyNotDefinedException
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 null
public static void putInt(String key,
                          int value)
putNumber method instead
key - the keyvalue - the value
IllegalArgumentException - if key is null
public static int getInt(String key)
                  throws TableKeyNotDefinedException
getNumber instead
key - the key
TableKeyNotDefinedException - 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)
                  throws TableKeyNotDefinedException
getNumber instead
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
TableKeyNotDefinedException
public static void putDouble(String key,
                             double value)
putNumber instead
key - the keyvalue - the value
IllegalArgumentException - if key is null
public static double getDouble(String key)
                        throws TableKeyNotDefinedException
getNumber instead
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
TableKeyNotDefinedException
public static double getDouble(String key,
                               double defaultValue)
getNumber instead.
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| 
 | " 2013 FRC Java API" | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||