|
Re: NetworkTables C++
Quote:
Originally Posted by yash101
This has been something I have always stumbled upon. This year, I am aiming to seamlessly integrate two systems together, one being the main robot code written in Java, and the other being the vision code running in C++. I am going to have my vision code run in Embedded Linux (ARM). I have not been able to find any good source for a library that will allow me to easily use NetworkTables.
Please point me to some resources. I wish to create a thread with a good answer so anyone else shot in the dark like me will have an easy time
Good Luck and Thanks!
Good Luck with your season and competitions! 
|
Why go through the hassel of using network tables. My experience with it is the bugs are not worth the trouble.
Create a simple TCP socket between the C++ code and the Java code.
Make the robot the server, and the c++ code the client and send ascii data between the two.
Make sure you run the read/write in their own threads so there is no i/o blocking.
You can control the communications, the ports, and the data being sent - no need for network tables really.
Use pthreads on the C++ side, and ServerSocketConnectionclass on the java (crio) side. Those classes are already apart of the codebases you are targeting and no need to have additional interpreters installed or rely on WPI library implementation.
Hope this helps,
Kevin
__________________
Controls Engineer, Team 2168 - The Aluminum Falcons
[2016 Season] - World Championship Controls Award, District Controls Award, 3rd BlueBanner
-World Championship- #45 seed in Quals, World Championship Innovation in Controls Award - Curie
-NE Championship- #26 seed in Quals, winner(195,125,2168)
[2015 Season] - NE Championship Controls Award, 2nd Blue Banner
-NE Championship- #26 seed in Quals, NE Championship Innovation in Controls Award
-MA District Event- #17 seed in Quals, Winner(2168,3718,3146)
[2014 Season] - NE Championship Controls Award & Semi-finalists, District Controls Award, Creativity Award, & Finalists
-NE Championship- #36 seed in Quals, SemiFinalist(228,2168,3525), NE Championship Innovation in Controls Award
-RI District Event- #7 seed in Quals, Finalist(1519,2168,5163), Innovation in Controls Award
-Groton District Event- #9 seed in Quals, QuarterFinalist(2168, 125, 5112), Creativity Award
[2013 Season] - WPI Regional Winner - 1st Blue Banner
|