FlightGear Newsletter March 2014: Difference between revisions

Jump to navigation Jump to search
m
→‎Development news: http://sourceforge.net/p/flightgear/mailman/flightgear-devel/thread/5318733A.7080208%40t3r.de/#msg32068663
m (→‎Development news: http://sourceforge.net/p/flightgear/mailman/flightgear-devel/thread/5318733A.7080208%40t3r.de/#msg32068663)
Line 19: Line 19:


Continue reading at [[Reset & re-init]]...
Continue reading at [[Reset & re-init]]...
=== built-in httpd updated ===
While working on the new radio/atis implementation, Torsten rediscovered the internal httpd (aka webserver) to browse the property tree.
It's much easier to have multiple browser windows open and point to various locations in the property tree than to reopen the internal
property browser and navigate to the locations after each sim restart.
After a while, Torsten got disappointed by the functionality and the look&feel  of the http property-browser, so he had a look at the code to see if it
could be improved, he quickly realized, that the implementation was  simple but not scalable, so he looked for something allready available on
the GPL market.
And he found Mongoose as a well maintained, feature rich and yet simple  implementation of a web server and started to embedd that into FlightGear.
What is ready so far and pushed to next is:
* A single threaded httpd running in the main loop (should probably get its own thread soon)
* Running as a replacement for the old httpd
* Serving FGDATA/Docs as the document root
* Serving the uri /props/ as a replacement for the old property browser  (improved functionality, improved l&f, styling via css)
* Serving the uri /run.cgi as a replacement for the old interface to run fg_commands
* Serving the uri /json/ to return selected properties as JSON  (read-only so far)
All this has a lot of potential. With the JSON interface extended to being able to write properties, the CGI interface  of
Mongoose turned on, the webserver running stable in it's own thread, It  should be possible to run e.g. PHP with jQuery or dojo.
If you want to test the new functions, go to:
* http://localhost:<httpd-port>/  for FGDATA/Docs
* http://localhost:<httpd-port>/props/  for the internal property browser
* http://localhost:<httpd-port>/json/some/property/name/or/path  for the internal property browser
* http://localhost:<httpd-port>/run.cgi?value=pause  to pause/unpause the simulation
Please mind the trailing slash for /props/ and /json/ (no, it's not  bug-free yet.)
=== Random Buildings ===
=== Random Buildings ===


Navigation menu