diff --git a/src/AIModel/submodel.hxx b/src/AIModel/submodel.hxx index 4557ffc7b..b368f06f5 100644 --- a/src/AIModel/submodel.hxx +++ b/src/AIModel/submodel.hxx @@ -104,6 +104,9 @@ public: void unbind() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "submodel-mgr"; } + void load(); private: diff --git a/src/ATC/atc_mgr.hxx b/src/ATC/atc_mgr.hxx index fb1d50b5d..aa058b43d 100644 --- a/src/ATC/atc_mgr.hxx +++ b/src/ATC/atc_mgr.hxx @@ -57,6 +57,9 @@ public: void shutdown() override; void update(double time) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "ATC"; } + void addController(FGATCController *controller); void removeController(FGATCController* controller); }; diff --git a/src/Aircraft/FlightHistory.hxx b/src/Aircraft/FlightHistory.hxx index b791cf89d..7a3991cc8 100644 --- a/src/Aircraft/FlightHistory.hxx +++ b/src/Aircraft/FlightHistory.hxx @@ -63,6 +63,9 @@ public: void shutdown() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "history"; } + PagedPathForHistory_ptr pagedPathForHistory(size_t max_entries, size_t newerThan = 0) const; /** * retrieve the path, collapsing segments shorter than diff --git a/src/Autopilot/autopilot.cxx b/src/Autopilot/autopilot.cxx index 5bc1a00ae..1e5714cfc 100644 --- a/src/Autopilot/autopilot.cxx +++ b/src/Autopilot/autopilot.cxx @@ -54,6 +54,9 @@ public: inner = simgear::StateMachine::createFromPlist(&cfg, &props_root); } + // Subsystem identification. + static const char* staticSubsystemClassId() { return "state-machine"; } + virtual bool configure( const std::string & nodeName, SGPropertyNode_ptr config) { return false; } diff --git a/src/Autopilot/autopilot.hxx b/src/Autopilot/autopilot.hxx index fa6bf0945..7100f7a99 100644 --- a/src/Autopilot/autopilot.hxx +++ b/src/Autopilot/autopilot.hxx @@ -45,6 +45,9 @@ public: void unbind() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "autopilot"; } + void set_serviceable( bool value ) { _serviceable = value; } bool is_serviceable() const { return _serviceable; } diff --git a/src/Autopilot/autopilotgroup.cxx b/src/Autopilot/autopilotgroup.cxx index b41ee4377..d56d1d88a 100644 --- a/src/Autopilot/autopilotgroup.cxx +++ b/src/Autopilot/autopilotgroup.cxx @@ -53,6 +53,9 @@ public: InitStatus incrementalInit() override; void reinit() override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "xml-autopilot-group"; } + virtual void addAutopilot( const std::string& name, SGPropertyNode_ptr apNode, SGPropertyNode_ptr config ); diff --git a/src/Autopilot/autopilotgroup.hxx b/src/Autopilot/autopilotgroup.hxx index 56ea4fc79..fd6875906 100644 --- a/src/Autopilot/autopilotgroup.hxx +++ b/src/Autopilot/autopilotgroup.hxx @@ -31,6 +31,9 @@ class FGXMLAutopilotGroup : public SGSubsystemGroup { public: + // Subsystem identification. + static const char* staticSubsystemClassId() { return "xml-rules"; } + static FGXMLAutopilotGroup * createInstance(const std::string& nodeName); void addAutopilotFromFile( const std::string & name, SGPropertyNode_ptr apNode, const char * path ); diff --git a/src/Autopilot/digitalfilter.hxx b/src/Autopilot/digitalfilter.hxx index 6a497d35c..c1028e53b 100644 --- a/src/Autopilot/digitalfilter.hxx +++ b/src/Autopilot/digitalfilter.hxx @@ -62,6 +62,9 @@ public: DigitalFilter(); ~DigitalFilter(); + // Subsystem identification. + static const char* staticSubsystemClassId() { return "filter"; } + virtual bool configure( SGPropertyNode& prop_root, SGPropertyNode& cfg ); }; diff --git a/src/Autopilot/flipflop.hxx b/src/Autopilot/flipflop.hxx index 8c4d73667..214ebd4e4 100644 --- a/src/Autopilot/flipflop.hxx +++ b/src/Autopilot/flipflop.hxx @@ -66,6 +66,8 @@ public: class FlipFlop : public Logic { public: + // Subsystem identification. + static const char* staticSubsystemClassId() { return "flipflop"; } protected: /** diff --git a/src/Autopilot/logic.hxx b/src/Autopilot/logic.hxx index 28407445b..aec79dbe5 100644 --- a/src/Autopilot/logic.hxx +++ b/src/Autopilot/logic.hxx @@ -39,6 +39,9 @@ public: void set_output( bool value ); bool get_output() const; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "logic"; } + protected: void update( bool firstTime, double dt ); }; diff --git a/src/Autopilot/pidcontroller.hxx b/src/Autopilot/pidcontroller.hxx index 2dce7cfd4..5481423ab 100644 --- a/src/Autopilot/pidcontroller.hxx +++ b/src/Autopilot/pidcontroller.hxx @@ -70,6 +70,9 @@ public: PIDController(); ~PIDController() {} + // Subsystem identification. + static const char* staticSubsystemClassId() { return "pid-controller"; } + void update( bool firstTime, double dt ); }; diff --git a/src/Autopilot/pisimplecontroller.hxx b/src/Autopilot/pisimplecontroller.hxx index b03e06408..72bcdd802 100644 --- a/src/Autopilot/pisimplecontroller.hxx +++ b/src/Autopilot/pisimplecontroller.hxx @@ -57,6 +57,9 @@ public: PISimpleController(); ~PISimpleController() {} + // Subsystem identification. + static const char* staticSubsystemClassId() { return "pi-simple-controller"; } + void update( bool firstTime, double dt ); }; diff --git a/src/Autopilot/predictor.hxx b/src/Autopilot/predictor.hxx index 0fe743f69..103192059 100644 --- a/src/Autopilot/predictor.hxx +++ b/src/Autopilot/predictor.hxx @@ -61,6 +61,9 @@ public: Predictor(); ~Predictor() {} + // Subsystem identification. + static const char* staticSubsystemClassId() { return "predict-simple"; } + void update( bool firstTime, double dt ); }; diff --git a/src/Canvas/gui_mgr.hxx b/src/Canvas/gui_mgr.hxx index 68be7b5eb..f44c3d200 100644 --- a/src/Canvas/gui_mgr.hxx +++ b/src/Canvas/gui_mgr.hxx @@ -44,6 +44,9 @@ public: void shutdown() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "CanvasGUI"; } + simgear::canvas::WindowPtr createWindow(const std::string& name = ""); /** diff --git a/src/Cockpit/NavDisplay.hxx b/src/Cockpit/NavDisplay.hxx index c309e614d..e5625a986 100644 --- a/src/Cockpit/NavDisplay.hxx +++ b/src/Cockpit/NavDisplay.hxx @@ -66,6 +66,9 @@ public: void init() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "navigation-display"; } + void invalidatePositionedCache() { _cachedItemsValid = false; diff --git a/src/Cockpit/agradar.hxx b/src/Cockpit/agradar.hxx index 184655a6b..f919584d9 100644 --- a/src/Cockpit/agradar.hxx +++ b/src/Cockpit/agradar.hxx @@ -41,6 +41,9 @@ public: void init() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "air-ground-radar"; } + void setUserPos(); void setUserVec(double az, double el); void update_terrain(); diff --git a/src/Cockpit/cockpitDisplayManager.hxx b/src/Cockpit/cockpitDisplayManager.hxx index 4ac1419be..d051dac04 100644 --- a/src/Cockpit/cockpitDisplayManager.hxx +++ b/src/Cockpit/cockpitDisplayManager.hxx @@ -43,6 +43,9 @@ public: void init() override; InitStatus incrementalInit() override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "cockpit-displays"; } + private: bool build (SGPropertyNode* config_props); diff --git a/src/Cockpit/groundradar.hxx b/src/Cockpit/groundradar.hxx index a69f58a63..ca93d4f19 100644 --- a/src/Cockpit/groundradar.hxx +++ b/src/Cockpit/groundradar.hxx @@ -41,6 +41,9 @@ class GroundRadar : public SGSubsystem, private FGODGauge { public: + // Subsystem identification. + static const char* staticSubsystemClassId() { return "groundradar"; } + static const int TextureHalfSize = 256; GroundRadar(SGPropertyNode* node); virtual ~GroundRadar(); diff --git a/src/Cockpit/wxradar.hxx b/src/Cockpit/wxradar.hxx index 5a4fe7609..33df8a37c 100644 --- a/src/Cockpit/wxradar.hxx +++ b/src/Cockpit/wxradar.hxx @@ -49,6 +49,9 @@ public: void shutdown() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "radar"; } + virtual void valueChanged(SGPropertyNode *); protected: diff --git a/src/Environment/environment_ctrl.cxx b/src/Environment/environment_ctrl.cxx index a50d569d0..810dc4e7a 100644 --- a/src/Environment/environment_ctrl.cxx +++ b/src/Environment/environment_ctrl.cxx @@ -114,6 +114,9 @@ public: void unbind() override; void update(double delta_time_sec) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "layer-interpolate-controller"; } + private: SGPropertyNode_ptr _rootNode; bool _enabled; diff --git a/src/Environment/environment_mgr.hxx b/src/Environment/environment_mgr.hxx index 71dd1f649..ab4c5812a 100644 --- a/src/Environment/environment_mgr.hxx +++ b/src/Environment/environment_mgr.hxx @@ -54,6 +54,9 @@ public: void unbind() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "environment"; } + /** * Get the environment information for the plane's current position. */ diff --git a/src/Environment/magvarmanager.hxx b/src/Environment/magvarmanager.hxx index 73c4ac32a..c024c5dc8 100644 --- a/src/Environment/magvarmanager.hxx +++ b/src/Environment/magvarmanager.hxx @@ -40,6 +40,9 @@ public: void unbind() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "magvar"; } + private: std::unique_ptr _magVar; diff --git a/src/Environment/precipitation_mgr.hxx b/src/Environment/precipitation_mgr.hxx index c71f01ab3..f634da135 100644 --- a/src/Environment/precipitation_mgr.hxx +++ b/src/Environment/precipitation_mgr.hxx @@ -51,6 +51,9 @@ public: void unbind() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "precipitation"; } + void setupSceneGraph(void); void setPrecipitationLevel(double l); }; diff --git a/src/Environment/realwx_ctrl.cxx b/src/Environment/realwx_ctrl.cxx index c7066fd97..7e255e42f 100644 --- a/src/Environment/realwx_ctrl.cxx +++ b/src/Environment/realwx_ctrl.cxx @@ -412,6 +412,9 @@ public: { } + // Subsystem identification. + static const char* staticSubsystemClassId() { return "noaa-metar-real-wx-controller"; } + private: std::string noaa_base_url; }; diff --git a/src/Environment/ridge_lift.hxx b/src/Environment/ridge_lift.hxx index 5518f1668..8f82a51e7 100644 --- a/src/Environment/ridge_lift.hxx +++ b/src/Environment/ridge_lift.hxx @@ -50,6 +50,9 @@ public: void unbind() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "ridgelift"; } + inline double getStrength() const { return strength; }; inline double get_probe_elev_m( int index ) const { return probe_elev_m[index]; }; diff --git a/src/Environment/terrainsampler.cxx b/src/Environment/terrainsampler.cxx index 6179b0700..d8b0ac8b1 100644 --- a/src/Environment/terrainsampler.cxx +++ b/src/Environment/terrainsampler.cxx @@ -57,6 +57,9 @@ public: void unbind() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "area"; } + int getElevationHistogramStep() const { return _elevationHistogramStep; } void setElevationHistograpStep( int value ) { _elevationHistogramStep = value > 0 ? value : 500; @@ -333,6 +336,9 @@ public: void unbind() override; void update(double delta_time_sec) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "terrain-sampler"; } + private: inline string areaSubsystemName( unsigned i ) { ostringstream name; diff --git a/src/FDM/ExternalNet/ExternalNet.hxx b/src/FDM/ExternalNet/ExternalNet.hxx index 066443c85..06874ff62 100644 --- a/src/FDM/ExternalNet/ExternalNet.hxx +++ b/src/FDM/ExternalNet/ExternalNet.hxx @@ -57,6 +57,9 @@ public: // Subsystem API. void init() override; void update(double dt) override; + + // Subsystem identification. + static const char* staticSubsystemClassId() { return "network"; } }; #endif // _EXTERNAL_NET_HXX diff --git a/src/FDM/ExternalPipe/ExternalPipe.hxx b/src/FDM/ExternalPipe/ExternalPipe.hxx index 7ca5a2366..ecf366467 100644 --- a/src/FDM/ExternalPipe/ExternalPipe.hxx +++ b/src/FDM/ExternalPipe/ExternalPipe.hxx @@ -73,6 +73,9 @@ public: // Subsystem API. void init() override; void update(double dt) override; + + // Subsystem identification. + static const char* staticSubsystemClassId() { return "pipe"; } }; #endif // _EXTERNAL_PIPE_HXX diff --git a/src/FDM/JSBSim/JSBSim.hxx b/src/FDM/JSBSim/JSBSim.hxx index aac75222c..b601f490d 100644 --- a/src/FDM/JSBSim/JSBSim.hxx +++ b/src/FDM/JSBSim/JSBSim.hxx @@ -114,6 +114,9 @@ public: void unbind() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "jsb"; } + /// copy FDM state to LaRCsim structures bool copy_to_JSBsim(); diff --git a/src/FDM/LaRCsim/LaRCsim.hxx b/src/FDM/LaRCsim/LaRCsim.hxx index 01f2fe81c..47781df16 100644 --- a/src/FDM/LaRCsim/LaRCsim.hxx +++ b/src/FDM/LaRCsim/LaRCsim.hxx @@ -52,6 +52,9 @@ public: void init() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "larcsim"; } + // copy FDM state to LaRCsim structures bool copy_to_LaRCsim(); diff --git a/src/FDM/NullFDM.hxx b/src/FDM/NullFDM.hxx index 700cf5b2e..f909c8eb0 100644 --- a/src/FDM/NullFDM.hxx +++ b/src/FDM/NullFDM.hxx @@ -38,6 +38,9 @@ public: // Subsystem API. void init() override; void update(double dt) override; + + // Subsystem identification. + static const char* staticSubsystemClassId() { return "null"; } }; #endif // _NULLFDM_HXX diff --git a/src/FDM/SP/ACMS.hxx b/src/FDM/SP/ACMS.hxx index 566014324..a26bd39cc 100644 --- a/src/FDM/SP/ACMS.hxx +++ b/src/FDM/SP/ACMS.hxx @@ -38,6 +38,9 @@ public: void init() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "acms"; } + private: SGPropertyNode_ptr _alt, _speed, _climb_rate; SGPropertyNode_ptr _pitch, _roll, _heading; diff --git a/src/FDM/SP/ADA.hxx b/src/FDM/SP/ADA.hxx index 061f607e1..0a2006d67 100644 --- a/src/FDM/SP/ADA.hxx +++ b/src/FDM/SP/ADA.hxx @@ -76,6 +76,9 @@ public: // Subsystem API. void init() override; void update(double dt) override; + + // Subsystem identification. + static const char* staticSubsystemClassId() { return "ada"; } }; #endif // _ADA_HXX diff --git a/src/FDM/SP/AISim.hpp b/src/FDM/SP/AISim.hpp index 1636c53bf..ef51da69b 100644 --- a/src/FDM/SP/AISim.hpp +++ b/src/FDM/SP/AISim.hpp @@ -79,6 +79,9 @@ public: void init() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "aisim"; } + bool load(std::string path); #ifdef ENABLE_SP_FDM diff --git a/src/FDM/SP/Balloon.h b/src/FDM/SP/Balloon.h index 42a07caa5..dc64ff76c 100644 --- a/src/FDM/SP/Balloon.h +++ b/src/FDM/SP/Balloon.h @@ -67,6 +67,9 @@ public: void init() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "balloon"; } + // copy FDM state to BalloonSim structures bool copy_to_BalloonSim(); diff --git a/src/FDM/SP/MagicCarpet.hxx b/src/FDM/SP/MagicCarpet.hxx index 92ea7d23d..8ae2b2799 100644 --- a/src/FDM/SP/MagicCarpet.hxx +++ b/src/FDM/SP/MagicCarpet.hxx @@ -37,6 +37,9 @@ public: // Subsystem API. void init() override; void update(double dt) override; + + // Subsystem identification. + static const char* staticSubsystemClassId() { return "magic"; } }; #endif // _MAGICCARPET_HXX diff --git a/src/FDM/UFO.hxx b/src/FDM/UFO.hxx index d1e08d807..ba0cb62e9 100644 --- a/src/FDM/UFO.hxx +++ b/src/FDM/UFO.hxx @@ -67,6 +67,9 @@ public: // Subsystem API. void init() override; void update(double dt) override; + + // Subsystem identification. + static const char* staticSubsystemClassId() { return "ufo"; } }; #endif // _UFO_HXX diff --git a/src/FDM/YASim/YASim.hxx b/src/FDM/YASim/YASim.hxx index 2f23a1638..37bfa6c4d 100644 --- a/src/FDM/YASim/YASim.hxx +++ b/src/FDM/YASim/YASim.hxx @@ -18,6 +18,9 @@ public: void reinit() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "yasim"; } + private: void report(); void copyFromYASim(); diff --git a/src/Input/FGHIDEventInput.hxx b/src/Input/FGHIDEventInput.hxx index cbfe09cbc..8f9d39e01 100644 --- a/src/Input/FGHIDEventInput.hxx +++ b/src/Input/FGHIDEventInput.hxx @@ -47,7 +47,7 @@ public: void update(double dt) override; // Subsystem identification. - static const char* staticSubsystemClassId() { return "input-hid"; } + static const char* staticSubsystemClassId() { return "input-event-hid"; } private: class FGHIDEventInputPrivate; diff --git a/src/Input/FGJoystickInput.hxx b/src/Input/FGJoystickInput.hxx index aa1ce1090..642950d6f 100644 --- a/src/Input/FGJoystickInput.hxx +++ b/src/Input/FGJoystickInput.hxx @@ -49,6 +49,9 @@ public: void reinit() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "input-joystick"; } + static const int MAX_JOYSTICKS = 16; static const int MAX_JOYSTICK_AXES = _JS_MAX_AXES; static const int MAX_JOYSTICK_BUTTONS = 32; diff --git a/src/Input/FGKeyboardInput.hxx b/src/Input/FGKeyboardInput.hxx index fa93ab077..82e21aad1 100644 --- a/src/Input/FGKeyboardInput.hxx +++ b/src/Input/FGKeyboardInput.hxx @@ -51,6 +51,9 @@ public: void unbind() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "input-keyboard"; } + static const int MAX_KEYS = 1024; private: diff --git a/src/Input/FGLinuxEventInput.hxx b/src/Input/FGLinuxEventInput.hxx index db6696ca4..ac8af1e8a 100644 --- a/src/Input/FGLinuxEventInput.hxx +++ b/src/Input/FGLinuxEventInput.hxx @@ -75,6 +75,9 @@ public: void postinit() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "input-event"; } + protected: }; diff --git a/src/Input/FGMacOSXEventInput.hxx b/src/Input/FGMacOSXEventInput.hxx index c6432e2d6..4dd2ecd4d 100644 --- a/src/Input/FGMacOSXEventInput.hxx +++ b/src/Input/FGMacOSXEventInput.hxx @@ -55,6 +55,9 @@ public: void shutdown() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "input-event"; } + private: friend class FGMacOSXEventInputPrivate; diff --git a/src/Instrumentation/HUD/HUD.hxx b/src/Instrumentation/HUD/HUD.hxx index 81368587b..0999f2fbe 100644 --- a/src/Instrumentation/HUD/HUD.hxx +++ b/src/Instrumentation/HUD/HUD.hxx @@ -127,6 +127,9 @@ public: void reinit() override; void update(double) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "hud"; } + // called from Main/renderer.cxx to draw 2D and 3D HUD void draw(osg::State&); diff --git a/src/Instrumentation/KLN89/kln89.hxx b/src/Instrumentation/KLN89/kln89.hxx index 00468d5e4..04cc6436a 100644 --- a/src/Instrumentation/KLN89/kln89.hxx +++ b/src/Instrumentation/KLN89/kln89.hxx @@ -102,6 +102,9 @@ public: void unbind() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "KLN89"; } + // Set Units // m if true, ft if false inline void SetAltUnitsSI(bool b) { _altUnits = (b ? GPS_ALT_UNITS_M : GPS_ALT_UNITS_FT); } diff --git a/src/Instrumentation/adf.hxx b/src/Instrumentation/adf.hxx index 01ddb0775..b7d90e905 100644 --- a/src/Instrumentation/adf.hxx +++ b/src/Instrumentation/adf.hxx @@ -47,6 +47,9 @@ public: void init() override; void update(double delta_time_sec) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "adf"; } + private: void set_bearing (double delta_time_sec, double bearing); diff --git a/src/Instrumentation/airspeed_indicator.hxx b/src/Instrumentation/airspeed_indicator.hxx index f8b0a135b..9ecf11fb6 100644 --- a/src/Instrumentation/airspeed_indicator.hxx +++ b/src/Instrumentation/airspeed_indicator.hxx @@ -45,6 +45,9 @@ public: void reinit() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "airspeed-indicator"; } + private: void computeMach(); diff --git a/src/Instrumentation/altimeter.hxx b/src/Instrumentation/altimeter.hxx index 26278fda4..67d094958 100644 --- a/src/Instrumentation/altimeter.hxx +++ b/src/Instrumentation/altimeter.hxx @@ -40,6 +40,9 @@ public: void unbind() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "altimeter"; } + double getSettingInHg() const; void setSettingInHg( double value ); double getSettingHPa() const; diff --git a/src/Instrumentation/attitude_indicator.hxx b/src/Instrumentation/attitude_indicator.hxx index 0ca4a9e69..18d161276 100644 --- a/src/Instrumentation/attitude_indicator.hxx +++ b/src/Instrumentation/attitude_indicator.hxx @@ -49,6 +49,9 @@ public: void unbind() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "attitude-indicator"; } + private: std::string _name; int _num; diff --git a/src/Instrumentation/clock.hxx b/src/Instrumentation/clock.hxx index 2c986fecf..791e98790 100644 --- a/src/Instrumentation/clock.hxx +++ b/src/Instrumentation/clock.hxx @@ -36,6 +36,9 @@ public: void init() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "clock"; } + private: std::string _name; unsigned int _num; diff --git a/src/Instrumentation/commradio.hxx b/src/Instrumentation/commradio.hxx index e3bdeb5ae..55d25805e 100644 --- a/src/Instrumentation/commradio.hxx +++ b/src/Instrumentation/commradio.hxx @@ -40,6 +40,9 @@ typedef SGSharedPtr SignalQualityComputerRef; class CommRadio : public AbstractInstrument { public: + // Subsystem identification. + static const char* staticSubsystemClassId() { return "comm-radio"; } + static SGSubsystem * createInstance( SGPropertyNode_ptr rootNode ); }; diff --git a/src/Instrumentation/dme.hxx b/src/Instrumentation/dme.hxx index 5f6d76153..632834ed6 100644 --- a/src/Instrumentation/dme.hxx +++ b/src/Instrumentation/dme.hxx @@ -43,6 +43,9 @@ public: void reinit() override; void update(double delta_time_sec) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "dme"; } + private: void clear(); diff --git a/src/Instrumentation/gps.hxx b/src/Instrumentation/gps.hxx index 97b522531..69151ef3e 100644 --- a/src/Instrumentation/gps.hxx +++ b/src/Instrumentation/gps.hxx @@ -71,6 +71,9 @@ public: void unbind() override; void update(double delta_time_sec) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "gps"; } + // RNAV interface virtual SGGeod position(); virtual double trackDeg(); diff --git a/src/Instrumentation/gsdi.hxx b/src/Instrumentation/gsdi.hxx index 15c1019b4..a49f223bb 100644 --- a/src/Instrumentation/gsdi.hxx +++ b/src/Instrumentation/gsdi.hxx @@ -51,6 +51,9 @@ public: void init() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "gsdi"; } + private: std::string _name; unsigned int _num; diff --git a/src/Instrumentation/heading_indicator.hxx b/src/Instrumentation/heading_indicator.hxx index 54d9bb55c..7b106330d 100644 --- a/src/Instrumentation/heading_indicator.hxx +++ b/src/Instrumentation/heading_indicator.hxx @@ -46,6 +46,9 @@ public: void unbind() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "heading-indicator"; } + private: Gyro _gyro; double _last_heading_deg; diff --git a/src/Instrumentation/heading_indicator_dg.hxx b/src/Instrumentation/heading_indicator_dg.hxx index 1047d90a1..029a2cd2b 100644 --- a/src/Instrumentation/heading_indicator_dg.hxx +++ b/src/Instrumentation/heading_indicator_dg.hxx @@ -44,6 +44,9 @@ public: void unbind() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "heading-indicator-dg"; }; + private: Gyro _gyro; double _last_heading_deg, _last_indicated_heading_dg; diff --git a/src/Instrumentation/heading_indicator_fg.hxx b/src/Instrumentation/heading_indicator_fg.hxx index a3dad5955..2868342e9 100644 --- a/src/Instrumentation/heading_indicator_fg.hxx +++ b/src/Instrumentation/heading_indicator_fg.hxx @@ -46,6 +46,9 @@ public: void unbind() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "heading-indicator-fg"; } + private: Gyro _gyro; double _last_heading_deg; diff --git a/src/Instrumentation/inst_vertical_speed_indicator.hxx b/src/Instrumentation/inst_vertical_speed_indicator.hxx index 2762f897e..7bf8aa59b 100644 --- a/src/Instrumentation/inst_vertical_speed_indicator.hxx +++ b/src/Instrumentation/inst_vertical_speed_indicator.hxx @@ -59,6 +59,9 @@ public: void reinit() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "inst-vertical-speed-indicator"; } + private: std::string _name; int _num; diff --git a/src/Instrumentation/instrument_mgr.hxx b/src/Instrumentation/instrument_mgr.hxx index ec42e43f9..43cbf00bc 100644 --- a/src/Instrumentation/instrument_mgr.hxx +++ b/src/Instrumentation/instrument_mgr.hxx @@ -35,6 +35,9 @@ public: void init() override; InitStatus incrementalInit() override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "instrumentation"; } + private: bool build (SGPropertyNode* config_props); diff --git a/src/Instrumentation/kr_87.hxx b/src/Instrumentation/kr_87.hxx index 2dee3d941..ef14e0c6e 100644 --- a/src/Instrumentation/kr_87.hxx +++ b/src/Instrumentation/kr_87.hxx @@ -115,6 +115,9 @@ public: void unbind() override; void update(double dt_sec) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "KR-87"; } + // Update nav/adf radios based on current postition void search (); diff --git a/src/Instrumentation/mag_compass.hxx b/src/Instrumentation/mag_compass.hxx index f5d06edc7..ff81dba21 100644 --- a/src/Instrumentation/mag_compass.hxx +++ b/src/Instrumentation/mag_compass.hxx @@ -50,6 +50,9 @@ public: void reinit() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "magnetic-compass"; } + private: double _rate_degps; diff --git a/src/Instrumentation/marker_beacon.hxx b/src/Instrumentation/marker_beacon.hxx index d52d06b2e..c2d91dd03 100644 --- a/src/Instrumentation/marker_beacon.hxx +++ b/src/Instrumentation/marker_beacon.hxx @@ -73,6 +73,9 @@ public: void unbind() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "marker-beacon"; } + void search (); // Marker Beacon Accessors diff --git a/src/Instrumentation/mk_viii.hxx b/src/Instrumentation/mk_viii.hxx index 35b7d9ada..e65c58795 100644 --- a/src/Instrumentation/mk_viii.hxx +++ b/src/Instrumentation/mk_viii.hxx @@ -1379,6 +1379,9 @@ public: void init() override; void unbind() override; void update(double dt) override; + + // Subsystem identification. + static const char* staticSubsystemClassId() { return "mk-viii"; } }; #ifdef _MSC_VER diff --git a/src/Instrumentation/mrg.hxx b/src/Instrumentation/mrg.hxx index 6e517a75f..08a705810 100644 --- a/src/Instrumentation/mrg.hxx +++ b/src/Instrumentation/mrg.hxx @@ -47,6 +47,9 @@ public: void unbind() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "master-reference-gyro"; } + private: static const double gravity; //conversion factor diff --git a/src/Instrumentation/navradio.hxx b/src/Instrumentation/navradio.hxx index bebbed7c0..3e2b39e04 100644 --- a/src/Instrumentation/navradio.hxx +++ b/src/Instrumentation/navradio.hxx @@ -178,6 +178,9 @@ public: void reinit() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "old-navradio"; } + // Update nav/adf radios based on current postition void search (); void updateNav(); diff --git a/src/Instrumentation/newnavradio.hxx b/src/Instrumentation/newnavradio.hxx index 2e64579b4..e72a24d48 100644 --- a/src/Instrumentation/newnavradio.hxx +++ b/src/Instrumentation/newnavradio.hxx @@ -31,6 +31,9 @@ namespace Instrumentation { class NavRadio : public SGSubsystem { public: + // Subsystem identification. + static const char* staticSubsystemClassId() { return "nav-radio"; } + static SGSubsystem * createInstance( SGPropertyNode_ptr rootNode ); }; diff --git a/src/Instrumentation/rad_alt.hxx b/src/Instrumentation/rad_alt.hxx index 754857af9..2cc1b5f82 100644 --- a/src/Instrumentation/rad_alt.hxx +++ b/src/Instrumentation/rad_alt.hxx @@ -38,6 +38,9 @@ public: void init() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "radar-altimeter"; } + private: void update_altitude(); void updateSetHeight(); diff --git a/src/Instrumentation/slip_skid_ball.hxx b/src/Instrumentation/slip_skid_ball.hxx index 6d808dca5..145ec45d2 100644 --- a/src/Instrumentation/slip_skid_ball.hxx +++ b/src/Instrumentation/slip_skid_ball.hxx @@ -39,6 +39,9 @@ public: void reinit() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "slip-skid-ball"; } + private: std::string _name; int _num; diff --git a/src/Instrumentation/tacan.hxx b/src/Instrumentation/tacan.hxx index 4763d8449..071f9ec31 100644 --- a/src/Instrumentation/tacan.hxx +++ b/src/Instrumentation/tacan.hxx @@ -43,6 +43,9 @@ public: void reinit() override; void update(double delta_time_sec) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "tacan"; } + private: void disabled(bool force = false); diff --git a/src/Instrumentation/tcas.hxx b/src/Instrumentation/tcas.hxx index 6d768862d..1f0c5d543 100644 --- a/src/Instrumentation/tcas.hxx +++ b/src/Instrumentation/tcas.hxx @@ -388,6 +388,9 @@ public: void unbind() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "tcas"; } + /* configuration options */ int _verticalRange; int _lateralRange; diff --git a/src/Instrumentation/transponder.hxx b/src/Instrumentation/transponder.hxx index 4a81fb0aa..b14330c56 100644 --- a/src/Instrumentation/transponder.hxx +++ b/src/Instrumentation/transponder.hxx @@ -40,6 +40,9 @@ public: void unbind() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "transponder"; } + protected: bool isPowerSwitchOn() const override; diff --git a/src/Instrumentation/turn_indicator.hxx b/src/Instrumentation/turn_indicator.hxx index 15399e474..f5cfbd9af 100644 --- a/src/Instrumentation/turn_indicator.hxx +++ b/src/Instrumentation/turn_indicator.hxx @@ -48,6 +48,9 @@ public: void unbind() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "turn-indicator"; } + private: Gyro _gyro; double _last_rate; diff --git a/src/Instrumentation/vertical_speed_indicator.hxx b/src/Instrumentation/vertical_speed_indicator.hxx index 9387b2021..f5df5de16 100644 --- a/src/Instrumentation/vertical_speed_indicator.hxx +++ b/src/Instrumentation/vertical_speed_indicator.hxx @@ -42,6 +42,9 @@ public: void reinit() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "vertical-speed-indicator"; } + private: double _casing_pressure_Pa = 0.0; double _casing_airmass_kg = 0.0; diff --git a/src/Main/FGInterpolator.hxx b/src/Main/FGInterpolator.hxx index d317403e5..dc2420407 100644 --- a/src/Main/FGInterpolator.hxx +++ b/src/Main/FGInterpolator.hxx @@ -26,6 +26,9 @@ class FGInterpolator : public simgear::PropertyInterpolationMgr public: FGInterpolator(); ~FGInterpolator(); + + // Subsystem identification. + static const char* staticSubsystemClassId() { return "prop-interpolator"; } }; #endif /* FG_INTERPOLATOR_HXX_ */ diff --git a/src/Main/fg_io.hxx b/src/Main/fg_io.hxx index 61c957d18..8f9fe97e2 100644 --- a/src/Main/fg_io.hxx +++ b/src/Main/fg_io.hxx @@ -48,12 +48,16 @@ public: void unbind() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "io"; } + /** * helper to determine early in startup, if MP will be used. * This information is needed in the position-init code, to adjust the * start position off active runways. */ static bool isMultiplayerRequested(); + private: void add_channel(const std::string& config); FGProtocol* parse_port_config( const std::string& cfgstr ); diff --git a/src/Main/fg_props.hxx b/src/Main/fg_props.hxx index 7b910485d..6399ecbbd 100644 --- a/src/Main/fg_props.hxx +++ b/src/Main/fg_props.hxx @@ -29,6 +29,9 @@ public: void unbind() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "properties"; } + private: simgear::TiedPropertyList _tiedProperties; diff --git a/src/Main/logger.hxx b/src/Main/logger.hxx index 13498aae4..1470e3f09 100644 --- a/src/Main/logger.hxx +++ b/src/Main/logger.hxx @@ -27,6 +27,9 @@ public: void unbind() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "logger"; } + private: /** * A single instance of a log file (the logger can contain many). diff --git a/src/MultiPlayer/multiplaymgr.hxx b/src/MultiPlayer/multiplaymgr.hxx index a0c004b13..bc2556631 100644 --- a/src/MultiPlayer/multiplaymgr.hxx +++ b/src/MultiPlayer/multiplaymgr.hxx @@ -60,6 +60,9 @@ public: void shutdown() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "mp"; } + // transmitter void SendTextMessage(const std::string &sMsgText); diff --git a/src/Network/Swift/swift_connection.hxx b/src/Network/Swift/swift_connection.hxx index 28f689446..088823729 100644 --- a/src/Network/Swift/swift_connection.hxx +++ b/src/Network/Swift/swift_connection.hxx @@ -47,6 +47,9 @@ public: void shutdown() override; void update(double delta_time_sec) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "swift"; } + bool startServer(const SGPropertyNode* arg, SGPropertyNode* root); bool stopServer(const SGPropertyNode* arg, SGPropertyNode* root); FGSwiftBus::CPlugin* plug; diff --git a/src/Network/fgcom.hxx b/src/Network/fgcom.hxx index 86e44fedd..40b90b810 100644 --- a/src/Network/fgcom.hxx +++ b/src/Network/fgcom.hxx @@ -38,6 +38,9 @@ public: void unbind() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "fgcom"; } + virtual void valueChanged(SGPropertyNode *prop); void iaxTextEvent(struct iaxc_ev_text text); diff --git a/src/Network/http/httpd.cxx b/src/Network/http/httpd.cxx index 72e2bd4c9..d3f83fe46 100644 --- a/src/Network/http/httpd.cxx +++ b/src/Network/http/httpd.cxx @@ -185,6 +185,9 @@ public: void unbind() override; // shutdown of mongoose, clear connections, unregister URIHandlers void update(double dt) override; // poll connections, check for changed properties + // Subsystem identification. + static const char* staticSubsystemClassId() { return "mongoose-httpd"; } + /** * Returns a URIHandler for the given uri * diff --git a/src/Network/http/httpd.hxx b/src/Network/http/httpd.hxx index 1574a5cb7..68c415d95 100644 --- a/src/Network/http/httpd.hxx +++ b/src/Network/http/httpd.hxx @@ -34,6 +34,9 @@ extern const char * PROPERTY_ROOT; class FGHttpd : public SGSubsystem { public: + // Subsystem identification. + static const char* staticSubsystemClassId() { return "httpd"; } + static FGHttpd * createInstance( SGPropertyNode_ptr configNode ); }; diff --git a/src/Sound/voice.hxx b/src/Sound/voice.hxx index bfaa96d46..ab96557ba 100644 --- a/src/Sound/voice.hxx +++ b/src/Sound/voice.hxx @@ -61,6 +61,9 @@ public: void shutdown() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "voice"; } + class FGVoice; protected: diff --git a/src/Systems/electrical.hxx b/src/Systems/electrical.hxx index 1d7ebf63a..ae78982ac 100644 --- a/src/Systems/electrical.hxx +++ b/src/Systems/electrical.hxx @@ -225,6 +225,9 @@ public: void unbind() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "electrical"; } + bool build (SGPropertyNode* config_props); float propagate( FGElectricalComponent *node, double dt, float input_volts, float input_amps, diff --git a/src/Systems/pitot.hxx b/src/Systems/pitot.hxx index 4b2c55fe2..fe5d7d833 100644 --- a/src/Systems/pitot.hxx +++ b/src/Systems/pitot.hxx @@ -50,6 +50,9 @@ public: void unbind() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "pitot"; } + private: std::string _name; int _num; diff --git a/src/Systems/static.hxx b/src/Systems/static.hxx index f9551721e..7c1860f7b 100644 --- a/src/Systems/static.hxx +++ b/src/Systems/static.hxx @@ -47,6 +47,9 @@ public: void unbind() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "static"; } + private: std::string _name; int _num; diff --git a/src/Systems/system_mgr.hxx b/src/Systems/system_mgr.hxx index 8021e24b4..4647cc0b7 100644 --- a/src/Systems/system_mgr.hxx +++ b/src/Systems/system_mgr.hxx @@ -31,6 +31,9 @@ public: FGSystemMgr (); virtual ~FGSystemMgr (); + // Subsystem identification. + static const char* staticSubsystemClassId() { return "systems"; } + bool build (SGPropertyNode* config_props); }; diff --git a/src/Systems/vacuum.hxx b/src/Systems/vacuum.hxx index 63287de87..a0334eee0 100644 --- a/src/Systems/vacuum.hxx +++ b/src/Systems/vacuum.hxx @@ -47,6 +47,9 @@ public: void unbind() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "vacuum"; } + private: std::string _name; int _num; diff --git a/src/Time/light.hxx b/src/Time/light.hxx index 7fd88c13b..e3725f930 100644 --- a/src/Time/light.hxx +++ b/src/Time/light.hxx @@ -146,6 +146,9 @@ public: void unbind() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "lighting"; } + // Color related functions inline const SGVec4f& scene_ambient () const { return _scene_ambient; } diff --git a/src/Traffic/TrafficMgr.hxx b/src/Traffic/TrafficMgr.hxx index 3a790ac52..ff3b9dc09 100644 --- a/src/Traffic/TrafficMgr.hxx +++ b/src/Traffic/TrafficMgr.hxx @@ -118,6 +118,9 @@ public: void init() override; void update(double time) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "traffic-manager"; } + FGScheduledFlightVecIterator getFirstFlight(const std::string &ref) { return flights[ref].begin(); } FGScheduledFlightVecIterator getLastFlight(const std::string &ref) { return flights[ref].end(); } }; diff --git a/src/Viewer/view.hxx b/src/Viewer/view.hxx index 1fb6d8af4..b3a5be3a1 100644 --- a/src/Viewer/view.hxx +++ b/src/Viewer/view.hxx @@ -72,6 +72,8 @@ public: void unbind() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "view"; } ////////////////////////////////////////////////////////////////////// // Part 2: user settings. diff --git a/utils/fgpanel/FGPanel.hxx b/utils/fgpanel/FGPanel.hxx index b08c7d1af..718e3dc9b 100644 --- a/utils/fgpanel/FGPanel.hxx +++ b/utils/fgpanel/FGPanel.hxx @@ -63,6 +63,9 @@ public: void unbind() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "panel"; } + // transfer pointer ownership!!! virtual void addInstrument (FGPanelInstrument * const instrument); diff --git a/utils/fgpanel/FGPanelProtocol.hxx b/utils/fgpanel/FGPanelProtocol.hxx index dc85e7fb2..df818300b 100644 --- a/utils/fgpanel/FGPanelProtocol.hxx +++ b/utils/fgpanel/FGPanelProtocol.hxx @@ -39,6 +39,9 @@ public: void reinit() override; void update(double dt) override; + // Subsystem identification. + static const char* staticSubsystemClassId() { return "panel-protocol"; } + private: SGPropertyNode_ptr root; SGIOChannel *io; diff --git a/utils/fgpanel/panel_io.hxx b/utils/fgpanel/panel_io.hxx index cf9d5feed..d24db4e0f 100644 --- a/utils/fgpanel/panel_io.hxx +++ b/utils/fgpanel/panel_io.hxx @@ -34,6 +34,9 @@ class FGReadablePanel : public FGPanel { public: + // Subsystem identification. + static const char* staticSubsystemClassId() { return "readable-panel"; } + static SGSharedPtr read (SGPropertyNode_ptr root); };