Property Tree Servers: Difference between revisions

Jump to navigation Jump to search
m
Robot: Cosmetic changes
m (PropertyTree template)
m (Robot: Cosmetic changes)
Line 1: Line 1:
{{PropertyTree}}
{{PropertyTree}}
==Web Server==  
== Web Server ==


To view the [[Property Tree]] with a web browser, start FlightGear with the following option:
To view the [[Property Tree]] with a web browser, start FlightGear with the following option:
Line 14: Line 14:
Now you can browse the entire FG property tree "live" (you'll need to refresh the browser) and even change values if you like. You can configure autopilot modes and even set control inputs so you can literally fly the airplane from your web browser, although it's not the most convenient interface for doing that. ;-)
Now you can browse the entire FG property tree "live" (you'll need to refresh the browser) and even change values if you like. You can configure autopilot modes and even set control inputs so you can literally fly the airplane from your web browser, although it's not the most convenient interface for doing that. ;-)


==Telnet Server==
== Telnet Server ==
FlightGear comes with a internal telnet server that can be used to read end set values within the [[Property_Tree|Property Tree]] structure. The telnet server is activated with the '''--telnet=port''' [[Command_Line_Parameters|command line option]], where port is the number of the listening port that will be opened.
FlightGear comes with a internal telnet server that can be used to read end set values within the [[Property Tree]] structure. The telnet server is activated with the '''--telnet=port''' [[Command Line Parameters|command line option]], where port is the number of the listening port that will be opened.


A connection to the server can be done using a [[Telnet usage|telnet client]] or opening a simple socket from any program. Multiple connections (more below) are possible at the same time. Too start FG and open the port 5401 as available telnet server use this command:
A connection to the server can be done using a [[Telnet usage|telnet client]] or opening a simple socket from any program. Multiple connections (more below) are possible at the same time. Too start FG and open the port 5401 as available telnet server use this command:
Line 21: Line 21:
There's more on the [[Telnet usage]] page.
There's more on the [[Telnet usage]] page.


==Props Server==
== Props Server ==
There is a similar interface minus the html wrappings that you can enable with the following option:
There is a similar interface minus the html wrappings that you can enable with the following option:
  fgfs --props=5401
  fgfs --props=5401
Line 28: Line 28:
and interact with the property system (again live) and set and examine values using a 'command line' style interface. This is covered more on the [[Telnet usage|Telnet]] page.
and interact with the property system (again live) and set and examine values using a 'command line' style interface. This is covered more on the [[Telnet usage|Telnet]] page.


==Writing Properties==
== Writing Properties ==
The cool thing is that you can easily write scripts to access this --props=<port#> interface.
The cool thing is that you can easily write scripts to access this --props=<port#> interface.


Line 40: Line 40:
But if you need to track 100 different variables at 60hz, this isn't the interface for you.
But if you need to track 100 different variables at 60hz, this isn't the interface for you.


==Multi Servers==
== Multi Servers ==
Note that you can setup as many of these as you want ... for instance, just to be obscene you could do:
Note that you can setup as many of these as you want ... for instance, just to be obscene you could do:
  fgfs --httpd=5400 --httpd=5401 --httpd=5402 --props=5403 --props=5404 --props=5405
  fgfs --httpd=5400 --httpd=5401 --httpd=5402 --props=5403 --props=5404 --props=5405


Now there are 6 different network interfaces running that you can access from anywhere.
Now there are 6 different network interfaces running that you can access from anywhere.

Navigation menu