Go to Post I even have a t-shirt that says "Actually, I -am- a rocket scientist" :) - dlavery [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
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 31-01-2013, 08:09
fovea1959's Avatar
fovea1959 fovea1959 is offline
Herder of programmers
AKA: Doug Wegscheid
FRC #3620 (The Average Joes)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: St Joseph
Posts: 332
fovea1959 will become famous soon enough
Queues using NetworkTables

has anyone seen an implementation of queueing data from robot to DS using NetworkTables? I'm looking for a way to get logging data from the robot to the DS; can't use a single value, because I don't want to overwrite the value on the robot until I know the DS has grabbed the previous value and logged it.
Reply With Quote
  #2   Spotlight this post!  
Unread 31-01-2013, 11:48
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Queues using NetworkTables

It might be simpler for you to open your own TCP connection and send the logging data that way.
Reply With Quote
  #3   Spotlight this post!  
Unread 31-01-2013, 13:20
fovea1959's Avatar
fovea1959 fovea1959 is offline
Herder of programmers
AKA: Doug Wegscheid
FRC #3620 (The Average Joes)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: St Joseph
Posts: 332
fovea1959 will become famous soon enough
Re: Queues using NetworkTables

I agree with that (the DS side becomes 'netcat'), but I keep coming back to according to the FMS White Paper:
Quote:
The ports that the teams are able to access on the playing field are as follows:
  • TCP 1180: This port is typically used for camera data from the robot to the DS when the camera is connected to port 2 on the 8-slot cRIO. This port is bidirectional on the field.
  • TCP 1735: SmartDashboard, bidirectional
  • UDP 1130: Dashboard-to-Robot control data, directional
  • UDP 1140: Robot-to-Dashboard status data, directional
  • HTTP 80: Camera connected via switch on the robot, bidirectional
  • HTTP 443: Camera connected via switch on the robot, bidirectional
What ports on the DS would be accessible from the robot?
Reply With Quote
  #4   Spotlight this post!  
Unread 31-01-2013, 15:58
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Queues using NetworkTables

I suggest TCP on port 1180. It's not likely that you'll want to plug the camera directly into the cRIO and forward packets to the Driver Station through it, so that port is available for other purposes.
Reply With Quote
  #5   Spotlight this post!  
Unread 31-01-2013, 22:38
fovea1959's Avatar
fovea1959 fovea1959 is offline
Herder of programmers
AKA: Doug Wegscheid
FRC #3620 (The Average Joes)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: St Joseph
Posts: 332
fovea1959 will become famous soon enough
Re: Queues using NetworkTables

so we'd have to have the cRIO do the TCP listen/accept...

udp would be easier....
Reply With Quote
  #6   Spotlight this post!  
Unread 01-02-2013, 00:00
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Queues using NetworkTables

UDP would certainly be easier, and it's what I would use myself. But it sounded like you were concerned about possibly missing information, and UDP gives you no guarantee that transmitted data actually gets received. If you don't want the possibility of lost data, you'd need to implement your own buffered acknowledge/timeout/retry scheme.
Reply With Quote
  #7   Spotlight this post!  
Unread 01-02-2013, 09:29
fovea1959's Avatar
fovea1959 fovea1959 is offline
Herder of programmers
AKA: Doug Wegscheid
FRC #3620 (The Average Joes)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: St Joseph
Posts: 332
fovea1959 will become famous soon enough
Re: Queues using NetworkTables

I'm not worried so much about dropped UDP packets as I would be about designing something using NetworkTables that definitely will drop data. If you write to a NetworkTable variable with two values quickly, someone else watching that variable is not really likely to the first update unless they are polling the variable really really fast.

Two UDP writes quickly shouldn't be a big deal.

But it still comes back to what UDP port can I listen on on the DS? None available!
Reply With Quote
  #8   Spotlight this post!  
Unread 01-02-2013, 10:29
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Queues using NetworkTables

Quote:
Originally Posted by fovea1959 View Post
But it still comes back to what UDP port can I listen on on the DS? None available!
Port 1140 is defined for exactly the purpose you are looking for.
Reply With Quote
  #9   Spotlight this post!  
Unread 01-02-2013, 10:52
fovea1959's Avatar
fovea1959 fovea1959 is offline
Herder of programmers
AKA: Doug Wegscheid
FRC #3620 (The Average Joes)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: St Joseph
Posts: 332
fovea1959 will become famous soon enough
Re: Queues using NetworkTables

oh! I was misinterpreting that document! I thought it meant that the WPI provided Dashboard framework listened on UDP 1140; I didn't realize that was reserved for team's custom code... I take it that we can have code on the bot listening on UDP 1130, also, then.

Logging gets *real* easy, then. Robot UDP send to a netcat running on DS. Done.

where does the WPI provided dashboard receive it's information? Is that TCP/1735?

I need to fire up Wireshark
Reply With Quote
  #10   Spotlight this post!  
Unread 01-02-2013, 12:02
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: Queues using NetworkTables

Yes, Network Tables was done over TCP using port 1735 I think.

Greg McKaskle
Reply With Quote
  #11   Spotlight this post!  
Unread 01-02-2013, 12:11
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,579
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Queues using NetworkTables

Quote:
Originally Posted by fovea1959 View Post
Logging gets *real* easy, then. Robot UDP send to a netcat running on DS. Done.
If that's all you wanted, netcat does the same thing for TCP.
Reply With Quote
  #12   Spotlight this post!  
Unread 06-02-2013, 02:26
fovea1959's Avatar
fovea1959 fovea1959 is offline
Herder of programmers
AKA: Doug Wegscheid
FRC #3620 (The Average Joes)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: St Joseph
Posts: 332
fovea1959 will become famous soon enough
Re: Queues using NetworkTables

ok, but what what TCP port can I listen on on the DS then?
Reply With Quote
  #13   Spotlight this post!  
Unread 06-02-2013, 08:00
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Queues using NetworkTables

Unless you're already using it explicitly for something else, TCP port 1180 is available.
Reply With Quote
  #14   Spotlight this post!  
Unread 06-02-2013, 08:05
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: Queues using NetworkTables

Quote:
Originally Posted by fovea1959 View Post
ok, but what what TCP port can I listen on on the DS then?
1180 is open unless you plan to plug a camera into Port 2 of an 8-slot cRIO.
Reply With Quote
  #15   Spotlight this post!  
Unread 06-02-2013, 09:13
fovea1959's Avatar
fovea1959 fovea1959 is offline
Herder of programmers
AKA: Doug Wegscheid
FRC #3620 (The Average Joes)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: St Joseph
Posts: 332
fovea1959 will become famous soon enough
Re: Queues using NetworkTables

That doc is pretty taciturn, it doesn't say whose ports (Robot or DS) it's talking about, and whether or not they are in use by the FIRST/WPI/NI framework.
Quote:
TCP 1180: This port is typically used for camera data from the robot to the DS when the camera is connected to port 2 on the 8-slot cRIO. This port is bidirectional on the field.
  • FMS will pass traffic to and from the robots TCP/1180 port. Correct?
  • That port is free for my robot code to listen on if I have a 4-slot cRIO (or an 8 slot with no camera)?


Quote:
TCP 1735: SmartDashboard, bidirectional
  • FMS will pass traffic to and from the robot's TCP/1735 port. Correct?
  • That port is not free for my robot code to listen on, it already in use by the FIRST framework. Correct?

Quote:
UDP 1130: Dashboard-to-Robot control data, directional
  • FMS will pass traffic to the robots UDP/1180 port, correct?
  • FMS will not pass traffic to the DS UDP/1180, correct?
  • That port is free for my robot code to listen on. Correct?

Quote:
UDP 1140: Robot-to-Dashboard status data, directional
  • FMS will pass traffic to the DS UDP/1140 port, correct?
  • FMS will not pass traffic to the robot UDP/1180, correct?
  • That port is free for my driver station code to listen on. Correct?

Quote:
HTTP 80: Camera connected via switch on the robot, bidirectional
  • FMS will pass traffic to and from the camera's TCP/80 port [10.xx.yy.11]. Correct?
  • If I don't have a camera, I can put another device on the robot at 10.xx.yy.11 listening on port 80, and can pass traffic to and from it.
  • If I do have a camera, then I obviously cannot use it for my own code. Correct?

Quote:
HTTP 443: Camera connected via switch on the robot, bidirectional
  • FMS will pass traffic to and from the camera's TCP/443 port [10.xx.yy.11]. Correct?
  • If I don't have a camera, I can put another device on the robot at 10.xx.yy.11 listening on port 443, and can pass traffic to and from it.
  • If I do have a camera, then I obviously cannot use the port for my own code. Correct?
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 22:50.

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