View Single Post
  #9   Spotlight this post!  
Unread 26-05-2012, 00:38
NotInControl NotInControl is offline
Controls Engineer
AKA: Kevin
FRC #2168 (Aluminum Falcons)
Team Role: Engineer
 
Join Date: Oct 2011
Rookie Year: 2004
Location: Groton, CT
Posts: 261
NotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond repute
Re: UDP Recieving Problems

Can you post the complete output of the console where you are getting the "Robots don't quit" message.

To help point you in the right direction in the mean time:

That message means there is an uncaught exception and it bubbled up to the system level. If it is an uncaught IO exception it should tell you a line number as well, but it probably has to do with your something within the udp() function.

Are you sure the parameter to connector.open is correct? I believe you should be using a "datagram" protocol instead of a "data" protocol.

For example
A datagram connection for accepting datagrams on port 1234
"datagram://:1234"

A datagram connection for sending to a server on port 1234:
"datagram://123.456.789.12:1234"

And it also looks like you never instantiate the Datagram variable "data", so its null when you call data.readUTF, and null when you use it as a param in receive(data). But that should throw a null point exception, and you should be seeing that in the console. If you don't that's because the program is failing before it gets to that line, which case your problem lies where you open your connection to the datagram (or maybe you do instantiate it somewhere and I just didn't notice it).

You mentioned that you have a java applet that works. Is that written using the same version of JavaME that is running on the cRIO? My guess is that you copied your code from the applet to the CRIO, however, if the code was written under different java environments it will not be able to run on the cRIO without modification.

Hope that helps.
Kevin
__________________
Controls Engineer, Team 2168 - The Aluminum Falcons
[2016 Season] - World Championship Controls Award, District Controls Award, 3rd BlueBanner
-World Championship- #45 seed in Quals, World Championship Innovation in Controls Award - Curie
-NE Championship- #26 seed in Quals, winner(195,125,2168)
[2015 Season] - NE Championship Controls Award, 2nd Blue Banner
-NE Championship- #26 seed in Quals, NE Championship Innovation in Controls Award
-MA District Event- #17 seed in Quals, Winner(2168,3718,3146)
[2014 Season] - NE Championship Controls Award & Semi-finalists, District Controls Award, Creativity Award, & Finalists
-NE Championship- #36 seed in Quals, SemiFinalist(228,2168,3525), NE Championship Innovation in Controls Award
-RI District Event- #7 seed in Quals, Finalist(1519,2168,5163), Innovation in Controls Award
-Groton District Event- #9 seed in Quals, QuarterFinalist(2168, 125, 5112), Creativity Award
[2013 Season] - WPI Regional Winner - 1st Blue Banner

Last edited by NotInControl : 26-05-2012 at 00:54.
Reply With Quote