Interface SmartDashboardData

All Known Subinterfaces:
All Known Implementing Classes:
AnalogIOButton, Button, Command, CommandGroup, DigitalIOButton, InternalButton, JoystickButton, NetworkButton, PIDCommand, PIDSubsystem, PrintCommand, Scheduler, SendableChooser, SendableGyro, SendablePIDController, StartCommand, Subsystem, WaitCommand, WaitForChildren, WaitUntilCommand

public interface SmartDashboardData

Anything that implements the SmartDashboardData interface can be sent to the SmartDashboard using putData(...).

Examples include SendablePIDController, SendableGyro and SendableChooser.

SmartDashboardData works by having an internal NetworkTable that it should both keep up-to-date and respond to. Also, SmartDashboardData requires a string to identify what type it is (ie. "Gyro", "PIDController", "Command", "Subsystem", etc...)

Users can define their own SmartDashboardData, but they will have to also make an extension to the SmartDashboard which can handle their new type

Joe Grinstead
See Also:

Method Summary
 NetworkTable getTable()
          Returns the NetworkTable associated with the data.
 java.lang.String getType()
          Returns the type of the data.

Method Detail


java.lang.String getType()
Returns the type of the data. This is used by the SmartDashboard on the desktop to determine what to do with the table returned by getTable().

For instance, if the type was "Button", then the SmartDashboard would show the data as a button on the desktop and would know to look at and modify the "pressed" field in the NetworkTable returned by getTable().

the type of the data


NetworkTable getTable()
Returns the NetworkTable associated with the data. The table should contain all the information the desktop version of SmartDashboard needs to interact with the object. The data should both keep the table up-to-date and also react to changes that the SmartDashboard might make.

For instance, the SendablePIDController will put its p, i and d values into its table and will change them if the table receives new values.

This method should return the same table between calls

the table that represents this data