View Single Post
  #15   Spotlight this post!  
Unread 24-01-2012, 08:29
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,753
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: Sending data to cRIO

TCP is much preferred if your data will not fit in a datagram. But small amounts of periodically retransmitted data are why UDP was included in the ISO networking model.

As an example, the joystick data from the DS is sent to the robot using ... UDP. The voltage and other robot data are sent back to the DS using ... UDP.
The field sends state data to the DS using ... UDP.

The only field control data not using UDP is the cameras, where the data is 6KB up to 40KB, and would require many datagrams, all arriving, and all reordered before it would be possible to rebuild the JPG image. But that is a perfect example of when to switch to TCP. There are other considerations, but UDP is a great protocol, and so is TCP.

By the way, the Charts tab on the DS now shows how many packets were lost each second and the latency from the DS to the robot and back. The lost packet indicates that either the control or status didn't make it, therefore the round trip failed.

Greg McKaskle