| 
 | |||||||||
| 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(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 double | getDouble(java.lang.String key)Deprecated. Use getNumberinstead | 
| static double | getDouble(java.lang.String key,
                   double defaultValue)Deprecated. Use getNumberinstead. | 
| static int | getInt(java.lang.String key)Deprecated. Use getNumberinstead | 
| static int | getInt(java.lang.String key,
             int defaultValue)Deprecated. Use getNumberinstead | 
| static double | getNumber(java.lang.String key)Returns the value at the specified key. | 
| static double | getNumber(java.lang.String key,
                   double 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 | putBoolean(java.lang.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(java.lang.String key,
               Sendable data)Maps the specified key to the specified value in this table. | 
| static void | putDouble(java.lang.String key,
                   double value)Deprecated. Use putNumberinstead | 
| static void | putInt(java.lang.String key,
             int value)Deprecated. Use putNumber methodinstead | 
| static void | putNumber(java.lang.String key,
                   double 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. | 
| 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,
                           Sendable data)
key - the keydata - the value
java.lang.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
java.lang.IllegalArgumentException - if key is null
public static void putBoolean(java.lang.String key,
                              boolean value)
key - the keyvalue - the value
java.lang.IllegalArgumentException - if key is null
public static boolean getBoolean(java.lang.String key)
                          throws TableKeyNotDefinedException
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 null
TableKeyNotDefinedException
public 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 null
public static void putNumber(java.lang.String key,
                             double value)
key - the keyvalue - the value
java.lang.IllegalArgumentException - if key is null
public static double getNumber(java.lang.String key)
                        throws TableKeyNotDefinedException
key - the key
TableKeyNotDefinedException - 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
public static double getNumber(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 null
public static void putString(java.lang.String key,
                             java.lang.String value)
key - the keyvalue - the value
java.lang.IllegalArgumentException - if key or value is null
public static java.lang.String getString(java.lang.String key)
                                  throws TableKeyNotDefinedException
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 null
TableKeyNotDefinedException
public 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 null
public static void putInt(java.lang.String key,
                          int value)
putNumber method instead
key - the keyvalue - the value
java.lang.IllegalArgumentException - if key is null
public static int getInt(java.lang.String key)
                  throws TableKeyNotDefinedException
getNumber instead
key - the key
TableKeyNotDefinedException - 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 null
public static int getInt(java.lang.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
java.lang.IllegalArgumentException - if the value mapped to by the key is not an int
java.lang.IllegalArgumentException - if the key is null
TableKeyNotDefinedException
public static void putDouble(java.lang.String key,
                             double value)
putNumber instead
key - the keyvalue - the value
java.lang.IllegalArgumentException - if key is null
public static double getDouble(java.lang.String key)
                        throws TableKeyNotDefinedException
getNumber instead
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
TableKeyNotDefinedException
public static double getDouble(java.lang.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
java.lang.IllegalArgumentException - if the value mapped to by the key is not a double
java.lang.IllegalArgumentException - if the key is null| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||