コード例 #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();
 }