public static void setPort(int port) { if (_port == port) return; _port = port; try { NetworkTable.shutdown(); } catch (IllegalStateException ex) { } NetworkTable.setPort(port); NetworkTable.initialize(); }
public static void setHost(String host) { if (host != "") { // Use the given host } else if (_usemDNS) { host = "roboRIO-" + _team + "-frc.local"; } else { host = "10." + (_team / 100) + "." + (_team % 100) + ".2"; } if (_host.equals(host)) return; _host = host; System.out.println("Host: " + host); try { NetworkTable.shutdown(); } catch (IllegalStateException ex) { } NetworkTable.setIPAddress(host); NetworkTable.setNetworkIdentity(identity); NetworkTable.initialize(); }
public static void removeConnectionListener(IRemoteConnectionListener listener) { System.out.println("Removing connection listener"); NetworkTable.getTable(TABLE_NAME).removeConnectionListener(listener); }
public static void addConnectionListener( IRemoteConnectionListener listener, boolean immediateNotify) { System.out.println("Adding connection listener"); NetworkTable.getTable(TABLE_NAME).addConnectionListener(listener, immediateNotify); }
public static ITable getLiveWindow() { return NetworkTable.getTable(LIVE_WINDOW_NAME); }
public static ITable getPreferences() { return NetworkTable.getTable(PREFERENCES_NAME); }
public static ITable getTable() { return NetworkTable.getTable(TABLE_NAME); }
public static ITable getTable(String tableName) { return NetworkTable.getTable(tableName); }
static { NetworkTable.setClientMode(); }