On 18 Apr 2006, at 08:56, Erik Hofman wrote:
Unfortunately, I found a simpler way to get /some/ of what I need - I realized I can use the existing 'group' functionality to get things limping along. There is a classic 'forward looking comment' in that code (simgear/structure/subsystem_mgr.hxx): * This top-level subsystem will eventually manage all of the * subsystems in FlightGear: it broadcasts its life-cycle events * (init, bind, etc.) to all of the subsystems it manages. Subsystems * are grouped to guarantee order of initialization and execution -- * currently, the only two groups are INIT and GENERAL, but others * will appear in the future. Surprise, surprise, the only groups are /still/ INIT and GENERAL. My run-level proposal is very similar to the existing groups, so I need to think a bit more about how to extend the notion of groups to enable the things I mentioned in my original email (particularly the ability to run Nasal scripts when different run-levels are started). Run levels have a well defined ordering, whereas groups don't necessarily have one - except that in the current code, they /do/ have an ordering, from the enum. I will experiment and see what makes sense without changing too much. If people know of edge-cases that the current code doesn't handle (I know of a few places where people use timers to wait a couple of seconds after sim-startup before doing 'something'), it'd be good to mention those here - I suspect many of them could be handled more directly by a run-level system. H&H James PS - I have the existing airports dialog box appearing during startup now; I'll send along a screenshot when I get home. |
- [Flightgear-devel] Subsystem run-levels James Turner
- Re: [Flightgear-devel] Subsystem run-levels Erik Hofman
- Re: [Flightgear-devel] Subsystem run-levels James Turner
- [Flightgear-devel] Re: Subsystem run-levels Melchior FRANZ
- Re: [Flightgear-devel] Re: Subsystem run-l... James Turner
- [Flightgear-devel] Re: Subsystem run-level... Melchior FRANZ
- Re: [Flightgear-devel] Re: Subsystem ... James Turner
- [Flightgear-devel] Re: Subsystem ... Melchior FRANZ
- Re: [Flightgear-devel] Re: Su... James Turner
- [Flightgear-devel] Re: Subsys... Melchior FRANZ
- [Flightgear-devel] Re: Subsys... Melchior FRANZ
- [Flightgear-devel] Re: Subsys... Melchior FRANZ
- Re: [Flightgear-devel] Re: Su... James Turner