Talk:Initializing Nasal early
Jump to navigation
Jump to search
Brainstorming
- bootstrapping: there's not just $FG_ROOT/Nasal, but also various XML files that support embedded code -especially GUI dialogs, need to check those, too -maybe via grep/sed to patch them accordingly
- subsystem-specific fgcommands should also be registered at the subsystem level via ::bind()
- provide at least two *.boot files, e.g. default.boot and fgcanvas.boot, common code should reside in 'include' files, to be used by any *.boot files
- check what's needed to disable/hide the GUI for a FlightGear Headless mode
- once we use separate SGSubsystemGroup instances, we need to edit monitor.nas to support different "root" groups - that's trivial, the PerformanceMonitor allocation should probably happen in SGSubsystemGroup::postinit() though, and not in fgCreateSubsystems() ...
- for better debugging/troubleshooting and feature scaling, we'll need to expose GL* query functions to Nasal
- investigate re-implementing the splash screen using Canvas/Nasal
- all subsystems should expose a signal via their ::init() method, so that listeners can respond accordingly
- consider exposing SGSubsystem* via Nasal/CppBind for complex systems like Bombable, Local weather, the ND etc?
- Philosopher mentioned that it'd be kinda cool to provide an example using HLA to do RPC between fgcanvas<->fgfs, this could very well be the foundation for improving FG performance, because Nasal could then be run outside the main loop/process
- Prepare FGNasalSys to support multiple instances (currently, it's a "broken singleton" by design)
Existing Initialization Scheme
Note need to track:
|
diff --git a/src/Main/globals.cxx b/src/Main/globals.cxx
index 718e70e..6af89e5 100644
--- a/src/Main/globals.cxx
+++ b/src/Main/globals.cxx
@@ -502,6 +502,7 @@ FGGlobals::add_subsystem (const char * name,
SGSubsystemMgr::GroupType type,
double min_time_sec)
{
+ SG_LOG(SG_GENERAL, SG_ALERT, "# Adding: " << name);
subsystem_mgr->add(name, subsystem, type, min_time_sec);
}
Subsystem Creation
- Adding: terrasync (session-persistent)
- Adding: time (session-persistent)
- Adding: sound
- Adding: prop-interpolator
- Adding: properties
- Adding: performance-mon
- Adding: http
- Adding: flight
- Adding: environment
- Adding: ephemeris
- Adding: systems
- Adding: instrumentation
- Adding: hud
- Adding: cockpit-displays
- Adding: xml-autopilot
- Adding: xml-proprules
- Adding: route-manager
- Adding: io
- Adding: logger
- Adding: gui
- Adding: Canvas
- Adding: CanvasGUI
- Adding: ATC
- Adding: mp
- Adding: ai-model
- Adding: submodel-mgr
- Adding: traffic-manager
- Adding: controls
- Adding: input
- Adding: replay
- Adding: history
- Adding: voice
- Adding: fgcom
- Adding: lighting (session-persistent)
- Adding: events (session-persistent)
- Adding: aircraft-model
- Adding: model-manager
- Adding: view-manager
- Adding: tile-manager
- Adding: nasal
Subsystem Initialization
Reset: cleanup
diff --git a/simgear/structure/subsystem_mgr.cxx b/simgear/structure/subsystem_mgr.cxx
index f9eb752..8cc6692 100644
--- a/simgear/structure/subsystem_mgr.cxx
+++ b/simgear/structure/subsystem_mgr.cxx
@@ -559,7 +559,7 @@ SGSubsystemMgr::remove(const char* name)
}
_subsystem_map.erase(s);
-
+ SG_LOG(SG_GENERAL, SG_ALERT, "# Deleting subsystem:" << name);
// tedious part - we don't know which group the subsystem belongs too
for (int i = 0; i < MAX_GROUPS; i++) {
if (_groups[i]->get_subsystem(name) != NULL) {
- Deleting subsystem:nasal
- Deleting subsystem:prop-interpolator
- Deleting subsystem:gui
- Deleting subsystem:properties
- Deleting subsystem:performance-mon
- Deleting subsystem:http
- Deleting subsystem:environment
- Deleting subsystem:ephemeris
- Deleting subsystem:xml-proprules
- Deleting subsystem:route-manager
- Deleting subsystem:io
- Deleting subsystem:logger
- Deleting subsystem:controls
- Deleting subsystem:input
- Deleting subsystem:replay
- Deleting subsystem:history
- Deleting subsystem:fgcom
- Deleting subsystem:flight
- Deleting subsystem:systems
- Deleting subsystem:instrumentation
- Deleting subsystem:xml-autopilot
- Deleting subsystem:ATC
- Deleting subsystem:mp
- Deleting subsystem:ai-model
- Deleting subsystem:submodel-mgr
- Deleting subsystem:traffic-manager
- Deleting subsystem:hud
- Deleting subsystem:cockpit-displays
- Deleting subsystem:Canvas
- Deleting subsystem:CanvasGUI
- Deleting subsystem:voice
- Deleting subsystem:aircraft-model
- Deleting subsystem:model-manager
- Deleting subsystem:view-manager
- Deleting subsystem:tile-manager
- Deleting subsystem:sound
Reset: re-initialization
- Adding: sound
- Adding: prop-interpolator
- Adding: properties
- Adding: performance-mon
- Adding: http
- Adding: flight
- Adding: environment
- Adding: ephemeris
- Adding: systems
- Adding: instrumentation
- Adding: hud
- Adding: cockpit-displays
- Adding: xml-autopilot
- Adding: xml-proprules
- Adding: route-manager
- Adding: io
- Adding: logger
- Adding: gui
- Adding: Canvas
- Adding: CanvasGUI
- Adding: ATC
- Adding: mp
- Adding: ai-model
- Adding: submodel-mgr
- Adding: traffic-manager
- Adding: controls
- Adding: input
- Adding: replay
- Adding: history
- Adding: voice
- Adding: fgcom
- Adding: aircraft-model
- Adding: model-manager
- Adding: view-manager
- Adding: tile-manager
- Adding: nasal