|
From: Melchior F. <mf...@ao...> - 2006-02-17 07:45:57
|
* dene maxwell -- Friday 17 February 2006 05:53:
> What port number for write ?
> What port number for read? (I prefer confirming protocols)
That's called TCP, then. Yes, that's possible. Just run fgfs with
--telnet=5500, then you can telnet into it and read/write to properties.
$ fgfs --telnet=5500
Then wait until it's running, and from another terminal window
telnet into it:
$ telnet localhost 5500
help
Valid commands are:
cd <dir> cd to a directory, '..' to move back
data switch to raw data mode
dump dump current state (in xml)
get <var> show the value of a parameter
help show this help message
ls [<dir>] list directory
prompt switch to interactive mode (default)
pwd display your current path
quit terminate connection
run <command> run built in command
set <var> <val> set <var> to a new <val>
show <var> synonym for get
And the whole telnet/socket connection can also be done
by a script. Look into scripts/ dir for examples.
> What format to access each property?
Start with "data"
Then read ... "get /position/longitude-deg"
"get /position/latitude-deg"
Or write ... "set /sim/foo 123"
and finally "quit"
This way you can do about everything. Read/write properties,
execute built-in commands, or transfer arbitrary Nasal code and
let fgfs execute it. You can even transfer whole dialogs and pop
them up in fgfs.
m.
|