First, let me point out the new telnet server is *very* nice.  Bernie
has rewritten it based on the plib net libs.  It can handle multiple
concurrent connections.  This is a big improvement!

Along with this, Bernie has also provided a demo python script that
shows how you can use the telnet interface to remotely interact with
and control a FlightGear application.  In the cvs source (run "cvs
update -d" of course) look in $toplevel/scripts/python for the demo
script.

So, to try this out run:

    fgfs --telnet=5500
    python demo.py

Then watch the action.  This is a demo of functionality so you aren't
going to see any earth shattering visual effects.  But, it's very cool
from the geeky perspective of running an external script which has
complete control over flightgear.

Bernie, on the subjects of building additional commands into the
telnet interface, I agree with Melchior.  I'd rather not see the
telnet interface being crammed with a bunch of extra commands that
only the telnet interface knows about.  I haven't looked at this in a
while, but the property manager should be able to manage "commands" as
well as "values".  The command management is a bit of a hack (kind of
but not really) but since we can tie variables to funtions (usually
getters and setters) we can expose additional functionality through
the property interface.

I think that would be the more appropriate way to do this and to
develop additional commands.  This way, these commands will be
available (and consistant) for any other interface mechanisms
including joystick, keyboard, mouse in addition to remote scripts or
web browsers, etc.

Regards,

Curt.


Melchior FRANZ writes:
> The new telnet server has really become nice. It's great to be able
> to connect more than just once.   :-)
> 
> But I don't like the new commands:
> 
>   view set <n>     display view 'n'
>   view get         return current view index
>   view current     return current view index
> 
> Why bloat the interface when this can easily be done with the normal
> "set" and "get" commands? "view current" is not even consistent. It
> "get"s a simple value. This should be:  "get /sim/view/current" or
> something like that.
> 
> Comments in the telnet.cxx file leave me even more worried:
> 
>    * TODO: possible future commands:
>    *   panel visible 0|1
>    *   panel height -> h, Retrieve panel height
>    *   panel width -> w, Retrieve panel width
>    *   panel xoffset -> x, Retrieve panel x offset
>    *   panel yoffset -> y, Retrieve panel y offset
>    [and lots more]
> 
> Please don't let that happen! Make this "get /sim/panel/visible" etc.
> There's no need for dozens of commands that do all just "set" and "get"
> properties. That's useless bloat and we'll lose consistency with the http
> interface. Don't re-invent the property system! The only thing that might
> make sense is:
>   
>   view next        display next view
>   view prev        display prev view
> 
> But I'd rather drop them, too, and make some "write only property":
> "set /sim/view/next true" would then always switch to the next view,
> while "get /sim/view/next" would always return false.
> 
> m.   :-(
> 
> _______________________________________________
> Flightgear-devel mailing list
> [EMAIL PROTECTED]
> http://mail.flightgear.org/mailman/listinfo/flightgear-devel

-- 
Curtis Olson   IVLab / HumanFIRST Program       FlightGear Project
Twin Cities    [EMAIL PROTECTED]                  [EMAIL PROTECTED]
Minnesota      http://www.menet.umn.edu/~curt   http://www.flightgear.org

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to