![]() |
Is TCP communication allowed in-game?
Our team is planning to process images on the Classmate. Our plan is to simply open a socket on the classmate on a high number port and simply push data back and forth using TCP. This obviously works right now in testing.
My question is: Can we do this during competition? Are teams allowed to communicate with their robot from a background task on the Classmate over TCP on a high number port? (I know there will be speed issues due to network congestion etc, during the competition). |
Re: Is TCP communication allowed in-game?
See the rule below.
Quote:
|
Re: Is TCP communication allowed in-game?
We are also persuing this method. However, one must be VERY careful as to not cause excessive bandwidth/other bottleneck issues because the fms people will complain.
In previous years they had a screen that shows network data for each robot and a log so no funny business::ouch:: |
Re: Is TCP communication allowed in-game?
So, it seems like there are two main rules:
1. Do not use those port numbers in the range 1100-1200. 2. Try not to act like you are running a Denial of Service attack on the network. |
Re: Is TCP communication allowed in-game?
1 Attachment(s)
you could use the camera direct to the classmate/laptop last year via a special labview .vi for the dashboard (I have a copy if anybody wants it to play with). Last I checked they still are using the 4 port AP's on the bot (only way to use them with the 4 slot crio), so if you connect the camera there, you can view the camera from the dash via the special VI.
I think that is legal... that looks to be the same rule as used in 2011. edit- attached the .vi |
Re: Is TCP communication allowed in-game?
Quote:
|
Re: Is TCP communication allowed in-game?
How are you getting the TCP comm link to work?
I'm currently unable to find the networking API from java.. |
Re: Is TCP communication allowed in-game?
Quote:
|
Re: Is TCP communication allowed in-game?
Quote:
http://ideone.com/9dM5E That's our code as of roughly now(I think the only change was that the robot does not support UTF, so we just switched that to ASCII or something). javax.microedition.io is where the magic is. If you want I can give you our server-side code, but it's just standard socket opening and accepting a connection(in C++ that is). |
Re: Is TCP communication allowed in-game?
Quote:
Why can't you just go with message = m_inputStream.readUTF(); instead of all that, which should do the same thing? and same for outputStream with writeUTF |
Re: Is TCP communication allowed in-game?
Has anyone been able to get TCP communication from the DriverStation to the cRIO using C++?
Does WPILIB support the use of TCP/UDP sockets? |
Re: Is TCP communication allowed in-game?
Quote:
If you have any technical questions about ANYTHING feel free to email me or something. EDIT: I forgot to mention an extremely critical thing. Always make your servers threaded! That means for every client that connects to the ServerSocket on your server application, start a new designated thread for handling communication. If your server talks back, then also start another thread for sending info on the socket. Without threading, performance will TANK. |
Re: Is TCP communication allowed in-game?
1 Attachment(s)
I just wrote and tested this very simple code for a threaded TCP server template using Java. The server is fully threaded and can read input from incoming clients. There is no limit to how many clients can connect. It uses a thread to search for new clients and once a client connects another thread is started for reading input from that client's socket.
Feel free to use the code as it is a template, but please do not remove the credit comment on the top ;) Download the file from below: |
Re: Is TCP communication allowed in-game?
|
What do you guys think about a restful server so it will be easier to develop and test for?
I feel like a constant connection is not necessary. Also, how are you guys structuring rthe network? Server on laptop or server on crio. The formal seems simpler |
| All times are GMT -5. The time now is 23:24. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi