View Single Post
  #1   Spotlight this post!  
Unread 21-02-2009, 16:27
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
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:
...
...
void RobotMain()//so it executes even if disabled
{
		Dashboard &dashboard = m_ds->GetDashboardPacker();
		while (true)
		{
			dashboard.Printf("It's been %f seconds, according to the FPGA.\n", GetClock());
			dashboard.Printf("451!|distance=2|flywheel=%f|!451\n", 1);//our custom packet of data
			dashboardDataFormat.PackAndSend();
			Wait(0.02);
		}
}
....
...
and we have recieved on our custom dashboard... nothing, we changed the dashboard.printf to regular printfs and still nothing
here is the .net code in C#:
Code:
/*init function*/
	UdpClient cRIO = new UdpClient();
	cRIO.Bind("10.4.51.5",1165);
/*end init*/
/*in the start button click*/
	IPEndPoint ipend = new IPEndPoint(IPAddress.Any, 1165);
	this.textBox1.Text = cRIO.Recieve(ref ipend);
//*end button*/
and the code pauses and never recieves anything from port 1165, I tried out wireshark, and tons of packets are coming in, but I get nothing, what are we doing wrong?
__________________
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