Telnet usage: Difference between revisions

Jump to navigation Jump to search
m
m (http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg31243.html)
Line 239: Line 239:
   conn.set("/gear/state", "up")
   conn.set("/gear/state", "up")
</syntaxhighlight>
</syntaxhighlight>
Look under src/scripts and you'll find example code showing you how to do it  in Python, Perl and C. The Python/Java ones includes a FlightGear module that makes the telnet part pretty transparent.


There are a couple examples in the scripts section of the FG source code. There is a chunk of perl (telnet.pl) you can include to make access from a perl script mostly trivial. I think there is a java example and perhaps something for python.
There are a couple examples in the scripts section of the FG source code. There is a chunk of perl (telnet.pl) you can include to make access from a perl script mostly trivial. I think there is a java example and perhaps something for python.

Navigation menu