Go to Post Successful teams - in almost any aspect of life (i.e. not just robotics) - don't make excuses and assign blame when something goes wrong. They improvise. They adapt. They overcome. They correct the problem and move on. - dlavery [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 17-02-2013, 14:01
William Kunkel William Kunkel is offline
Programming Lead
AKA: Kunkel
FRC #0422 (Mech Tech Dragons)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Richmond, VA
Posts: 94
William Kunkel is an unknown quantity at this point
Does Anyone Understand NetworkTables2?

I have not found any documentation on how NetworkTables2 works. I've been trying to understand it from the source, but the architecture is a bit too enterprise-y to wrap my head around. Does anyone know how I would implement a client on an on-board raspberry pi and a server on the cRIO?
Reply With Quote
  #2   Spotlight this post!  
Unread 17-02-2013, 14:26
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 989
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: Does Anyone Understand NetworkTables2?

Does this help at all? http://wpilib.screenstepslive.com/s/...client-pc-side
Reply With Quote
  #3   Spotlight this post!  
Unread 17-02-2013, 14:34
William Kunkel William Kunkel is offline
Programming Lead
AKA: Kunkel
FRC #0422 (Mech Tech Dragons)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Richmond, VA
Posts: 94
William Kunkel is an unknown quantity at this point
Re: Does Anyone Understand NetworkTables2?

As far as I can tell, that documentation is for the old implementation of NetworkTables. And even that documentation is severely lacking.
Reply With Quote
  #4   Spotlight this post!  
Unread 17-02-2013, 14:36
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Does Anyone Understand NetworkTables2?

I wrote the LV implementation from the protocol specification and while it isn't complicated, I'll agree that it isn't trivial either. It would be far easier to use one of the client implementations already written and port it to RPI.

If you have specific questions I can probably answer them, and people like WPI students who have also written clients and servers are on this forum too.

Greg McKaskle
Reply With Quote
  #5   Spotlight this post!  
Unread 17-02-2013, 14:44
William Kunkel William Kunkel is offline
Programming Lead
AKA: Kunkel
FRC #0422 (Mech Tech Dragons)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Richmond, VA
Posts: 94
William Kunkel is an unknown quantity at this point
Re: Does Anyone Understand NetworkTables2?

I honestly don't think it would be that difficult to modify the vanilla wpilib implementation to run on the rpi. My problem is just understanding what that implementation is really supposed to be doing. I don't understand how they intend users to interface with it at all.

For example, I would expect that to create a client, one would have to make an instance of the NetworkTableClient class. But that constructor takes an IOStreamFactory, a NetworkTableEntryTypeManager, and an NTThreadManager as arguments. I don't know what those even do, much less how to obtain them.
Reply With Quote
  #6   Spotlight this post!  
Unread 17-02-2013, 18:56
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Does Anyone Understand NetworkTables2?

Are you looking to do this in C++ or Java. I googled IOStreamFactory and found that it is a Java stream class. I didn't google the others, but this is how I'd go about porting it.

Greg McKaskle
Reply With Quote
  #7   Spotlight this post!  
Unread 17-02-2013, 23:14
William Kunkel William Kunkel is offline
Programming Lead
AKA: Kunkel
FRC #0422 (Mech Tech Dragons)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Richmond, VA
Posts: 94
William Kunkel is an unknown quantity at this point
Re: Does Anyone Understand NetworkTables2?

I'm working in C++. And it is definitely a C++ class as well, it's just one made up entirely by the WPILib developers, as far as I can tell.
Reply With Quote
  #8   Spotlight this post!  
Unread 17-02-2013, 23:24
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,082
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Does Anyone Understand NetworkTables2?

I've been using the NetworkTable class. It's just a wrapper around the NetworkTables2 class... pretty simple to use in comparison. The SmartDashboard implementation uses the NetworkTable class underneath the hood too, so that's probably the way to go. Just watch out for NULL pointers...
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
  #9   Spotlight this post!  
Unread 18-02-2013, 19:58
mitchellweb1 mitchellweb1 is offline
Registered User
AKA: Mitchell W
FRC #0190
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2009
Location: Acton, MA
Posts: 30
mitchellweb1 is an unknown quantity at this point
Re: Does Anyone Understand NetworkTables2?

You can checkout the full networktables source here. http://firstforge.wpi.edu/sf/go/proj...tables_2_0/scm The project is built such that it should build on linux. I built it on ubuntu so that I could do debugging and profiling easier. The intended interface was through the NetworkTable class as virtuald said. The networktables2 classes were designed for much more advanced applications and allow for much more advanced applications. The example described here (http://wpilib.screenstepslive.com/s/...client-pc-side) should be easily ported to run on c++.
Reply With Quote
  #10   Spotlight this post!  
Unread 18-02-2013, 20:11
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Does Anyone Understand NetworkTables2?

Also, if anyone is having issues with networktables2, I have a wireshark dissector for it here: https://bitbucket.org/byteit101/frc-wireshark-utils
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:33.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi