Can the robot run Java Server Pages? And, can it respond to AJAX reasonably quickly? Thinking of having a webpage display where we are on the field, as a driving aid.
I’m definitely not a Java guy, but I know the cRio-FRC platform has been designed with Java Micro Edition and I cannot find any information explicitly stating that JME won’t work with JSP.
The cRio is quite fast but I don’t think it would be capable of running a web framework and handling a request density (additionally to running robot code, with the watchdog) your application would use.
While a great idea (and you have lots more to consider besides just displaying the information), this sounds like a Dashboard application.
I am not an expert on Java Server Pages but I doubt it would run on the Squawk VM that the cRIO uses. Squawk is a J2ME (mobile edition) VM and was not intended to host servlets.
Ok, can the cRIO send AJAX requests to a server running on a different computer, on the local network? I just need to send around five integers fifteen to twenty times a second.
As for performance, the cRIO will be able to max-out the router and computer information wise while still leaving reasonable time (at least this was true in my tests) for control code (don’t think about image processing, though), so it would make sense it could compute a HTML page a send it repeatedly. As for actually making sure the page is sent on the cRIO, you’d have to implement (at least) the GET method as defined in the HTTP RFC.
Basically, look for the string “GET <path>”, where <path> is “/index.html” or similar. Return the page with “200 OK
Content-Length: <length in bytes>
<content>”. I think this is all you should need to get Firefox/similar to accept it in some sort of compatibility mode. Do some experimenting with some of the various Firefox/similar add-ons, or look at the RFC for some basic commands (like “GET” and “HEAD”) and open a connection in Java and print out the results to see what a valid header looks like.
Ok, you may be right. I wanted to send a set of coordinates to a computer other than the FRC laptop, which could then render a 3d scene using those coordinates. (Is it legal to use another computer at the driving station just to display information?) If I can use the dashboard, then I would, but the FRC laptop can’t handle the rendering, so I wanted to use another computer.
You can just use that other computer as your driver station. As for on the field, it seems allowable to have two computers linked together, but they both can’t be using wireless.