Telnet usage: Difference between revisions

Jump to navigation Jump to search
→‎Interfacing with other programs: http://www.mail-archive.com/flightgear-devel@flightgear.org/msg26397.html
No edit summary
(→‎Interfacing with other programs: http://www.mail-archive.com/flightgear-devel@flightgear.org/msg26397.html)
Line 194: Line 194:


== Interfacing with other programs ==
== Interfacing with other programs ==
Using the telnet interface, your own custom client software can request the value of any variable at any time. You can also update the value of any other variable at any time. The overall bandwidth of the telnet interface is not very high though so it's not appropriate for blasting all the flight dynamics data at 60hz for instance, but for your application it probably will work very well ... and I can imagine ways to cheat that would make it look like it was working even better than it actually was. (For instance, you might get some delay if you turn the knob, send the data to FG, and then read the new frequency back from FG, but if you know locally how far your knob turned, you can update your local display immediately, and then sync up with FG at a slower rate.)
The cool thing is that you can easily write scripts to access the --telnet=<port#> interface.
The cool thing is that you can easily write scripts to access the --telnet=<port#> interface.
<syntaxhighlight language="python">
<syntaxhighlight language="python">
Line 214: Line 216:
If you need to track 100 different variables at 60hz, this isn't the interface for you.
If you need to track 100 different variables at 60hz, this isn't the interface for you.
For that you should consider using a native protocol, implemented in C++ (e.g. FGNetCtrl via UDP).
For that you should consider using a native protocol, implemented in C++ (e.g. FGNetCtrl via UDP).


== Links ==
== Links ==

Navigation menu