Files

26 lines
1.9 KiB
Markdown
Raw Permalink Normal View History

2019-02-19 20:32:18 -07:00
# RoboPipe
2020-03-30 18:25:18 -06:00
Author: HFocus (Keenan D. Buckley)
2019-02-19 20:39:12 -07:00
RoboPipe is a java-based script that allows the user to pull SmartDashboard values into other custom software. The API uses [.NET sockets](https://docs.microsoft.com/en-us/dotnet/standard/get-started) and connects to the SmartDashboard using the [Network Tables Libraries](https://wpilib.screenstepslive.com/s/currentCS/m/75361/l/851714-creating-a-client-side-program). RoboPipe will take a startup request and will send the requester a stream of the requested values.
2019-02-19 20:32:18 -07:00
2019-02-19 20:38:22 -07:00
For information on installing RoboPipe, see Installation. For information on creating a program to interact with RoboPipe, see Setup.
2019-02-19 20:32:18 -07:00
## Installation
2019-02-19 21:31:19 -07:00
To install Robopipe, start by downloading the latest jar from the [Releases](https://github.com/Team4388/WPILib-Network-Tables-RoboPipe/releases) page. Put it into its own folder so that the batch file it creates won't clutter up your files. Then, finish by either running RoboPipe.jar (opens socket on default port), or use the command line to open it with a specific port.
2019-02-19 20:32:18 -07:00
``` CMD
cd (Directory of RoboPipe)
java -jar RoboPipe.jar (Port Number)
```
## Setup
Connecting to RoboPipe is as follows:
- When RoboPipe starts, it attempts to connect to a server socket on the given port (default 4388).
- RoboPipe communicates using [UTF-8 encoded](https://www.fileformat.info/info/unicode/utf8.htm) strings, so to communicate you will need to convert your messages into a string and then encode it into a UTF-8 byte array.
- Once connected, send RoboPipe a comma separated string with the exact notation of the values you want to grab from SmartDashboard (**a,b,c**).
Then RoboPipe will enter into a loop that does the following:
2019-02-19 21:31:19 -07:00
- Sends a comma separated response in the form of (**a,b,c**).
- The user then sends back the 4 byte string "CONT" to get another value
2019-02-19 20:32:18 -07:00
When you want to close RoboPipe you can do so automatically by sending it "EXIT"