Telnet usage: Difference between revisions

Jump to navigation Jump to search
1,204 bytes added ,  26 March 2013
→‎Interfacing with other programs: http://www.mail-archive.com/flightgear-devel@flightgear.org/msg26269.html
(→‎Interfacing with other programs: http://www.mail-archive.com/flightgear-devel@flightgear.org/msg26397.html)
(→‎Interfacing with other programs: http://www.mail-archive.com/flightgear-devel@flightgear.org/msg26269.html)
Line 216: 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).
== Use Case: Radio Stack ==
If you'd like to build a hardware radio stack and interface it to FG. There are a couple of ways you could attack this.
* Add a module (i.e. some code) inside FG that runs every frame. Your code would read all your hardware switches through whatever mechanism you have devised and update the FG internals. It would also send things like frequencies (probably cooked up in the best flavor for your hardware) so that the radio stack can display the frequencies.
* You could go for total separation and create an external application that talks directly to your hardware. That application could then communicate with FG via the "telnet" interface to read the necessary FG property values to update your hardware display, and write the switch/knob values back to FG as input to it's radio models.
There are probably a variety of other ways you could get this done, but these two approaches are the ones that jump to the front of my list. The first approach would require a bit more digging into the FG internals, the 2nd approach could have potentially sluggish performance. The "telnet" interface is the ultimate in flexibility, but is not anywhere close to high bandwidth.


== Links ==
== Links ==

Navigation menu