|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Using Sockets with the cRio in Wind River
can I have the source (so i don't have to decompile it, which is vvveeeerrrrrrrryyy easy w/ .net apps except the resources)?
|
|
#2
|
||||
|
||||
|
Re: Using Sockets with the cRio in Wind River
Sure, once I get home. I hope you dont mind that it's C#. You could also use a packet sniffer such as Wireshark.
|
|
#3
|
||||
|
||||
|
Re: Using Sockets with the cRio in Wind River
Quote:
|
|
#4
|
||||
|
||||
|
Re: Using Sockets with the cRio in Wind River
Here ya go. This'll just display the pure text of the packet on the screen. Ignore the "Send" button, it was originally created to be a chat client. Also, make sure you change the ports and IP addresses. I would also suggest you leave the protocol as Dgram.
This is also on my server 'cause its to big too upload to CD. Here ya go. |
|
#5
|
||||
|
||||
|
Re: Using Sockets with the cRio in Wind River
Well,
I want to be able to use this at comp, so, what port would we have to transfer data on? |
|
#6
|
||||
|
||||
|
Re: Using Sockets with the cRio in Wind River
Quote:
To send data during competition you must use the dashboard data, which is included in a control system packet, so it won't be blocked. Any other system will likely be illegal at competition. |
|
#7
|
||||
|
||||
|
Re: Using Sockets with the cRio in Wind River
Well, how do you pull the dashboard data off of the control system packets?
|
|
#8
|
||||
|
||||
|
Re: Using Sockets with the cRio in Wind River
Quote:
When your PC's IP address 10.xx.yy.6, you'll receive UDP packets from the DS on port 1165. There is some header data which includes team number, battery level, field status, ect. After that is your user data. I don't remember what the index of the user data is in the packet, but you can figure it out by filling the user data with some value(255), and looking at the data in a packet sniffer. Last edited by EHaskins : 07-02-2009 at 00:55. |
|
#9
|
|||
|
|||
|
Re: Using Sockets with the cRio in Wind River
So using sockes is illegal?
|
|
#10
|
||||
|
||||
|
Re: Using Sockets with the cRio in Wind River
Yes, no socks, just your bare feet in your shoes
(You mean sockets i'm sure) |
|
#11
|
|||
|
|||
|
Re: Using Sockets with the cRio in Wind River
I pretty sure they are OK with any sort of dashboard you want to build. They do not want or intend to allow communication from the dashboard to the robot or FMS, and they want to limit the data from robot to dashboard to ensure that every team gets a good quality connection and to make sure the joystick data isn't sacrificed.
I've posted a couple times on what the data types are in the dashboard data. By the way, there really is no reason to use the default dashboard anyway, it is really too low level. The first picture shows the mandatory header that is attached by the infrastructure. The second shows how the dashboard decodes the remaining 984 bytes. The first field is to identify duplicates and skips and you can probably ignore. The next field, the string is the user data you can do anything you want with. The next field, also a string is an error stream from WPILib. I'm not certain how this is controlled on C/C++, but on LV, this is optional, and you can turn it off on the Error Display VI. The third field is the buffer of binary data produced by the Build Dashboard Data.vi or by the default C code for sending low level I/O values to the dashboard. Again, I'm not sure how this is done in C, but in LV, when all of the data won't fit, the first thing to be dropped is the I/O values, then the error info, and finally, the user data will be truncated. Also, keep in mind that LV strings are not null terminated, but are preceded by an four byte count of bytes. Ditto for the array. If you have further questions, fire away. Greg McKaskle |
|
#12
|
|||
|
|||
|
Re: Using Sockets with the cRio in Wind River
How exactly would that look as a standard struct in C/C++? Because it would be cool to get some more data back and send it to a small Linux enabled touch screen device.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Teams happy with Wind River Workbench? | gvarndell | C/C++ | 59 | 28-07-2009 21:13 |
| Using Standard Labview with cRIO | writchie | FRC Control System | 2 | 23-01-2009 13:44 |
| Problem with downloading Wind River | beemgruem | C/C++ | 0 | 21-01-2009 12:17 |
| Wind River Printing from cRio | Mr.Macdonald | C/C++ | 6 | 12-01-2009 20:42 |
| Open Wind River | excel2474 | Programming | 12 | 31-12-2008 17:36 |