mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
Add FRC Driver Station connection support.
The 2017 FRC Driver Station supports getting the robot IP via a TCP connection that returns JSON. Use this to support overriding the server IP address used for client connections. Default to using this approach for client connections in the NetworkTable interfaces. Add support for setting the server address without stopping and restarting the client. SetTeam now also round-robins by default.
This commit is contained in:
@@ -29,6 +29,7 @@ class NetworkTable : public ITable {
|
||||
static std::vector<std::string> s_ip_addresses;
|
||||
static std::string s_persistent_filename;
|
||||
static bool s_client;
|
||||
static bool s_enable_ds;
|
||||
static bool s_running;
|
||||
static unsigned int s_port;
|
||||
|
||||
@@ -86,6 +87,12 @@ class NetworkTable : public ITable {
|
||||
*/
|
||||
static void SetPort(unsigned int port);
|
||||
|
||||
/**
|
||||
* @param enabled whether to enable the connection to the local DS to get
|
||||
* the robot IP address (defaults to enabled)
|
||||
*/
|
||||
static void SetDSClientEnabled(bool enabled);
|
||||
|
||||
/**
|
||||
* Sets the persistent filename.
|
||||
* @param filename the filename that the network tables server uses for
|
||||
|
||||
Reference in New Issue
Block a user