View Full Version : NetworkTables on PC
Joe Ross
25-09-2012, 23:30
I'm trying to prototype some code using NetworkTables on my PC, without needing a cRIO. However, when I run it, I get an exception pointing to the following line in edu.wpi.first.wpilibj.networktables.ConnectionMana ger.java
server = (ServerSocketConnection) Connector.open("socket://:" + PORT);
I'm assuming it's because the NetworkTable code was targeted for the robot and JavaME. Is there some way to run this code on my computer, like a JavaME SDK, or emulator, or something?
RyanCahoon
26-09-2012, 23:47
You can compile the Squawk VM to run on desktop platforms. Instructions are given at http://java.net/projects/squawk/pages/BuildingSquawk with the small caveat that the SVN repository has moved to https://svn.java.net/svn/squawk~svn/trunk/. Note that this isn't a complete answer because a lot of the WPILib/FRC Framework functionality require native library calls, but it should get you very close if all you need is the NetworkTables.
Alternately, there's an effort going on at http://sourceforge.net/projects/frcsimulator/ with some alpha code to develop a "cRIO simulator" for the Java platform.
Joe Ross
27-09-2012, 11:56
I found an easier way. In the smartdashboard SVN on firstforge, there is a NetworkTable Client, Server, and Robot folder. The Server did what I needed and ran on my PC.
I could only find these in the 2012 tag. They seem to have been deleted in trunk.
I could only find these in the 2012 tag. They seem to have been deleted in trunk.
My understanding is that this is being reorganized to better share the implementation. In the past there were basically 3 separate code-bases that all needed to be kept in sync.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.