1
0
Fork 0

SGSubsystem classes: Addition of staticSubsystemClassId() to all subsystems.

This commit is contained in:
Edward d'Auvergne 2018-05-05 11:38:11 +02:00
parent 0eb8716d45
commit d259c70560
94 changed files with 282 additions and 1 deletions

View file

@ -104,6 +104,9 @@ public:
void unbind() override; void unbind() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "submodel-mgr"; }
void load(); void load();
private: private:

View file

@ -57,6 +57,9 @@ public:
void shutdown() override; void shutdown() override;
void update(double time) override; void update(double time) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "ATC"; }
void addController(FGATCController *controller); void addController(FGATCController *controller);
void removeController(FGATCController* controller); void removeController(FGATCController* controller);
}; };

View file

@ -63,6 +63,9 @@ public:
void shutdown() override; void shutdown() override;
void update(double dt) 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; PagedPathForHistory_ptr pagedPathForHistory(size_t max_entries, size_t newerThan = 0) const;
/** /**
* retrieve the path, collapsing segments shorter than * retrieve the path, collapsing segments shorter than

View file

@ -54,6 +54,9 @@ public:
inner = simgear::StateMachine::createFromPlist(&cfg, &props_root); 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) { virtual bool configure( const std::string & nodeName, SGPropertyNode_ptr config) {
return false; return false;
} }

View file

@ -45,6 +45,9 @@ public:
void unbind() override; void unbind() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "autopilot"; }
void set_serviceable( bool value ) { _serviceable = value; } void set_serviceable( bool value ) { _serviceable = value; }
bool is_serviceable() const { return _serviceable; } bool is_serviceable() const { return _serviceable; }

View file

@ -53,6 +53,9 @@ public:
InitStatus incrementalInit() override; InitStatus incrementalInit() override;
void reinit() override; void reinit() override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "xml-autopilot-group"; }
virtual void addAutopilot( const std::string& name, virtual void addAutopilot( const std::string& name,
SGPropertyNode_ptr apNode, SGPropertyNode_ptr apNode,
SGPropertyNode_ptr config ); SGPropertyNode_ptr config );

View file

@ -31,6 +31,9 @@
class FGXMLAutopilotGroup : public SGSubsystemGroup class FGXMLAutopilotGroup : public SGSubsystemGroup
{ {
public: public:
// Subsystem identification.
static const char* staticSubsystemClassId() { return "xml-rules"; }
static FGXMLAutopilotGroup * createInstance(const std::string& nodeName); static FGXMLAutopilotGroup * createInstance(const std::string& nodeName);
void addAutopilotFromFile( const std::string & name, SGPropertyNode_ptr apNode, const char * path ); void addAutopilotFromFile( const std::string & name, SGPropertyNode_ptr apNode, const char * path );

View file

@ -62,6 +62,9 @@ public:
DigitalFilter(); DigitalFilter();
~DigitalFilter(); ~DigitalFilter();
// Subsystem identification.
static const char* staticSubsystemClassId() { return "filter"; }
virtual bool configure( SGPropertyNode& prop_root, virtual bool configure( SGPropertyNode& prop_root,
SGPropertyNode& cfg ); SGPropertyNode& cfg );
}; };

View file

@ -66,6 +66,8 @@ public:
class FlipFlop : public Logic class FlipFlop : public Logic
{ {
public: public:
// Subsystem identification.
static const char* staticSubsystemClassId() { return "flipflop"; }
protected: protected:
/** /**

View file

@ -39,6 +39,9 @@ public:
void set_output( bool value ); void set_output( bool value );
bool get_output() const; bool get_output() const;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "logic"; }
protected: protected:
void update( bool firstTime, double dt ); void update( bool firstTime, double dt );
}; };

View file

@ -70,6 +70,9 @@ public:
PIDController(); PIDController();
~PIDController() {} ~PIDController() {}
// Subsystem identification.
static const char* staticSubsystemClassId() { return "pid-controller"; }
void update( bool firstTime, double dt ); void update( bool firstTime, double dt );
}; };

View file

@ -57,6 +57,9 @@ public:
PISimpleController(); PISimpleController();
~PISimpleController() {} ~PISimpleController() {}
// Subsystem identification.
static const char* staticSubsystemClassId() { return "pi-simple-controller"; }
void update( bool firstTime, double dt ); void update( bool firstTime, double dt );
}; };

View file

@ -61,6 +61,9 @@ public:
Predictor(); Predictor();
~Predictor() {} ~Predictor() {}
// Subsystem identification.
static const char* staticSubsystemClassId() { return "predict-simple"; }
void update( bool firstTime, double dt ); void update( bool firstTime, double dt );
}; };

View file

@ -44,6 +44,9 @@ public:
void shutdown() override; void shutdown() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "CanvasGUI"; }
simgear::canvas::WindowPtr createWindow(const std::string& name = ""); simgear::canvas::WindowPtr createWindow(const std::string& name = "");
/** /**

View file

@ -66,6 +66,9 @@ public:
void init() override; void init() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "navigation-display"; }
void invalidatePositionedCache() void invalidatePositionedCache()
{ {
_cachedItemsValid = false; _cachedItemsValid = false;

View file

@ -41,6 +41,9 @@ public:
void init() override; void init() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "air-ground-radar"; }
void setUserPos(); void setUserPos();
void setUserVec(double az, double el); void setUserVec(double az, double el);
void update_terrain(); void update_terrain();

View file

@ -43,6 +43,9 @@ public:
void init() override; void init() override;
InitStatus incrementalInit() override; InitStatus incrementalInit() override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "cockpit-displays"; }
private: private:
bool build (SGPropertyNode* config_props); bool build (SGPropertyNode* config_props);

View file

@ -41,6 +41,9 @@ class GroundRadar : public SGSubsystem,
private FGODGauge private FGODGauge
{ {
public: public:
// Subsystem identification.
static const char* staticSubsystemClassId() { return "groundradar"; }
static const int TextureHalfSize = 256; static const int TextureHalfSize = 256;
GroundRadar(SGPropertyNode* node); GroundRadar(SGPropertyNode* node);
virtual ~GroundRadar(); virtual ~GroundRadar();

View file

@ -49,6 +49,9 @@ public:
void shutdown() override; void shutdown() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "radar"; }
virtual void valueChanged(SGPropertyNode *); virtual void valueChanged(SGPropertyNode *);
protected: protected:

View file

@ -114,6 +114,9 @@ public:
void unbind() override; void unbind() override;
void update(double delta_time_sec) override; void update(double delta_time_sec) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "layer-interpolate-controller"; }
private: private:
SGPropertyNode_ptr _rootNode; SGPropertyNode_ptr _rootNode;
bool _enabled; bool _enabled;

View file

@ -54,6 +54,9 @@ public:
void unbind() override; void unbind() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "environment"; }
/** /**
* Get the environment information for the plane's current position. * Get the environment information for the plane's current position.
*/ */

View file

@ -40,6 +40,9 @@ public:
void unbind() override; void unbind() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "magvar"; }
private: private:
std::unique_ptr<SGMagVar> _magVar; std::unique_ptr<SGMagVar> _magVar;

View file

@ -51,6 +51,9 @@ public:
void unbind() override; void unbind() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "precipitation"; }
void setupSceneGraph(void); void setupSceneGraph(void);
void setPrecipitationLevel(double l); void setPrecipitationLevel(double l);
}; };

View file

@ -412,6 +412,9 @@ public:
{ {
} }
// Subsystem identification.
static const char* staticSubsystemClassId() { return "noaa-metar-real-wx-controller"; }
private: private:
std::string noaa_base_url; std::string noaa_base_url;
}; };

View file

@ -50,6 +50,9 @@ public:
void unbind() override; void unbind() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "ridgelift"; }
inline double getStrength() const { return strength; }; inline double getStrength() const { return strength; };
inline double get_probe_elev_m( int index ) const { return probe_elev_m[index]; }; inline double get_probe_elev_m( int index ) const { return probe_elev_m[index]; };

View file

@ -57,6 +57,9 @@ public:
void unbind() override; void unbind() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "area"; }
int getElevationHistogramStep() const { return _elevationHistogramStep; } int getElevationHistogramStep() const { return _elevationHistogramStep; }
void setElevationHistograpStep( int value ) { void setElevationHistograpStep( int value ) {
_elevationHistogramStep = value > 0 ? value : 500; _elevationHistogramStep = value > 0 ? value : 500;
@ -333,6 +336,9 @@ public:
void unbind() override; void unbind() override;
void update(double delta_time_sec) override; void update(double delta_time_sec) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "terrain-sampler"; }
private: private:
inline string areaSubsystemName( unsigned i ) { inline string areaSubsystemName( unsigned i ) {
ostringstream name; ostringstream name;

View file

@ -57,6 +57,9 @@ public:
// Subsystem API. // Subsystem API.
void init() override; void init() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "network"; }
}; };
#endif // _EXTERNAL_NET_HXX #endif // _EXTERNAL_NET_HXX

View file

@ -73,6 +73,9 @@ public:
// Subsystem API. // Subsystem API.
void init() override; void init() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "pipe"; }
}; };
#endif // _EXTERNAL_PIPE_HXX #endif // _EXTERNAL_PIPE_HXX

View file

@ -114,6 +114,9 @@ public:
void unbind() override; void unbind() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "jsb"; }
/// copy FDM state to LaRCsim structures /// copy FDM state to LaRCsim structures
bool copy_to_JSBsim(); bool copy_to_JSBsim();

View file

@ -52,6 +52,9 @@ public:
void init() override; void init() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "larcsim"; }
// copy FDM state to LaRCsim structures // copy FDM state to LaRCsim structures
bool copy_to_LaRCsim(); bool copy_to_LaRCsim();

View file

@ -38,6 +38,9 @@ public:
// Subsystem API. // Subsystem API.
void init() override; void init() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "null"; }
}; };
#endif // _NULLFDM_HXX #endif // _NULLFDM_HXX

View file

@ -38,6 +38,9 @@ public:
void init() override; void init() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "acms"; }
private: private:
SGPropertyNode_ptr _alt, _speed, _climb_rate; SGPropertyNode_ptr _alt, _speed, _climb_rate;
SGPropertyNode_ptr _pitch, _roll, _heading; SGPropertyNode_ptr _pitch, _roll, _heading;

View file

@ -76,6 +76,9 @@ public:
// Subsystem API. // Subsystem API.
void init() override; void init() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "ada"; }
}; };
#endif // _ADA_HXX #endif // _ADA_HXX

View file

@ -79,6 +79,9 @@ public:
void init() override; void init() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "aisim"; }
bool load(std::string path); bool load(std::string path);
#ifdef ENABLE_SP_FDM #ifdef ENABLE_SP_FDM

View file

@ -67,6 +67,9 @@ public:
void init() override; void init() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "balloon"; }
// copy FDM state to BalloonSim structures // copy FDM state to BalloonSim structures
bool copy_to_BalloonSim(); bool copy_to_BalloonSim();

View file

@ -37,6 +37,9 @@ public:
// Subsystem API. // Subsystem API.
void init() override; void init() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "magic"; }
}; };
#endif // _MAGICCARPET_HXX #endif // _MAGICCARPET_HXX

View file

@ -67,6 +67,9 @@ public:
// Subsystem API. // Subsystem API.
void init() override; void init() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "ufo"; }
}; };
#endif // _UFO_HXX #endif // _UFO_HXX

View file

@ -18,6 +18,9 @@ public:
void reinit() override; void reinit() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "yasim"; }
private: private:
void report(); void report();
void copyFromYASim(); void copyFromYASim();

View file

@ -47,7 +47,7 @@ public:
void update(double dt) override; void update(double dt) override;
// Subsystem identification. // Subsystem identification.
static const char* staticSubsystemClassId() { return "input-hid"; } static const char* staticSubsystemClassId() { return "input-event-hid"; }
private: private:
class FGHIDEventInputPrivate; class FGHIDEventInputPrivate;

View file

@ -49,6 +49,9 @@ public:
void reinit() override; void reinit() override;
void update(double dt) 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_JOYSTICKS = 16;
static const int MAX_JOYSTICK_AXES = _JS_MAX_AXES; static const int MAX_JOYSTICK_AXES = _JS_MAX_AXES;
static const int MAX_JOYSTICK_BUTTONS = 32; static const int MAX_JOYSTICK_BUTTONS = 32;

View file

@ -51,6 +51,9 @@ public:
void unbind() override; void unbind() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "input-keyboard"; }
static const int MAX_KEYS = 1024; static const int MAX_KEYS = 1024;
private: private:

View file

@ -75,6 +75,9 @@ public:
void postinit() override; void postinit() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "input-event"; }
protected: protected:
}; };

View file

@ -55,6 +55,9 @@ public:
void shutdown() override; void shutdown() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "input-event"; }
private: private:
friend class FGMacOSXEventInputPrivate; friend class FGMacOSXEventInputPrivate;

View file

@ -127,6 +127,9 @@ public:
void reinit() override; void reinit() override;
void update(double) override; void update(double) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "hud"; }
// called from Main/renderer.cxx to draw 2D and 3D HUD // called from Main/renderer.cxx to draw 2D and 3D HUD
void draw(osg::State&); void draw(osg::State&);

View file

@ -102,6 +102,9 @@ public:
void unbind() override; void unbind() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "KLN89"; }
// Set Units // Set Units
// m if true, ft if false // m if true, ft if false
inline void SetAltUnitsSI(bool b) { _altUnits = (b ? GPS_ALT_UNITS_M : GPS_ALT_UNITS_FT); } inline void SetAltUnitsSI(bool b) { _altUnits = (b ? GPS_ALT_UNITS_M : GPS_ALT_UNITS_FT); }

View file

@ -47,6 +47,9 @@ public:
void init() override; void init() override;
void update(double delta_time_sec) override; void update(double delta_time_sec) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "adf"; }
private: private:
void set_bearing (double delta_time_sec, double bearing); void set_bearing (double delta_time_sec, double bearing);

View file

@ -45,6 +45,9 @@ public:
void reinit() override; void reinit() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "airspeed-indicator"; }
private: private:
void computeMach(); void computeMach();

View file

@ -40,6 +40,9 @@ public:
void unbind() override; void unbind() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "altimeter"; }
double getSettingInHg() const; double getSettingInHg() const;
void setSettingInHg( double value ); void setSettingInHg( double value );
double getSettingHPa() const; double getSettingHPa() const;

View file

@ -49,6 +49,9 @@ public:
void unbind() override; void unbind() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "attitude-indicator"; }
private: private:
std::string _name; std::string _name;
int _num; int _num;

View file

@ -36,6 +36,9 @@ public:
void init() override; void init() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "clock"; }
private: private:
std::string _name; std::string _name;
unsigned int _num; unsigned int _num;

View file

@ -40,6 +40,9 @@ typedef SGSharedPtr<SignalQualityComputer> SignalQualityComputerRef;
class CommRadio : public AbstractInstrument class CommRadio : public AbstractInstrument
{ {
public: public:
// Subsystem identification.
static const char* staticSubsystemClassId() { return "comm-radio"; }
static SGSubsystem * createInstance( SGPropertyNode_ptr rootNode ); static SGSubsystem * createInstance( SGPropertyNode_ptr rootNode );
}; };

View file

@ -43,6 +43,9 @@ public:
void reinit() override; void reinit() override;
void update(double delta_time_sec) override; void update(double delta_time_sec) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "dme"; }
private: private:
void clear(); void clear();

View file

@ -71,6 +71,9 @@ public:
void unbind() override; void unbind() override;
void update(double delta_time_sec) override; void update(double delta_time_sec) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "gps"; }
// RNAV interface // RNAV interface
virtual SGGeod position(); virtual SGGeod position();
virtual double trackDeg(); virtual double trackDeg();

View file

@ -51,6 +51,9 @@ public:
void init() override; void init() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "gsdi"; }
private: private:
std::string _name; std::string _name;
unsigned int _num; unsigned int _num;

View file

@ -46,6 +46,9 @@ public:
void unbind() override; void unbind() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "heading-indicator"; }
private: private:
Gyro _gyro; Gyro _gyro;
double _last_heading_deg; double _last_heading_deg;

View file

@ -44,6 +44,9 @@ public:
void unbind() override; void unbind() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "heading-indicator-dg"; };
private: private:
Gyro _gyro; Gyro _gyro;
double _last_heading_deg, _last_indicated_heading_dg; double _last_heading_deg, _last_indicated_heading_dg;

View file

@ -46,6 +46,9 @@ public:
void unbind() override; void unbind() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "heading-indicator-fg"; }
private: private:
Gyro _gyro; Gyro _gyro;
double _last_heading_deg; double _last_heading_deg;

View file

@ -59,6 +59,9 @@ public:
void reinit() override; void reinit() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "inst-vertical-speed-indicator"; }
private: private:
std::string _name; std::string _name;
int _num; int _num;

View file

@ -35,6 +35,9 @@ public:
void init() override; void init() override;
InitStatus incrementalInit() override; InitStatus incrementalInit() override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "instrumentation"; }
private: private:
bool build (SGPropertyNode* config_props); bool build (SGPropertyNode* config_props);

View file

@ -115,6 +115,9 @@ public:
void unbind() override; void unbind() override;
void update(double dt_sec) override; void update(double dt_sec) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "KR-87"; }
// Update nav/adf radios based on current postition // Update nav/adf radios based on current postition
void search (); void search ();

View file

@ -50,6 +50,9 @@ public:
void reinit() override; void reinit() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "magnetic-compass"; }
private: private:
double _rate_degps; double _rate_degps;

View file

@ -73,6 +73,9 @@ public:
void unbind() override; void unbind() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "marker-beacon"; }
void search (); void search ();
// Marker Beacon Accessors // Marker Beacon Accessors

View file

@ -1379,6 +1379,9 @@ public:
void init() override; void init() override;
void unbind() override; void unbind() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "mk-viii"; }
}; };
#ifdef _MSC_VER #ifdef _MSC_VER

View file

@ -47,6 +47,9 @@ public:
void unbind() override; void unbind() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "master-reference-gyro"; }
private: private:
static const double gravity; //conversion factor static const double gravity; //conversion factor

View file

@ -178,6 +178,9 @@ public:
void reinit() override; void reinit() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "old-navradio"; }
// Update nav/adf radios based on current postition // Update nav/adf radios based on current postition
void search (); void search ();
void updateNav(); void updateNav();

View file

@ -31,6 +31,9 @@ namespace Instrumentation {
class NavRadio : public SGSubsystem class NavRadio : public SGSubsystem
{ {
public: public:
// Subsystem identification.
static const char* staticSubsystemClassId() { return "nav-radio"; }
static SGSubsystem * createInstance( SGPropertyNode_ptr rootNode ); static SGSubsystem * createInstance( SGPropertyNode_ptr rootNode );
}; };

View file

@ -38,6 +38,9 @@ public:
void init() override; void init() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "radar-altimeter"; }
private: private:
void update_altitude(); void update_altitude();
void updateSetHeight(); void updateSetHeight();

View file

@ -39,6 +39,9 @@ public:
void reinit() override; void reinit() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "slip-skid-ball"; }
private: private:
std::string _name; std::string _name;
int _num; int _num;

View file

@ -43,6 +43,9 @@ public:
void reinit() override; void reinit() override;
void update(double delta_time_sec) override; void update(double delta_time_sec) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "tacan"; }
private: private:
void disabled(bool force = false); void disabled(bool force = false);

View file

@ -388,6 +388,9 @@ public:
void unbind() override; void unbind() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "tcas"; }
/* configuration options */ /* configuration options */
int _verticalRange; int _verticalRange;
int _lateralRange; int _lateralRange;

View file

@ -40,6 +40,9 @@ public:
void unbind() override; void unbind() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "transponder"; }
protected: protected:
bool isPowerSwitchOn() const override; bool isPowerSwitchOn() const override;

View file

@ -48,6 +48,9 @@ public:
void unbind() override; void unbind() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "turn-indicator"; }
private: private:
Gyro _gyro; Gyro _gyro;
double _last_rate; double _last_rate;

View file

@ -42,6 +42,9 @@ public:
void reinit() override; void reinit() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "vertical-speed-indicator"; }
private: private:
double _casing_pressure_Pa = 0.0; double _casing_pressure_Pa = 0.0;
double _casing_airmass_kg = 0.0; double _casing_airmass_kg = 0.0;

View file

@ -26,6 +26,9 @@ class FGInterpolator : public simgear::PropertyInterpolationMgr
public: public:
FGInterpolator(); FGInterpolator();
~FGInterpolator(); ~FGInterpolator();
// Subsystem identification.
static const char* staticSubsystemClassId() { return "prop-interpolator"; }
}; };
#endif /* FG_INTERPOLATOR_HXX_ */ #endif /* FG_INTERPOLATOR_HXX_ */

View file

@ -48,12 +48,16 @@ public:
void unbind() override; void unbind() override;
void update(double dt) 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. * helper to determine early in startup, if MP will be used.
* This information is needed in the position-init code, to adjust the * This information is needed in the position-init code, to adjust the
* start position off active runways. * start position off active runways.
*/ */
static bool isMultiplayerRequested(); static bool isMultiplayerRequested();
private: private:
void add_channel(const std::string& config); void add_channel(const std::string& config);
FGProtocol* parse_port_config( const std::string& cfgstr ); FGProtocol* parse_port_config( const std::string& cfgstr );

View file

@ -29,6 +29,9 @@ public:
void unbind() override; void unbind() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "properties"; }
private: private:
simgear::TiedPropertyList _tiedProperties; simgear::TiedPropertyList _tiedProperties;

View file

@ -27,6 +27,9 @@ public:
void unbind() override; void unbind() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "logger"; }
private: private:
/** /**
* A single instance of a log file (the logger can contain many). * A single instance of a log file (the logger can contain many).

View file

@ -60,6 +60,9 @@ public:
void shutdown() override; void shutdown() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "mp"; }
// transmitter // transmitter
void SendTextMessage(const std::string &sMsgText); void SendTextMessage(const std::string &sMsgText);

View file

@ -47,6 +47,9 @@ public:
void shutdown() override; void shutdown() override;
void update(double delta_time_sec) override; void update(double delta_time_sec) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "swift"; }
bool startServer(const SGPropertyNode* arg, SGPropertyNode* root); bool startServer(const SGPropertyNode* arg, SGPropertyNode* root);
bool stopServer(const SGPropertyNode* arg, SGPropertyNode* root); bool stopServer(const SGPropertyNode* arg, SGPropertyNode* root);
FGSwiftBus::CPlugin* plug; FGSwiftBus::CPlugin* plug;

View file

@ -38,6 +38,9 @@ public:
void unbind() override; void unbind() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "fgcom"; }
virtual void valueChanged(SGPropertyNode *prop); virtual void valueChanged(SGPropertyNode *prop);
void iaxTextEvent(struct iaxc_ev_text text); void iaxTextEvent(struct iaxc_ev_text text);

View file

@ -185,6 +185,9 @@ public:
void unbind() override; // shutdown of mongoose, clear connections, unregister URIHandlers void unbind() override; // shutdown of mongoose, clear connections, unregister URIHandlers
void update(double dt) override; // poll connections, check for changed properties 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 * Returns a URIHandler for the given uri
* *

View file

@ -34,6 +34,9 @@ extern const char * PROPERTY_ROOT;
class FGHttpd : public SGSubsystem class FGHttpd : public SGSubsystem
{ {
public: public:
// Subsystem identification.
static const char* staticSubsystemClassId() { return "httpd"; }
static FGHttpd * createInstance( SGPropertyNode_ptr configNode ); static FGHttpd * createInstance( SGPropertyNode_ptr configNode );
}; };

View file

@ -61,6 +61,9 @@ public:
void shutdown() override; void shutdown() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "voice"; }
class FGVoice; class FGVoice;
protected: protected:

View file

@ -225,6 +225,9 @@ public:
void unbind() override; void unbind() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "electrical"; }
bool build (SGPropertyNode* config_props); bool build (SGPropertyNode* config_props);
float propagate( FGElectricalComponent *node, double dt, float propagate( FGElectricalComponent *node, double dt,
float input_volts, float input_amps, float input_volts, float input_amps,

View file

@ -50,6 +50,9 @@ public:
void unbind() override; void unbind() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "pitot"; }
private: private:
std::string _name; std::string _name;
int _num; int _num;

View file

@ -47,6 +47,9 @@ public:
void unbind() override; void unbind() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "static"; }
private: private:
std::string _name; std::string _name;
int _num; int _num;

View file

@ -31,6 +31,9 @@ public:
FGSystemMgr (); FGSystemMgr ();
virtual ~FGSystemMgr (); virtual ~FGSystemMgr ();
// Subsystem identification.
static const char* staticSubsystemClassId() { return "systems"; }
bool build (SGPropertyNode* config_props); bool build (SGPropertyNode* config_props);
}; };

View file

@ -47,6 +47,9 @@ public:
void unbind() override; void unbind() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "vacuum"; }
private: private:
std::string _name; std::string _name;
int _num; int _num;

View file

@ -146,6 +146,9 @@ public:
void unbind() override; void unbind() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "lighting"; }
// Color related functions // Color related functions
inline const SGVec4f& scene_ambient () const { return _scene_ambient; } inline const SGVec4f& scene_ambient () const { return _scene_ambient; }

View file

@ -118,6 +118,9 @@ public:
void init() override; void init() override;
void update(double time) 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 getFirstFlight(const std::string &ref) { return flights[ref].begin(); }
FGScheduledFlightVecIterator getLastFlight(const std::string &ref) { return flights[ref].end(); } FGScheduledFlightVecIterator getLastFlight(const std::string &ref) { return flights[ref].end(); }
}; };

View file

@ -72,6 +72,8 @@ public:
void unbind() override; void unbind() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "view"; }
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Part 2: user settings. // Part 2: user settings.

View file

@ -63,6 +63,9 @@ public:
void unbind() override; void unbind() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "panel"; }
// transfer pointer ownership!!! // transfer pointer ownership!!!
virtual void addInstrument (FGPanelInstrument * const instrument); virtual void addInstrument (FGPanelInstrument * const instrument);

View file

@ -39,6 +39,9 @@ public:
void reinit() override; void reinit() override;
void update(double dt) override; void update(double dt) override;
// Subsystem identification.
static const char* staticSubsystemClassId() { return "panel-protocol"; }
private: private:
SGPropertyNode_ptr root; SGPropertyNode_ptr root;
SGIOChannel *io; SGIOChannel *io;

View file

@ -34,6 +34,9 @@
class FGReadablePanel : public FGPanel class FGReadablePanel : public FGPanel
{ {
public: public:
// Subsystem identification.
static const char* staticSubsystemClassId() { return "readable-panel"; }
static SGSharedPtr<FGPanel> read (SGPropertyNode_ptr root); static SGSharedPtr<FGPanel> read (SGPropertyNode_ptr root);
}; };