![]() |
recieve data from cRIO
We have a custom dashboard (written in C# .net or VB .net) and it is supposed to receive the packets coming from the DS on port 1165 of type UDP. we have the cRIO running the following program based off the dashboard data example:
Code:
...here is the .net code in C#: Code:
/*init function*/ |
Re: recieve data from cRIO
Here is the applicable code from my dashboard. It uses async calls so its a little more complicated.
Code:
Sub BeginGetDataAsync() Implements IDashboardClient.BeginGetDataAsync |
Re: recieve data from cRIO
Thanks! now we can see something, it looks like ?M? for each packet, and changes to variations of that, ?p? ?r? ??? etc... changing the encoding changes the ? to other chars, but it looks weird (wiresharks verifies that our custom packet works, and looks normal there)
|
Re: recieve data from cRIO
Quote:
|
Re: recieve data from cRIO
Quote:
|
Re: recieve data from cRIO
Quote:
Code:
Dim reader As New BinaryReader(New MemoryStream(data))Code:
Imports System.IO |
Re: recieve data from cRIO
Thanks, but i figured it out:
(in C#.net just to irritate you VB bigot) Code:
buffer= client.Receive...?hs\0546d\0jos\0MYDATAHERE\0jsfjnn\0 and it cut off after the \0 (or null (buffer = 0) (Nothing for you VB bigot)) i just had to set a breakpoint, see the data, and realize what was happening (the string was being chopped up!); |
Re: recieve data from cRIO
Something very useful for feedback is the ability to write to the LCD of your DriverStation: http://thinktank.wpi.edu/article/144
|
Re: recieve data from cRIO
Quote:
|
Re: recieve data from cRIO
All that is great, as long as you have a laptop around. :)
|
| All times are GMT -5. The time now is 01:13. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi