Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   JSP (http://www.chiefdelphi.com/forums/showthread.php?t=90757)

enbug 02-02-2011 10:33

JSP
 
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.

basicxman 02-02-2011 10:54

Re: JSP
 
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.

jtdowney 02-02-2011 10:55

Re: JSP
 
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.

enbug 03-02-2011 02:24

Re: JSP
 
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.

sjspry 03-02-2011 03:23

Re: JSP
 
The software stack you want to use would be the wrong one for the job. Just sending the integers to some software would be easier and the best choice (think Dashboard of some kind, hint hint); if you insist on using a web-based interface you might be able to get something running with a keep-alive connection and Javascript (similar to how the Axis Camera updates the images it receives in the web viewer for the MJPG stream). Note you will have to implement basically everything.

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\r\nContent-Length: <length in bytes>\r\n<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.

enbug 03-02-2011 12:17

Re: JSP
 
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.

Joe Ross 03-02-2011 13:37

Re: JSP
 
Quote:

Originally Posted by enbug (Post 1014899)
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.

See <R75>.

sjspry 03-02-2011 15:05

Re: JSP
 
Quote:

Originally Posted by enbug (Post 1014899)
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.


All times are GMT -5. The time now is 09:45.

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