Hi mithun,

The process to get/set properties at runtime can be done opening a socket connection with machine that flightgear is running, throught props specified port at flightgear startup.

After do this, write to the socket the command that you want (like in telnet session).

Eg. (See the code below in abstract language)

// To write in property
socket = open_socket( "127.0.0.1", 5501 );
write_to_socket( socket, "set /autopilot/settings/target-altitude-ft 3000\n" );
close_socket( socket );

// To read property
Var buffer : Array[1024] of char;

socket = open_socket( "127.0.0.1", 5501 );
write_to_socket( socket, "get /autopilot/settings/target-altitude-ft 3000\n" );
read_from_socket( socket, buffer );  // The data returned is the value of property that you want
close_socket( socket );


I've done a manager like this in C++ (GCC) to manage properties at runtime, unfortunately this manager is copyright protected then I can't post here, but the basic idea is like that.

Leidson Campos A.Ferreira
PlanetaMessenger.org
Java Universal Messenger

On 9/12/06, mithun patel < [EMAIL PROTECTED]> wrote:
hi everyone

1- has anyone written a script (in C or C++ preferably) that can run in the background and access the properties that are being sent to a socket port and store these in variables.  i want to be able to read these, process them and send them on/print them to stdout etc

2- also something similar that interfaces with the http protocol could be sufficient (so i can work with variables in a program rather than using the browser interface)

if not, can anyone explain how i would go about doing this.  there are many files that are included within included files etc during the compiling process and i am unsure as to what i need to write and link with in order to gain access to the variables in my own application.

thanks
mithun

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to