Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.wpi.first.wpilibj.smartdashboard
Class SmartDashboard

    java.lang.Object
      edu.wpi.first.wpilibj.smartdashboard.SmartDashboard

    public class SmartDashboard

extends Object

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

Author:
  Joe Grinstead

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 `getNumber` instead
`static double` | `getDouble(String key, double defaultValue)` Deprecated. Use `getNumber` instead.
`static int` | `getInt(String key)` Deprecated. Use `getNumber` instead
`static int` | `getInt(String key, int defaultValue)` Deprecated. Use `getNumber` instead
`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 `SmartDashboardNamedData` to 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`putNumber` instead
`static void` | `putInt(String key, int value)` Deprecated. Use `putNumber method` instead
`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

### SmartDashboard

    public SmartDashboard()

Method Detail

### putData

    public static void putData(String key,
                               Sendable data)

  Maps the specified key to the specified value in this table. The key can not be null. The value can be retrieved by calling the get method with a key that is equal to the original key.

  Parameters:
    `key` - the key
    `data` - the value
  Throws:
    `IllegalArgumentException` - if key is null

### putData

    public static void putData(NamedSendable value)

  Maps the specified key (where the key is the name of the `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.

  Parameters:
    `value` - the value
  Throws:
    `IllegalArgumentException` - if key is null

### putBoolean

    public static void putBoolean(String key,
                                  boolean value)

  Maps the specified key to the specified value in this table. The key can not be null. The value can be retrieved by calling the get method with a key that is equal to the original key.

  Parameters:
    `key` - the key
    `value` - the value
  Throws:
    `IllegalArgumentException` - if key is null

### getBoolean

    public static boolean getBoolean(String key)
                              throws TableKeyNotDefinedException

  Returns the value at the specified key.

  Parameters:
    `key` - the key
  Returns:
    the value
  Throws:
    `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`

### getBoolean

    public static boolean getBoolean(String key,
                                     boolean defaultValue)

  Returns the value at the specified key.

  Parameters:
    `key` - the key
    `defaultValue` - returned if the key doesn't exist
  Returns:
    the value
  Throws:
    `IllegalArgumentException` - if the value mapped to by the key is not a boolean
    `IllegalArgumentException` - if the key is null

### putNumber

    public static void putNumber(String key,
                                 double value)

  Maps the specified key to the specified value in this table. The key can not be null. The value can be retrieved by calling the get method with a key that is equal to the original key.

  Parameters:
    `key` - the key
    `value` - the value
  Throws:
    `IllegalArgumentException` - if key is null

### getNumber

    public static double getNumber(String key)
                            throws TableKeyNotDefinedException

  Returns the value at the specified key.

  Parameters:
    `key` - the key
  Returns:
    the value
  Throws:
    `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

### getNumber

    public static double getNumber(String key,
                                   double defaultValue)

  Returns the value at the specified key.

  Parameters:
    `key` - the key
    `defaultValue` - the value returned if the key is undefined
  Returns:
    the value
  Throws:
    `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

### putString

    public static void putString(String key,
                                 String value)

  Maps the specified key to the specified value in this table. Neither the key nor the value can be null. The value can be retrieved by calling the get method with a key that is equal to the original key.

  Parameters:
    `key` - the key
    `value` - the value
  Throws:
    `IllegalArgumentException` - if key or value is null

### getString

    public static String getString(String key)
                            throws TableKeyNotDefinedException

  Returns the value at the specified key.

  Parameters:
    `key` - the key
  Returns:
    the value
  Throws:
    `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`

### getString

    public static String getString(String key,
                                   String defaultValue)

  Returns the value at the specified key.

  Parameters:
    `key` - the key
    `defaultValue` - The value returned if the key is undefined
  Returns:
    the value
  Throws:
    `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

### putInt

    public static void putInt(String key,
                              int value)

  Deprecated. Use `putNumber method` instead

  Maps the specified key to the specified value in this table. The key can not be null. The value can be retrieved by calling the get method with a key that is equal to the original key.

  Parameters:
    `key` - the key
    `value` - the value
  Throws:
    `IllegalArgumentException` - if key is null

### getInt

    public static int getInt(String key)
                      throws TableKeyNotDefinedException

  Deprecated. Use `getNumber` instead

  Returns the value at the specified key.

  Parameters:
    `key` - the key
  Returns:
    the value
  Throws:
    `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

### getInt

    public static int getInt(String key,
                             int defaultValue)
                      throws TableKeyNotDefinedException

  Deprecated. Use `getNumber` instead

  Returns the value at the specified key.

  Parameters:
    `key` - the key
    `defaultValue` - the value returned if the key is undefined
  Returns:
    the value
  Throws:
    `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`

### putDouble

    public static void putDouble(String key,
                                 double value)

  Deprecated. Use`putNumber` instead

  Maps the specified key to the specified value in this table. The key can not be null. The value can be retrieved by calling the get method with a key that is equal to the original key.

  Parameters:
    `key` - the key
    `value` - the value
  Throws:
    `IllegalArgumentException` - if key is null

### getDouble

    public static double getDouble(String key)
                            throws TableKeyNotDefinedException

  Deprecated. Use `getNumber` instead

  Returns the value at the specified key.

  Parameters:
    `key` - the key
  Returns:
    the value
  Throws:
    `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`

### getDouble

    public static double getDouble(String key,
                                   double defaultValue)

  Deprecated. Use `getNumber` instead.

  Returns the value at the specified key.

  Parameters:
    `key` - the key
    `defaultValue` - the value returned if the key is undefined
  Returns:
    the value
  Throws:
    `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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

"
For updated information see the Java FRC site
"