* tangyong -- Friday 15 December 2006 09:22:
> I found that there are many main() functions in the Flight Gear,

fgfs contains only one main(), and it's in src/Main/bootstrap.cxx.
All other main()s that you found are actually separate applications,
and of them only "terrasync" could be remotely considered a "subsystem"
(which communicates with fgfs exclusively via socket). Most of the
rest are standalone test applications or helpers that aren't meant
to run at the same time with fgfs (e.g. utils/fgadmin/) and don't
communicate with it.



> they communicate with each other through setting and getting the
> property tree nodes valus.

So-called "subsystems" are part of fgfs and linked into the executable.
They are managed by SimGear (see simgear/structure/subsystem_mgr.cxx).
Subsystems communicate in one of the following ways:

(a) properties: this was envisioned to be the main form, but this
    isn't really the case
(b) "export"-ed global variables/classes directly (for example
    SGShadowVolume and for communication with threads), or via ...
(c) global FGGlobals class, where many other classes/subsystems are
    registered and can be accessed from everywhere
    (see src/Main/globals.[ch]xx)

(Did I forget something?)

m.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to