Go to Post A winning robot is the better robot, no matter how it was made or how much it cost. - Chris is me [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 31-01-2009, 20:16
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
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)?
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote
  #2   Spotlight this post!  
Unread 31-01-2009, 21:49
C222's Avatar
C222 C222 is offline
Computer Science Major
FRC #0852 (Athenian Robotics Collective)
Team Role: Alumni
 
Join Date: Mar 2007
Rookie Year: 2007
Location: California
Posts: 22
C222 is on a distinguished road
Re: Using Sockets with the cRio in Wind River

Quote:
Originally Posted by byteit101 View Post
can I have the source (so i don't have to decompile it, which is vvveeeerrrrrrrryyy easy w/ .net apps except the resources)?
Sure, once I get home. I hope you dont mind that it's C#. You could also use a packet sniffer such as Wireshark.
__________________
--=====|-----====|-------====|-------====|----
--=|--------------==|----------==|---------==|---
--=|---------------==|----------==|---------==|--
--=|------------==|----------==|---------==|-----
--=====|-----======|-----======|----======|-
Reply With Quote
  #3   Spotlight this post!  
Unread 31-01-2009, 22:05
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Using Sockets with the cRio in Wind River

Quote:
I hope you dont mind that it's C#.
My favorite Language is C# Followed by PHP, and then C++
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote
  #4   Spotlight this post!  
Unread 01-02-2009, 00:43
C222's Avatar
C222 C222 is offline
Computer Science Major
FRC #0852 (Athenian Robotics Collective)
Team Role: Alumni
 
Join Date: Mar 2007
Rookie Year: 2007
Location: California
Posts: 22
C222 is on a distinguished road
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.
__________________
--=====|-----====|-------====|-------====|----
--=|--------------==|----------==|---------==|---
--=|---------------==|----------==|---------==|--
--=|------------==|----------==|---------==|-----
--=====|-----======|-----======|----======|-
Reply With Quote
  #5   Spotlight this post!  
Unread 06-02-2009, 23:06
kiettyyyy's Avatar
kiettyyyy kiettyyyy is offline
Registered User
FRC #1538 (The Holy Cows)
Team Role: Engineer
 
Join Date: Mar 2006
Rookie Year: 2005
Location: San Diego, CA
Posts: 181
kiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond repute
Send a message via AIM to kiettyyyy
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?
__________________
-Kiet Chau

2004-2008 - Software Developer/Driver on Team #968
2008-2011 - Software Developer/Coach/Mentor/"Engineer" on Team #968
2011-Present - Mentor & Engineer on Team #1538
www.team1538.com
Reply With Quote
  #6   Spotlight this post!  
Unread 06-02-2009, 23:22
EHaskins EHaskins is offline
Needs to change his user title.
AKA: Eric Haskins
no team (CARD #6 (SCOE))
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Elkhorn, WI USA
Posts: 998
EHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond repute
Send a message via MSN to EHaskins
Re: Using Sockets with the cRio in Wind River

Quote:
Originally Posted by kiettyyyy View Post
Well,

I want to be able to use this at comp, so, what port would we have to transfer data on?
FIRST has stated that there will be network monitoring in place to prevent any non-control system data from being transferred during the competition.

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.
__________________
Eric Haskins KC9JVH
Reply With Quote
  #7   Spotlight this post!  
Unread 07-02-2009, 00:01
kiettyyyy's Avatar
kiettyyyy kiettyyyy is offline
Registered User
FRC #1538 (The Holy Cows)
Team Role: Engineer
 
Join Date: Mar 2006
Rookie Year: 2005
Location: San Diego, CA
Posts: 181
kiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond repute
Send a message via AIM to kiettyyyy
Re: Using Sockets with the cRio in Wind River

Well, how do you pull the dashboard data off of the control system packets?
__________________
-Kiet Chau

2004-2008 - Software Developer/Driver on Team #968
2008-2011 - Software Developer/Coach/Mentor/"Engineer" on Team #968
2011-Present - Mentor & Engineer on Team #1538
www.team1538.com
Reply With Quote
  #8   Spotlight this post!  
Unread 07-02-2009, 00:51
EHaskins EHaskins is offline
Needs to change his user title.
AKA: Eric Haskins
no team (CARD #6 (SCOE))
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Elkhorn, WI USA
Posts: 998
EHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond repute
Send a message via MSN to EHaskins
Re: Using Sockets with the cRio in Wind River

Quote:
Originally Posted by kiettyyyy View Post
Well, how do you pull the dashboard data off of the control system packets?
The protocol is simple, but, AFAIK, undocumented. They intended for the Labview dashboard to be used.

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.
__________________
Eric Haskins KC9JVH

Last edited by EHaskins : 07-02-2009 at 00:55.
Reply With Quote
  #9   Spotlight this post!  
Unread 07-02-2009, 05:11
nadavsen2 nadavsen2 is offline
Registered User
FRC #2231
 
Join Date: Jan 2009
Location: israel
Posts: 31
nadavsen2 is an unknown quantity at this point
Re: Using Sockets with the cRio in Wind River

So using sockes is illegal?
Reply With Quote
  #10   Spotlight this post!  
Unread 07-02-2009, 07:29
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Using Sockets with the cRio in Wind River

Quote:
Originally Posted by nadavsen2 View Post
So using sockes is illegal?
Yes, no socks, just your bare feet in your shoes (You mean sockets i'm sure)
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote
  #11   Spotlight this post!  
Unread 07-02-2009, 10:33
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
Attached Thumbnails
Click image for larger version

Name:	Picture 2.png
Views:	110
Size:	30.0 KB
ID:	7343  Click image for larger version

Name:	Picture 4.png
Views:	85
Size:	9.8 KB
ID:	7344  
Reply With Quote
  #12   Spotlight this post!  
Unread 17-02-2009, 14:10
X-Istence X-Istence is offline
Melt the RC controller!
AKA: Bert JW Regeer
no team
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Montville
Posts: 151
X-Istence will become famous soon enoughX-Istence will become famous soon enough
Send a message via AIM to X-Istence Send a message via MSN to X-Istence
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.
__________________
My Blog!
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT -5. The time now is 00:56.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi