示例#1
0
 public static void setPort(int port) {
   if (_port == port) return;
   _port = port;
   try {
     NetworkTable.shutdown();
   } catch (IllegalStateException ex) {
   }
   NetworkTable.setPort(port);
   NetworkTable.initialize();
 }
示例#2
0
 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();
 }
示例#3
0
 public static void removeConnectionListener(IRemoteConnectionListener listener) {
   System.out.println("Removing connection listener");
   NetworkTable.getTable(TABLE_NAME).removeConnectionListener(listener);
 }
示例#4
0
 public static void addConnectionListener(
     IRemoteConnectionListener listener, boolean immediateNotify) {
   System.out.println("Adding connection listener");
   NetworkTable.getTable(TABLE_NAME).addConnectionListener(listener, immediateNotify);
 }
示例#5
0
 public static ITable getLiveWindow() {
   return NetworkTable.getTable(LIVE_WINDOW_NAME);
 }
示例#6
0
 public static ITable getPreferences() {
   return NetworkTable.getTable(PREFERENCES_NAME);
 }
示例#7
0
 public static ITable getTable() {
   return NetworkTable.getTable(TABLE_NAME);
 }
示例#8
0
 public static ITable getTable(String tableName) {
   return NetworkTable.getTable(tableName);
 }
示例#9
0
 static {
   NetworkTable.setClientMode();
 }