Log in

View Full Version : How to communicate with the network table from the Dashboard


ZachTheSloth
18-01-2014, 11:48
Curious how you communicate with the network table form the dashboard.

fsilberberg
18-01-2014, 11:54
The WPILib documentation has a bunch of information on how to use the SmartDashboard, you can find it here:
http://wpilib.screenstepslive.com/s/3120/m/7932.

In a nutshell, any call to one of the SmartDashboard methods will put information in or retrieve information from NetworkTables. The SmartDashboard.put/get methods wrap this for you, so you don't have to manually search for a NetworkTables key and find the value on your own. If you have any more questions, feel free to ask.

ZachTheSloth
18-01-2014, 12:17
Thanks, but I'm trying to communicate from the smartdashboard extension, so SmartDashbord.get won't work.

Arhowk
18-01-2014, 18:20
Thanks, but I'm trying to communicate from the smartdashboard extension, so SmartDashbord.get won't work.

include the NetworkTables desktop .jar and use that.

byteit101
19-01-2014, 15:00
You seem to be withholding information so I'll have to guess what you mean. You mention extensions, so if you are writing a plugin, you call observable.setData(someDataSpecifierObject) where observable is gotten from the DataCore via getObservable("some/path") inside the registered() method.
However, I somehow doubt that is what you meant and instead are wondering about the UI. In that case, simply use a UI element that supports sending like the sliders or number box, then when running drag/edit them and the value is sent back.
If I guessed incorrectly and you mean something else please clarify what you are trying to do