View Single Post
  #23   Spotlight this post!  
Unread 08-02-2012, 23:36
wireties's Avatar
wireties wireties is offline
Principal Engineer
AKA: Keith Buchanan
FRC #1296 (Full Metal Jackets)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Rockwall, TX
Posts: 1,169
wireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond repute
Send a message via AIM to wireties
Re: Image processing on the driver station laptop

The classic illustration if that UDP is like sending a letter. You write it, put it in an envelope and send it to the destination. It probably gets there, especially if the destination is local. BUT there is no way to be sure unless you build an acknowledgement into your application protocol.

TCP is more like a phone call. There is a distinct connection phase followed by the exchange of information (acknowledged by each party) and a disconnect phase.

UDP is faster - on highly reliable links. TCP is made to work between any two endpoints no matter the delay and reliability of the link. TCP will keep counts of packets going back and forth, ack them all and automagically retry if something is dropped. UDP just sends and forgets.

In this case I would try UDP and enumerate the packets. If you are missing a packet and/or one is out of order just throw that image away and wait for the next. Like Alan said, it should not happen very often.

And the socket address is a combination of the IP address AND the port number. So the ports to and from your robot to the driver station should always be available to you. Their availability have little to do with other robots on the field.

HTH
__________________
Fast, cheap or working - pick any two!

Last edited by wireties : 08-02-2012 at 23:38.