View Single Post
  #5   Spotlight this post!  
Unread 27-08-2014, 22:04
yash101 yash101 is offline
Curiosity | I have too much of it!
AKA: null
no team
 
Join Date: Oct 2012
Rookie Year: 2012
Location: devnull
Posts: 1,191
yash101 is an unknown quantity at this point
Re: FRC Java TCP client

Quote:
Originally Posted by Arhowk View Post
Keep in mind that sending packets is a <sarcasm>bit</sarcasm> easier than writing AI scripts...

Also, remember the golden rule of efficiency, write the code first then determine if you have an issue. A thought-based AI will have no problem from the added delay by having a hardwired pie.

As far as the actual question is concerned, do you have to use TCP? The only class I know of in Java 5 would be DatagramSocket which sends UDP.
I am using a library to make socket programming extremely easy. However, the easiest to implement protocol that it supports is TCP. Also, I want a constant bi-directional data transfer. I basically want to have some request system, where the cRIO can request some data from the coprocessor, and vice-versa. This would also allow me to use the same socket server to send data to a UI, etc.

UDP is my last choice. For some basic path-planning, I will need to ensure that all the requests complete in a structured order!

I guess that if I can implement NetworkTables on the coprocessor, that would make things extremely simple! However, I don't think NetTables were built to be as portable as I want them to be!