View Single Post
  #4   Spotlight this post!  
Unread 01-26-2012, 12:23 AM
Tommy.Brown's Avatar
Tommy.Brown Tommy.Brown is offline
Lead Programmer
FRC #1477 (Texas Torque)
Team Role: Programmer
 
Join Date: Jul 2011
Rookie Year: 2011
Location: The Woodlands
Posts: 27
Tommy.Brown is an unknown quantity at this point
Re: TCP Listening in C++

TCP and UDP code will be horrible to write in C++, especially since LabView is the officially supported language for the cRIO, because NI makes both of them, and C++/Java just happen to work, especially since I don't think WPILib has anything built in for TCP or UDP. Try using the serial port, WPILib has a class SerialPort.cpp, you would just have to modify the Labview code to send the data via serial port (to do this you will need a null modem cable, not a normal serial cable). Writing serial code for the robot in C++ is extremely easy, and the data can send really fast (not comparatively of course, but you can set the baud rate higher if needed), I think I was able to write the serial code in 3 hours.

TCP and UDP will be much harder, especially since I am not even sure if the cRIO has the capability to do that through C++.
__________________
FRC Team 1477 - Texas Torque
The Woodlands, Texas
Reply With Quote