Exemplo n.º 1
0
 public static void registerTypes(NetworkTableEntryTypeManager ntetm)
 {
   ntetm.registerType(DefaultEntryTypes.__\u003C\u003EBOOLEAN);
   ntetm.registerType(DefaultEntryTypes.__\u003C\u003EDOUBLE);
   ntetm.registerType(DefaultEntryTypes.__\u003C\u003ESTRING);
   ntetm.registerType((NetworkTableEntryType) BooleanArray.__\u003C\u003ETYPE);
   ntetm.registerType((NetworkTableEntryType) NumberArray.__\u003C\u003ETYPE);
   ntetm.registerType((NetworkTableEntryType) StringArray.__\u003C\u003ETYPE);
 }
 public ServerConnectionAdapter(IOStream ios, ServerNetworkTableEntryStore sntes, IncomingEntryReceiver ier, ServerAdapterManager sam, NetworkTableEntryTypeManager ntetm, NTThreadManager nttm)
 {
   base.\u002Ector();
   ServerConnectionAdapter connectionAdapter = this;
   this.__\u003C\u003Econnection = new NetworkTableConnection(ios, ntetm);
   this.entryStore = sntes;
   this.transactionReceiver = ier;
   this.adapterListener = sam;
   this.gotoState(ServerConnectionState.__\u003C\u003EGOT_CONNECTION_FROM_CLIENT);
   this.readThread = nttm.newBlockingPeriodicThread((PeriodicRunnable) new ConnectionMonitorThread((ConnectionAdapter) this, this.__\u003C\u003Econnection), "Server Connection Reader Thread");
 }
 public ServerIncomingStreamMonitor(IOStreamProvider iosp, ServerNetworkTableEntryStore sntes, ServerIncomingConnectionListener sicl, ServerAdapterManager sam, NetworkTableEntryTypeManager ntetm, NTThreadManager nttm)
 {
   base.\u002Ector();
   ServerIncomingStreamMonitor incomingStreamMonitor = this;
   this.streamProvider = iosp;
   this.entryStore = sntes;
   this.incomingListener = sicl;
   this.adapterListener = sam;
   this.typeManager = ntetm;
   this.threadManager = nttm;
 }
 public NetworkTableClient(IOStreamFactory iosf, NetworkTableEntryTypeManager ntetm, NTThreadManager nttm)
 {
   NetworkTableClient networkTableClient = this;
   ClientNetworkTableEntryStore cntes;
   this.init((AbstractNetworkTableEntryStore) (cntes = new ClientNetworkTableEntryStore((AbstractNetworkTableEntryStore.TableListenerManager) this)));
   this.adapter = new ClientConnectionAdapter(cntes, nttm, iosf, (ClientConnectionListenerManager) this, ntetm);
   this.writeManager = new WriteManager((FlushableOutgoingEntryReceiver) this.adapter, nttm, this.getEntryStore(), 1000L);
   this.getEntryStore().setOutgoingReceiver((OutgoingEntryReceiver) new TransactionDirtier((OutgoingEntryReceiver) this.writeManager));
   this.getEntryStore().setIncomingReceiver(OutgoingEntryReceiver.NULL);
   this.writeManager.start();
 }
 public NetworkTableConnection(IOStream ios, NetworkTableEntryTypeManager ntetm)
 {
   base.\u002Ector();
   NetworkTableConnection networkTableConnection = this;
   this.WRITE_LOCK = (object) new Object();
   this.__\u003C\u003Estream = ios;
   this.typeManager = ntetm;
   BufferedInputStream.__\u003Cclinit\u003E();
   this.@is = new DataInputStream((InputStream) new BufferedInputStream(ios.getInputStream()));
   this.os = new DataOutputStream((OutputStream) new BufferedOutputStream(ios.getOutputStream()));
   this.isValid = true;
 }
 public ClientConnectionAdapter(ClientNetworkTableEntryStore cntes, NTThreadManager nttm, IOStreamFactory iosf, ClientConnectionListenerManager cclm, NetworkTableEntryTypeManager ntetm)
 {
   base.\u002Ector();
   ClientConnectionAdapter connectionAdapter = this;
   this.connectionState = ClientConnectionState.__\u003C\u003EDISCONNECTED_FROM_SERVER;
   this.connectionLock = (object) new Object();
   this.entryStore = cntes;
   this.streamFactory = iosf;
   this.threadManager = nttm;
   this.connectionListenerManager = cclm;
   this.typeManager = ntetm;
 }
 public NetworkTableServer(IOStreamProvider iosp, NetworkTableEntryTypeManager ntetm, NTThreadManager nttm)
 {
   NetworkTableServer networkTableServer = this;
   ServerNetworkTableEntryStore sntes;
   this.init((AbstractNetworkTableEntryStore) (sntes = new ServerNetworkTableEntryStore((AbstractNetworkTableEntryStore.TableListenerManager) this)));
   this.streamProvider = iosp;
   this.connectionList = new ServerConnectionList();
   this.writeManager = new WriteManager((FlushableOutgoingEntryReceiver) this.connectionList, nttm, this.getEntryStore(), long.MaxValue);
   this.incomingStreamMonitor = new ServerIncomingStreamMonitor(iosp, sntes, (ServerIncomingConnectionListener) this, (ServerAdapterManager) this.connectionList, ntetm, nttm);
   this.getEntryStore().setIncomingReceiver((OutgoingEntryReceiver) new TransactionDirtier((OutgoingEntryReceiver) this.writeManager));
   this.getEntryStore().setOutgoingReceiver((OutgoingEntryReceiver) new TransactionDirtier((OutgoingEntryReceiver) this.writeManager));
   this.incomingStreamMonitor.start();
   this.writeManager.start();
 }