SGSubsystem classes: Subsystem and subsystem group API declaration standardisation.
This is a cleanup commit.
This commit is contained in:
parent
60a2444766
commit
7a6e63ddb9
109 changed files with 585 additions and 549 deletions
|
@ -57,11 +57,15 @@ SGSubsystem and define at least a small set of functions:
|
||||||
FGFX();
|
FGFX();
|
||||||
virtual ~FGFX();
|
virtual ~FGFX();
|
||||||
|
|
||||||
virtual void init();
|
// Subsystem API.
|
||||||
virtual void reinit();
|
void bind() override;
|
||||||
virtual void bind();
|
void init() override;
|
||||||
virtual void unbind();
|
void reinit() override;
|
||||||
virtual void update(double dt);
|
void unbind() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
|
// Subsystem identification.
|
||||||
|
static const char* subsystemName() { return "fx"; }
|
||||||
};
|
};
|
||||||
|
|
||||||
The init() functions should make sure everything is set and ready so the
|
The init() functions should make sure everything is set and ready so the
|
||||||
|
|
|
@ -41,14 +41,18 @@ public:
|
||||||
FGAIManager();
|
FGAIManager();
|
||||||
virtual ~FGAIManager();
|
virtual ~FGAIManager();
|
||||||
|
|
||||||
|
// Subsystem API.
|
||||||
|
void bind() override;
|
||||||
void init() override;
|
void init() override;
|
||||||
void shutdown() override;
|
|
||||||
void postinit() override;
|
void postinit() override;
|
||||||
void reinit() override;
|
void reinit() override;
|
||||||
void bind() override;
|
void shutdown() override;
|
||||||
void unbind() override;
|
void unbind() override;
|
||||||
void update(double dt) override;
|
void update(double dt) override;
|
||||||
|
|
||||||
|
// Subsystem identification.
|
||||||
|
static const char* subsystemName() { return "ai-model"; }
|
||||||
|
|
||||||
void updateLOD(SGPropertyNode* node);
|
void updateLOD(SGPropertyNode* node);
|
||||||
void attach(FGAIBase *model);
|
void attach(FGAIBase *model);
|
||||||
|
|
||||||
|
@ -89,8 +93,6 @@ public:
|
||||||
|
|
||||||
double calcRangeFt(const SGVec3d& aCartPos, const FGAIBase* aObject) const;
|
double calcRangeFt(const SGVec3d& aCartPos, const FGAIBase* aObject) const;
|
||||||
|
|
||||||
static const char* subsystemName() { return "ai-model"; }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Retrieve the representation of the user's aircraft in the AI manager
|
* @brief Retrieve the representation of the user's aircraft in the AI manager
|
||||||
* the position and velocity of this object are slaved to the user's aircraft,
|
* the position and velocity of this object are slaved to the user's aircraft,
|
||||||
|
|
|
@ -25,10 +25,13 @@ public:
|
||||||
PerformanceDB();
|
PerformanceDB();
|
||||||
virtual ~PerformanceDB();
|
virtual ~PerformanceDB();
|
||||||
|
|
||||||
virtual void init();
|
// Subsystem API.
|
||||||
virtual void shutdown();
|
void init() override;
|
||||||
|
void shutdown() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
virtual void update(double dt);
|
// Subsystem identification.
|
||||||
|
static const char* subsystemName() { return "aircraft-performance-db"; }
|
||||||
|
|
||||||
bool havePerformanceDataForAircraftType(const std::string& acType) const;
|
bool havePerformanceDataForAircraftType(const std::string& acType) const;
|
||||||
|
|
||||||
|
@ -40,8 +43,6 @@ public:
|
||||||
|
|
||||||
PerformanceData* getDefaultPerformance() const;
|
PerformanceData* getDefaultPerformance() const;
|
||||||
|
|
||||||
static const char* subsystemName() { return "aircraft-performance-db"; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void load(const SGPath& path);
|
void load(const SGPath& path);
|
||||||
|
|
||||||
|
|
|
@ -96,14 +96,15 @@ public:
|
||||||
FGSubmodelMgr();
|
FGSubmodelMgr();
|
||||||
~FGSubmodelMgr() override;
|
~FGSubmodelMgr() override;
|
||||||
|
|
||||||
void load();
|
// Subsystem API.
|
||||||
|
void bind() override;
|
||||||
void init() override;
|
void init() override;
|
||||||
void postinit() override;
|
void postinit() override;
|
||||||
void bind() override;
|
void shutdown() override;
|
||||||
void unbind() override;
|
void unbind() override;
|
||||||
void update(double dt) override;
|
void update(double dt) override;
|
||||||
void shutdown() override;
|
|
||||||
|
void load();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef std::vector <submodel*> submodel_vector_type;
|
typedef std::vector <submodel*> submodel_vector_type;
|
||||||
|
|
|
@ -51,12 +51,14 @@ private:
|
||||||
public:
|
public:
|
||||||
FGATCManager();
|
FGATCManager();
|
||||||
~FGATCManager();
|
~FGATCManager();
|
||||||
|
|
||||||
|
// Subsystem API.
|
||||||
void postinit() override;
|
void postinit() override;
|
||||||
void shutdown() override;
|
void shutdown() override;
|
||||||
|
void update(double time) override;
|
||||||
|
|
||||||
void addController(FGATCController *controller);
|
void addController(FGATCController *controller);
|
||||||
void removeController(FGATCController* controller);
|
void removeController(FGATCController* controller);
|
||||||
void update(double time);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _ATC_MRG_HXX_
|
#endif // _ATC_MRG_HXX_
|
||||||
|
|
|
@ -57,10 +57,11 @@ public:
|
||||||
FGFlightHistory();
|
FGFlightHistory();
|
||||||
virtual ~FGFlightHistory();
|
virtual ~FGFlightHistory();
|
||||||
|
|
||||||
virtual void init();
|
// Subsystem API.
|
||||||
virtual void shutdown();
|
void init() override;
|
||||||
virtual void reinit();
|
void reinit() override;
|
||||||
virtual void update(double dt);
|
void shutdown() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
PagedPathForHistory_ptr pagedPathForHistory(size_t max_entries, size_t newerThan = 0) const;
|
PagedPathForHistory_ptr pagedPathForHistory(size_t max_entries, size_t newerThan = 0) const;
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -257,12 +257,15 @@ public:
|
||||||
FGControls();
|
FGControls();
|
||||||
~FGControls();
|
~FGControls();
|
||||||
|
|
||||||
// Implementation of SGSubsystem.
|
// Subsystem API.
|
||||||
void init ();
|
void bind() override;
|
||||||
void bind ();
|
void init() override;
|
||||||
void unbind ();
|
void reinit() override;
|
||||||
void update (double dt);
|
void unbind() override;
|
||||||
virtual void reinit();
|
void update(double dt) override;
|
||||||
|
|
||||||
|
// Subsystem identification.
|
||||||
|
static const char* subsystemName() { return "controls"; }
|
||||||
|
|
||||||
// Reset function
|
// Reset function
|
||||||
void reset_all(void);
|
void reset_all(void);
|
||||||
|
@ -636,8 +639,6 @@ public:
|
||||||
// controls/autoflight/autopilot[n]/
|
// controls/autoflight/autopilot[n]/
|
||||||
void set_autopilot_engage( int ap, bool val );
|
void set_autopilot_engage( int ap, bool val );
|
||||||
|
|
||||||
static const char* subsystemName() { return "controls"; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
inline void do_autocoordination() {
|
inline void do_autocoordination() {
|
||||||
// check for autocoordination
|
// check for autocoordination
|
||||||
|
|
|
@ -65,17 +65,21 @@ public:
|
||||||
FGReplay ();
|
FGReplay ();
|
||||||
virtual ~FGReplay();
|
virtual ~FGReplay();
|
||||||
|
|
||||||
virtual void init();
|
// Subsystem API.
|
||||||
virtual void reinit();
|
void bind() override;
|
||||||
virtual void bind();
|
void init() override;
|
||||||
virtual void unbind();
|
void reinit() override;
|
||||||
virtual void update( double dt );
|
void unbind() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
|
// Subsystem identification.
|
||||||
|
static const char* subsystemName() { return "replay"; }
|
||||||
|
|
||||||
bool start(bool NewTape=false);
|
bool start(bool NewTape=false);
|
||||||
|
|
||||||
bool saveTape(const SGPropertyNode* ConfigData);
|
bool saveTape(const SGPropertyNode* ConfigData);
|
||||||
bool loadTape(const SGPropertyNode* ConfigData);
|
bool loadTape(const SGPropertyNode* ConfigData);
|
||||||
|
|
||||||
static const char* subsystemName() { return "replay"; }
|
|
||||||
private:
|
private:
|
||||||
void clear();
|
void clear();
|
||||||
FGReplayData* record(double time);
|
FGReplayData* record(double time);
|
||||||
|
|
|
@ -38,10 +38,14 @@ public:
|
||||||
AirportDynamicsManager();
|
AirportDynamicsManager();
|
||||||
virtual ~AirportDynamicsManager();
|
virtual ~AirportDynamicsManager();
|
||||||
|
|
||||||
virtual void init();
|
// Subsystem API.
|
||||||
virtual void shutdown();
|
void init() override;
|
||||||
virtual void update (double dt);
|
void reinit() override;
|
||||||
virtual void reinit();
|
void shutdown() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
|
// Subsystem identification.
|
||||||
|
static const char* subsystemName() { return "airport-dynamics"; }
|
||||||
|
|
||||||
static FGAirportDynamicsRef find(const std::string& icao);
|
static FGAirportDynamicsRef find(const std::string& icao);
|
||||||
|
|
||||||
|
@ -49,8 +53,6 @@ public:
|
||||||
|
|
||||||
FGAirportDynamicsRef dynamicsForICAO(const std::string& icao);
|
FGAirportDynamicsRef dynamicsForICAO(const std::string& icao);
|
||||||
|
|
||||||
static const char* subsystemName() { return "airport-dynamics"; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef std::map<std::string, FGAirportDynamicsRef> ICAODynamicsDict;
|
typedef std::map<std::string, FGAirportDynamicsRef> ICAODynamicsDict;
|
||||||
ICAODynamicsDict m_dynamics;
|
ICAODynamicsDict m_dynamics;
|
||||||
|
|
|
@ -40,9 +40,10 @@ public:
|
||||||
Autopilot( SGPropertyNode_ptr rootNode, SGPropertyNode_ptr configNode = NULL );
|
Autopilot( SGPropertyNode_ptr rootNode, SGPropertyNode_ptr configNode = NULL );
|
||||||
~Autopilot();
|
~Autopilot();
|
||||||
|
|
||||||
void bind();
|
// Subsystem API.
|
||||||
void unbind();
|
void bind() override;
|
||||||
void update( double dt );
|
void unbind() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
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; }
|
||||||
|
|
|
@ -48,13 +48,15 @@ public:
|
||||||
_nodeName(nodeName)
|
_nodeName(nodeName)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
// Subsystem API.
|
||||||
|
void init() override;
|
||||||
|
InitStatus incrementalInit() override;
|
||||||
|
void reinit() override;
|
||||||
|
|
||||||
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 );
|
||||||
virtual void removeAutopilot( const std::string & name );
|
virtual void removeAutopilot( const std::string & name );
|
||||||
void init();
|
|
||||||
InitStatus incrementalInit();
|
|
||||||
void reinit();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void initFrom( SGPropertyNode_ptr rootNode, const char * childName );
|
void initFrom( SGPropertyNode_ptr rootNode, const char * childName );
|
||||||
|
|
|
@ -48,11 +48,6 @@ protected:
|
||||||
const std::string& cfg_name,
|
const std::string& cfg_name,
|
||||||
SGPropertyNode& prop_root );
|
SGPropertyNode& prop_root );
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief the implementation of the update() method of the SGSubsystem
|
|
||||||
*/
|
|
||||||
virtual void update( double dt );
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief pure virtual function to be implemented by the derived classes. Gets called from
|
* @brief pure virtual function to be implemented by the derived classes. Gets called from
|
||||||
* the update method if it's not disabled with the firstTime parameter set to true if this
|
* the update method if it's not disabled with the firstTime parameter set to true if this
|
||||||
|
@ -93,6 +88,9 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual ~Component();
|
virtual ~Component();
|
||||||
|
|
||||||
|
// Subsystem API.
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief configure this component from a property node. Iterates through
|
* @brief configure this component from a property node. Iterates through
|
||||||
* all nodes found as children under configNode and calls configure
|
* all nodes found as children under configNode and calls configure
|
||||||
|
|
|
@ -45,11 +45,15 @@ public:
|
||||||
FGRouteMgr();
|
FGRouteMgr();
|
||||||
~FGRouteMgr();
|
~FGRouteMgr();
|
||||||
|
|
||||||
void init ();
|
// Subsystem API.
|
||||||
void postinit ();
|
void bind() override;
|
||||||
void bind ();
|
void init() override;
|
||||||
void unbind ();
|
void postinit() override;
|
||||||
void update (double dt);
|
void unbind() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
|
// Subsystem identification.
|
||||||
|
static const char* subsystemName() { return "route-manager"; }
|
||||||
|
|
||||||
bool isRouteActive() const;
|
bool isRouteActive() const;
|
||||||
|
|
||||||
|
@ -100,8 +104,6 @@ public:
|
||||||
|
|
||||||
flightgear::WayptRef waypointFromString(const std::string& target);
|
flightgear::WayptRef waypointFromString(const std::string& target);
|
||||||
|
|
||||||
static const char* subsystemName() { return "route-manager"; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool commandDefineUserWaypoint(const SGPropertyNode * arg, SGPropertyNode * root);
|
bool commandDefineUserWaypoint(const SGPropertyNode * arg, SGPropertyNode * root);
|
||||||
bool commandDeleteUserWaypoint(const SGPropertyNode * arg, SGPropertyNode * root);
|
bool commandDeleteUserWaypoint(const SGPropertyNode * arg, SGPropertyNode * root);
|
||||||
|
|
|
@ -27,8 +27,12 @@ class CanvasMgr : public simgear::canvas::CanvasMgr
|
||||||
public:
|
public:
|
||||||
CanvasMgr();
|
CanvasMgr();
|
||||||
|
|
||||||
virtual void init();
|
// Subsystem API.
|
||||||
virtual void shutdown();
|
void init() override;
|
||||||
|
void shutdown() override;
|
||||||
|
|
||||||
|
// Subsystem identification.
|
||||||
|
static const char* subsystemName() { return "Canvas"; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get OpenGL texture name for given canvas
|
* Get OpenGL texture name for given canvas
|
||||||
|
@ -41,8 +45,6 @@ public:
|
||||||
*/
|
*/
|
||||||
unsigned int getCanvasTexId(const simgear::canvas::CanvasPtr& canvas) const;
|
unsigned int getCanvasTexId(const simgear::canvas::CanvasPtr& canvas) const;
|
||||||
|
|
||||||
static const char* subsystemName() { return "Canvas"; }
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
osg::observer_ptr<osg::Camera> _gui_camera;
|
osg::observer_ptr<osg::Camera> _gui_camera;
|
||||||
|
|
|
@ -39,13 +39,13 @@ class GUIMgr : public SGSubsystem
|
||||||
public:
|
public:
|
||||||
GUIMgr();
|
GUIMgr();
|
||||||
|
|
||||||
|
// Subsystem API.
|
||||||
|
void init() override;
|
||||||
|
void shutdown() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
simgear::canvas::WindowPtr createWindow(const std::string& name = "");
|
simgear::canvas::WindowPtr createWindow(const std::string& name = "");
|
||||||
|
|
||||||
virtual void init();
|
|
||||||
virtual void shutdown();
|
|
||||||
|
|
||||||
virtual void update(double dt);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get simgear::canvas::Group containing all windows
|
* Get simgear::canvas::Group containing all windows
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -62,8 +62,9 @@ public:
|
||||||
NavDisplay(SGPropertyNode *node);
|
NavDisplay(SGPropertyNode *node);
|
||||||
virtual ~NavDisplay();
|
virtual ~NavDisplay();
|
||||||
|
|
||||||
virtual void init();
|
// Subsystem API.
|
||||||
virtual void update(double dt);
|
void init() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
void invalidatePositionedCache()
|
void invalidatePositionedCache()
|
||||||
{
|
{
|
||||||
|
|
|
@ -37,8 +37,9 @@ public:
|
||||||
agRadar ();
|
agRadar ();
|
||||||
virtual ~agRadar ();
|
virtual ~agRadar ();
|
||||||
|
|
||||||
virtual void init ();
|
// Subsystem API.
|
||||||
virtual void update (double dt);
|
void init() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
void setUserPos();
|
void setUserPos();
|
||||||
void setUserVec(double az, double el);
|
void setUserVec(double az, double el);
|
||||||
|
|
|
@ -39,8 +39,9 @@ public:
|
||||||
CockpitDisplayManager ();
|
CockpitDisplayManager ();
|
||||||
virtual ~CockpitDisplayManager ();
|
virtual ~CockpitDisplayManager ();
|
||||||
|
|
||||||
virtual void init();
|
// Subsystem API.
|
||||||
virtual InitStatus incrementalInit();
|
void init() override;
|
||||||
|
InitStatus incrementalInit() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool build (SGPropertyNode* config_props);
|
bool build (SGPropertyNode* config_props);
|
||||||
|
|
|
@ -44,10 +44,11 @@ public:
|
||||||
wxRadarBg();
|
wxRadarBg();
|
||||||
virtual ~wxRadarBg();
|
virtual ~wxRadarBg();
|
||||||
|
|
||||||
virtual void init();
|
// Subsystem API.
|
||||||
virtual void shutdown();
|
void init() override;
|
||||||
|
void shutdown() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
virtual void update(double dt);
|
|
||||||
virtual void valueChanged(SGPropertyNode *);
|
virtual void valueChanged(SGPropertyNode *);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -106,12 +106,13 @@ class LayerInterpolateControllerImplementation : public LayerInterpolateControll
|
||||||
public:
|
public:
|
||||||
LayerInterpolateControllerImplementation( SGPropertyNode_ptr rootNode );
|
LayerInterpolateControllerImplementation( SGPropertyNode_ptr rootNode );
|
||||||
|
|
||||||
virtual void init ();
|
// Subsystem API.
|
||||||
virtual void reinit ();
|
void bind() override;
|
||||||
virtual void postinit();
|
void init() override;
|
||||||
virtual void bind();
|
void postinit() override;
|
||||||
virtual void unbind();
|
void reinit() override;
|
||||||
virtual void update (double delta_time_sec);
|
void unbind() override;
|
||||||
|
void update(double delta_time_sec) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SGPropertyNode_ptr _rootNode;
|
SGPropertyNode_ptr _rootNode;
|
||||||
|
|
|
@ -46,12 +46,13 @@ public:
|
||||||
FGEnvironmentMgr ();
|
FGEnvironmentMgr ();
|
||||||
virtual ~FGEnvironmentMgr ();
|
virtual ~FGEnvironmentMgr ();
|
||||||
|
|
||||||
virtual InitStatus incrementalInit ();
|
// Subsystem API.
|
||||||
virtual void reinit ();
|
void bind() override;
|
||||||
virtual void shutdown ();
|
InitStatus incrementalInit() override;
|
||||||
virtual void bind ();
|
void reinit() override;
|
||||||
virtual void unbind ();
|
void shutdown() override;
|
||||||
virtual void update (double dt);
|
void unbind() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the environment information for the plane's current position.
|
* Get the environment information for the plane's current position.
|
||||||
|
|
|
@ -31,7 +31,7 @@ class SGEphemeris;
|
||||||
class SGPropertyNode;
|
class SGPropertyNode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrap SGEphemeris in a susbsytem/property interface
|
* Wrap SGEphemeris in a subsystem/property interface
|
||||||
*/
|
*/
|
||||||
class Ephemeris : public SGSubsystem
|
class Ephemeris : public SGSubsystem
|
||||||
{
|
{
|
||||||
|
@ -39,13 +39,15 @@ public:
|
||||||
Ephemeris();
|
Ephemeris();
|
||||||
~Ephemeris();
|
~Ephemeris();
|
||||||
|
|
||||||
virtual void bind();
|
// Subsystem API.
|
||||||
virtual void unbind();
|
void bind() override;
|
||||||
virtual void update(double dt);
|
void init() override;
|
||||||
virtual void init();
|
void postinit() override;
|
||||||
virtual void shutdown();
|
void shutdown() override;
|
||||||
virtual void postinit();
|
void unbind() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
|
// Subsystem identification.
|
||||||
static const char* subsystemName() { return "ephemeris"; }
|
static const char* subsystemName() { return "ephemeris"; }
|
||||||
|
|
||||||
SGEphemeris* data();
|
SGEphemeris* data();
|
||||||
|
|
|
@ -34,11 +34,11 @@ public:
|
||||||
FGMagVarManager();
|
FGMagVarManager();
|
||||||
virtual ~FGMagVarManager();
|
virtual ~FGMagVarManager();
|
||||||
|
|
||||||
virtual void init();
|
// Subsystem API.
|
||||||
virtual void bind();
|
void bind() override;
|
||||||
virtual void unbind();
|
void init() override;
|
||||||
|
void unbind() override;
|
||||||
virtual void update(double dt);
|
void update(double dt) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<SGMagVar> _magVar;
|
std::unique_ptr<SGMagVar> _magVar;
|
||||||
|
|
|
@ -45,11 +45,11 @@ public:
|
||||||
FGPrecipitationMgr();
|
FGPrecipitationMgr();
|
||||||
virtual ~FGPrecipitationMgr();
|
virtual ~FGPrecipitationMgr();
|
||||||
|
|
||||||
// SGSubsystem methods
|
// Subsystem API.
|
||||||
virtual void bind ();
|
void bind() override;
|
||||||
virtual void unbind ();
|
void init() override;
|
||||||
virtual void init ();
|
void unbind() override;
|
||||||
virtual void update (double dt);
|
void update(double dt) override;
|
||||||
|
|
||||||
void setupSceneGraph(void);
|
void setupSceneGraph(void);
|
||||||
void setPrecipitationLevel(double l);
|
void setPrecipitationLevel(double l);
|
||||||
|
|
|
@ -155,9 +155,13 @@ public:
|
||||||
BasicRealWxController( SGPropertyNode_ptr rootNode, MetarRequester * metarRequester );
|
BasicRealWxController( SGPropertyNode_ptr rootNode, MetarRequester * metarRequester );
|
||||||
virtual ~BasicRealWxController ();
|
virtual ~BasicRealWxController ();
|
||||||
|
|
||||||
virtual void init ();
|
// Subsystem API.
|
||||||
virtual void reinit ();
|
void bind() override;
|
||||||
virtual void shutdown ();
|
void init() override;
|
||||||
|
void reinit() override;
|
||||||
|
void shutdown() override;
|
||||||
|
void unbind() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a metar-property binding at the specified property path,
|
* Create a metar-property binding at the specified property path,
|
||||||
|
@ -173,10 +177,6 @@ public:
|
||||||
MetarPropertiesList::iterator findMetarAtPath(const string &propPath);
|
MetarPropertiesList::iterator findMetarAtPath(const string &propPath);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void bind();
|
|
||||||
void unbind();
|
|
||||||
void update( double dt );
|
|
||||||
|
|
||||||
void checkNearbyMetar();
|
void checkNearbyMetar();
|
||||||
|
|
||||||
long getMetarMaxAgeMin() const { return _max_age_n == NULL ? 0 : _max_age_n->getLongValue(); }
|
long getMetarMaxAgeMin() const { return _max_age_n == NULL ? 0 : _max_age_n->getLongValue(); }
|
||||||
|
|
|
@ -44,10 +44,11 @@ public:
|
||||||
FGRidgeLift();
|
FGRidgeLift();
|
||||||
~FGRidgeLift();
|
~FGRidgeLift();
|
||||||
|
|
||||||
virtual void bind();
|
// Subsystem API.
|
||||||
virtual void unbind();
|
void bind() override;
|
||||||
virtual void update(double dt);
|
void init() override;
|
||||||
virtual void init();
|
void unbind() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
inline double getStrength() const { return strength; };
|
inline double getStrength() const { return strength; };
|
||||||
|
|
||||||
|
|
|
@ -49,11 +49,13 @@ class AreaSampler : public SGSubsystem
|
||||||
public:
|
public:
|
||||||
AreaSampler( SGPropertyNode_ptr rootNode );
|
AreaSampler( SGPropertyNode_ptr rootNode );
|
||||||
virtual ~AreaSampler();
|
virtual ~AreaSampler();
|
||||||
void update( double dt );
|
|
||||||
void bind();
|
// Subsystem API.
|
||||||
void unbind();
|
void bind() override;
|
||||||
void init();
|
void init() override;
|
||||||
void reinit();
|
void reinit() override;
|
||||||
|
void unbind() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
int getElevationHistogramStep() const { return _elevationHistogramStep; }
|
int getElevationHistogramStep() const { return _elevationHistogramStep; }
|
||||||
void setElevationHistograpStep( int value ) {
|
void setElevationHistograpStep( int value ) {
|
||||||
|
@ -322,13 +324,14 @@ public:
|
||||||
TerrainSamplerImplementation ( SGPropertyNode_ptr rootNode );
|
TerrainSamplerImplementation ( SGPropertyNode_ptr rootNode );
|
||||||
virtual ~TerrainSamplerImplementation ();
|
virtual ~TerrainSamplerImplementation ();
|
||||||
|
|
||||||
virtual void init ();
|
// Subsystem API.
|
||||||
virtual InitStatus incrementalInit ();
|
void bind() override;
|
||||||
virtual void postinit();
|
InitStatus incrementalInit() override;
|
||||||
virtual void reinit ();
|
void init() override;
|
||||||
virtual void bind();
|
void postinit() override;
|
||||||
virtual void unbind();
|
void reinit() override;
|
||||||
virtual void update (double delta_time_sec);
|
void unbind() override;
|
||||||
|
void update(double delta_time_sec) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
inline string areaSubsystemName( unsigned i ) {
|
inline string areaSubsystemName( unsigned i ) {
|
||||||
|
|
|
@ -54,11 +54,9 @@ public:
|
||||||
// Destructor
|
// Destructor
|
||||||
~FGExternalNet();
|
~FGExternalNet();
|
||||||
|
|
||||||
// Reset flight params to a specific position
|
// Subsystem API.
|
||||||
void init();
|
void init() override;
|
||||||
|
void update(double dt) override;
|
||||||
// update the fdm
|
|
||||||
void update( double dt );
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _EXTERNAL_NET_HXX
|
#endif // _EXTERNAL_NET_HXX
|
||||||
|
|
|
@ -70,11 +70,9 @@ public:
|
||||||
// Destructor
|
// Destructor
|
||||||
~FGExternalPipe();
|
~FGExternalPipe();
|
||||||
|
|
||||||
// Reset flight params to a specific position
|
// Subsystem API.
|
||||||
void init();
|
void init() override;
|
||||||
|
void update(double dt) override;
|
||||||
// update the fdm
|
|
||||||
void update( double dt );
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _EXTERNAL_PIPE_HXX
|
#endif // _EXTERNAL_PIPE_HXX
|
||||||
|
|
|
@ -107,24 +107,19 @@ public:
|
||||||
/// Destructor
|
/// Destructor
|
||||||
~FGJSBsim();
|
~FGJSBsim();
|
||||||
|
|
||||||
|
// Subsystem API.
|
||||||
|
void init() override;
|
||||||
|
void resume() override;
|
||||||
|
void suspend() override;
|
||||||
|
void unbind() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
/// copy FDM state to LaRCsim structures
|
/// copy FDM state to LaRCsim structures
|
||||||
bool copy_to_JSBsim();
|
bool copy_to_JSBsim();
|
||||||
|
|
||||||
/// copy FDM state from LaRCsim structures
|
/// copy FDM state from LaRCsim structures
|
||||||
bool copy_from_JSBsim();
|
bool copy_from_JSBsim();
|
||||||
|
|
||||||
/// Reset flight params to a specific position
|
|
||||||
void init();
|
|
||||||
|
|
||||||
/// Unbind properties
|
|
||||||
void unbind();
|
|
||||||
|
|
||||||
/// Suspend integration
|
|
||||||
void suspend();
|
|
||||||
|
|
||||||
/// Resume integration
|
|
||||||
void resume();
|
|
||||||
|
|
||||||
/// @name Position Parameter Set
|
/// @name Position Parameter Set
|
||||||
//@{
|
//@{
|
||||||
/** Set geocentric latitude
|
/** Set geocentric latitude
|
||||||
|
@ -211,11 +206,6 @@ public:
|
||||||
/// @name Position Parameter Update
|
/// @name Position Parameter Update
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
|
|
||||||
/** Update the position based on inputs, positions, velocities, etc.
|
|
||||||
@param dt delta time in seconds. */
|
|
||||||
void update(double dt);
|
|
||||||
|
|
||||||
bool ToggleDataLogging(bool state);
|
bool ToggleDataLogging(bool state);
|
||||||
bool ToggleDataLogging(void);
|
bool ToggleDataLogging(void);
|
||||||
|
|
||||||
|
|
|
@ -48,18 +48,16 @@ public:
|
||||||
FGLaRCsim( double dt );
|
FGLaRCsim( double dt );
|
||||||
~FGLaRCsim(void);
|
~FGLaRCsim(void);
|
||||||
|
|
||||||
|
// Subsystem API.
|
||||||
|
void init() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
// copy FDM state to LaRCsim structures
|
// copy FDM state to LaRCsim structures
|
||||||
bool copy_to_LaRCsim();
|
bool copy_to_LaRCsim();
|
||||||
|
|
||||||
// copy FDM state from LaRCsim structures
|
// copy FDM state from LaRCsim structures
|
||||||
bool copy_from_LaRCsim();
|
bool copy_from_LaRCsim();
|
||||||
|
|
||||||
// reset flight params to a specific position
|
|
||||||
void init();
|
|
||||||
|
|
||||||
// update position based on inputs, positions, velocities, etc.
|
|
||||||
void update( double dt );
|
|
||||||
|
|
||||||
// Positions
|
// Positions
|
||||||
void set_Latitude(double lat); //geocentric
|
void set_Latitude(double lat); //geocentric
|
||||||
void set_Longitude(double lon);
|
void set_Longitude(double lon);
|
||||||
|
|
|
@ -35,11 +35,9 @@ public:
|
||||||
FGNullFDM( double dt );
|
FGNullFDM( double dt );
|
||||||
~FGNullFDM();
|
~FGNullFDM();
|
||||||
|
|
||||||
// reset flight params to a specific position
|
// Subsystem API.
|
||||||
void init();
|
void init() override;
|
||||||
|
void update(double dt) override;
|
||||||
// update position based on inputs, positions, velocities, etc.
|
|
||||||
void update( double dt );
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _NULLFDM_HXX
|
#endif // _NULLFDM_HXX
|
||||||
|
|
|
@ -34,11 +34,9 @@ public:
|
||||||
FGACMS( double dt );
|
FGACMS( double dt );
|
||||||
~FGACMS();
|
~FGACMS();
|
||||||
|
|
||||||
// reset flight params to a specific position
|
// Subsystem API.
|
||||||
void init();
|
void init() override;
|
||||||
|
void update(double dt) override;
|
||||||
// update position based on properties
|
|
||||||
void update( double dt );
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SGPropertyNode_ptr _alt, _speed, _climb_rate;
|
SGPropertyNode_ptr _alt, _speed, _climb_rate;
|
||||||
|
|
|
@ -73,11 +73,9 @@ public:
|
||||||
FGADA( double dt );
|
FGADA( double dt );
|
||||||
~FGADA();
|
~FGADA();
|
||||||
|
|
||||||
// reset flight params to a specific position
|
// Subsystem API.
|
||||||
void init();
|
void init() override;
|
||||||
|
void update(double dt) override;
|
||||||
// update position based on inputs, positions, velocities, etc.
|
|
||||||
void update(double dt);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _ADA_HXX
|
#endif // _ADA_HXX
|
||||||
|
|
|
@ -75,11 +75,9 @@ public:
|
||||||
FGAISim(double dt);
|
FGAISim(double dt);
|
||||||
~FGAISim();
|
~FGAISim();
|
||||||
|
|
||||||
// reset flight params to a specific location
|
// Subsystem API.
|
||||||
void init();
|
void init() override;
|
||||||
|
void update(double dt) override;
|
||||||
// update location based on properties
|
|
||||||
void update(double dt);
|
|
||||||
|
|
||||||
bool load(std::string path);
|
bool load(std::string path);
|
||||||
|
|
||||||
|
|
|
@ -63,17 +63,15 @@ public:
|
||||||
FGBalloonSim( double dt );
|
FGBalloonSim( double dt );
|
||||||
~FGBalloonSim();
|
~FGBalloonSim();
|
||||||
|
|
||||||
|
// Subsystem API.
|
||||||
|
void init() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
// copy FDM state to BalloonSim structures
|
// copy FDM state to BalloonSim structures
|
||||||
bool copy_to_BalloonSim();
|
bool copy_to_BalloonSim();
|
||||||
|
|
||||||
// copy FDM state from BalloonSim structures
|
// copy FDM state from BalloonSim structures
|
||||||
bool copy_from_BalloonSim();
|
bool copy_from_BalloonSim();
|
||||||
|
|
||||||
// reset flight params to a specific position
|
|
||||||
void init();
|
|
||||||
|
|
||||||
// update position based on inputs, positions, velocities, etc.
|
|
||||||
void update( double dt );
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
|
@ -34,11 +34,9 @@ public:
|
||||||
FGMagicCarpet( double dt );
|
FGMagicCarpet( double dt );
|
||||||
~FGMagicCarpet();
|
~FGMagicCarpet();
|
||||||
|
|
||||||
// reset flight params to a specific position
|
// Subsystem API.
|
||||||
void init();
|
void init() override;
|
||||||
|
void update(double dt) override;
|
||||||
// update position based on inputs, positions, velocities, etc.
|
|
||||||
void update( double dt );
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _MAGICCARPET_HXX
|
#endif // _MAGICCARPET_HXX
|
||||||
|
|
|
@ -64,11 +64,9 @@ public:
|
||||||
FGUFO( double dt );
|
FGUFO( double dt );
|
||||||
~FGUFO();
|
~FGUFO();
|
||||||
|
|
||||||
// reset flight params to a specific position
|
// Subsystem API.
|
||||||
void init();
|
void init() override;
|
||||||
|
void update(double dt) override;
|
||||||
// update position based on inputs, positions, velocities, etc.
|
|
||||||
void update( double dt );
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _UFO_HXX
|
#endif // _UFO_HXX
|
||||||
|
|
|
@ -12,13 +12,11 @@ public:
|
||||||
YASim(double dt);
|
YASim(double dt);
|
||||||
~YASim();
|
~YASim();
|
||||||
|
|
||||||
// Load externally set stuff into the FDM
|
// Subsystem API.
|
||||||
virtual void init();
|
void bind() override;
|
||||||
virtual void bind();
|
void init() override;
|
||||||
virtual void reinit();
|
void reinit() override;
|
||||||
|
void update(double dt) override;
|
||||||
// Run an iteration
|
|
||||||
virtual void update(double dt);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void report();
|
void report();
|
||||||
|
|
|
@ -44,20 +44,20 @@ public:
|
||||||
FDMShell();
|
FDMShell();
|
||||||
~FDMShell() override;
|
~FDMShell() override;
|
||||||
|
|
||||||
void init() override;
|
// Subsystem API.
|
||||||
void shutdown() override;
|
|
||||||
void reinit() override;
|
|
||||||
void postinit() override;
|
|
||||||
|
|
||||||
void bind() override;
|
void bind() override;
|
||||||
|
void init() override;
|
||||||
|
void postinit() override;
|
||||||
|
void reinit() override;
|
||||||
|
void shutdown() override;
|
||||||
void unbind() override;
|
void unbind() override;
|
||||||
|
|
||||||
void update(double dt) override;
|
void update(double dt) override;
|
||||||
|
|
||||||
FGInterface* getInterface() const;
|
// Subsystem identification.
|
||||||
|
|
||||||
static const char* subsystemName() { return "flight"; }
|
static const char* subsystemName() { return "flight"; }
|
||||||
|
|
||||||
|
FGInterface* getInterface() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void createImplementation();
|
void createImplementation();
|
||||||
|
|
||||||
|
|
|
@ -390,10 +390,12 @@ public:
|
||||||
FGInterface( double dt );
|
FGInterface( double dt );
|
||||||
virtual ~FGInterface();
|
virtual ~FGInterface();
|
||||||
|
|
||||||
virtual void init ();
|
// Subsystem API.
|
||||||
virtual void bind ();
|
void bind() override;
|
||||||
virtual void unbind ();
|
void init() override;
|
||||||
virtual void update(double dt);
|
void unbind() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
virtual bool ToggleDataLogging(bool state) { return false; }
|
virtual bool ToggleDataLogging(bool state) { return false; }
|
||||||
virtual bool ToggleDataLogging(void) { return false; }
|
virtual bool ToggleDataLogging(void) { return false; }
|
||||||
|
|
||||||
|
|
|
@ -40,38 +40,16 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual ~NewGUI ();
|
virtual ~NewGUI ();
|
||||||
|
|
||||||
/**
|
// Subsystem API.
|
||||||
* Initialize the GUI subsystem.
|
void bind() override;
|
||||||
*/
|
void init() override;
|
||||||
virtual void init ();
|
void reinit() override;
|
||||||
|
void shutdown() override;
|
||||||
|
void unbind() override;
|
||||||
|
void update(double delta_time_sec) override;
|
||||||
|
|
||||||
virtual void shutdown ();
|
// Subsystem identification.
|
||||||
|
static const char* subsystemName() { return "gui"; }
|
||||||
/**
|
|
||||||
* Reinitialize the GUI subsystem. Reloads all XML dialogs.
|
|
||||||
*/
|
|
||||||
virtual void reinit ();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Bind properties for the GUI subsystem.
|
|
||||||
*
|
|
||||||
* Currently, this method binds the properties for showing and
|
|
||||||
* hiding the menu.
|
|
||||||
*/
|
|
||||||
virtual void bind ();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unbind properties for the GUI subsystem.
|
|
||||||
*/
|
|
||||||
virtual void unbind ();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update the GUI subsystem.
|
|
||||||
*
|
|
||||||
* Currently, this method is a no-op, because nothing the GUI
|
|
||||||
* subsystem does is time-dependent.
|
|
||||||
*/
|
|
||||||
virtual void update (double delta_time_sec);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Redraw the GUI picking up new GUI colors.
|
* Redraw the GUI picking up new GUI colors.
|
||||||
|
@ -170,8 +148,6 @@ public:
|
||||||
|
|
||||||
virtual puFont *getDefaultFont() { return _font; }
|
virtual puFont *getDefaultFont() { return _font; }
|
||||||
|
|
||||||
static const char* subsystemName() { return "gui"; }
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
* Test if the menubar is visible.
|
* Test if the menubar is visible.
|
||||||
|
|
|
@ -322,10 +322,12 @@ class FGEventInput : public SGSubsystem,
|
||||||
public:
|
public:
|
||||||
FGEventInput();
|
FGEventInput();
|
||||||
virtual ~FGEventInput();
|
virtual ~FGEventInput();
|
||||||
|
|
||||||
|
// Subsystem API.
|
||||||
void init() override;
|
void init() override;
|
||||||
void postinit() override;
|
void postinit() override;
|
||||||
void update( double dt ) override;
|
|
||||||
void shutdown() override;
|
void shutdown() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
const static unsigned MAX_DEVICES = 1000;
|
const static unsigned MAX_DEVICES = 1000;
|
||||||
const static unsigned INVALID_DEVICE_INDEX = MAX_DEVICES + 1;
|
const static unsigned INVALID_DEVICE_INDEX = MAX_DEVICES + 1;
|
||||||
|
|
|
@ -39,12 +39,14 @@ public:
|
||||||
|
|
||||||
virtual ~FGHIDEventInput();
|
virtual ~FGHIDEventInput();
|
||||||
|
|
||||||
void update(double dt) override;
|
// Subsystem API.
|
||||||
void init() override;
|
void init() override;
|
||||||
|
void postinit() override;
|
||||||
void reinit() override;
|
void reinit() override;
|
||||||
void postinit();
|
|
||||||
void shutdown() override;
|
void shutdown() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
|
// Subsystem identification.
|
||||||
static const char* subsystemName() { return "input-hid"; }
|
static const char* subsystemName() { return "input-hid"; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -43,10 +43,11 @@ public:
|
||||||
FGJoystickInput();
|
FGJoystickInput();
|
||||||
virtual ~FGJoystickInput();
|
virtual ~FGJoystickInput();
|
||||||
|
|
||||||
virtual void init();
|
// Subsystem API.
|
||||||
virtual void postinit();
|
void init() override;
|
||||||
virtual void reinit();
|
void postinit() override;
|
||||||
virtual void update( double dt );
|
void reinit() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
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;
|
||||||
|
|
|
@ -44,11 +44,12 @@ public:
|
||||||
FGKeyboardInput();
|
FGKeyboardInput();
|
||||||
virtual ~FGKeyboardInput();
|
virtual ~FGKeyboardInput();
|
||||||
|
|
||||||
virtual void init();
|
// Subsystem API.
|
||||||
virtual void postinit();
|
void bind() override;
|
||||||
virtual void bind();
|
void init() override;
|
||||||
virtual void unbind();
|
void postinit() override;
|
||||||
virtual void update( double dt );
|
void unbind() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
static const int MAX_KEYS = 1024;
|
static const int MAX_KEYS = 1024;
|
||||||
|
|
||||||
|
|
|
@ -70,8 +70,10 @@ class FGLinuxEventInput : public FGEventInput
|
||||||
public:
|
public:
|
||||||
FGLinuxEventInput();
|
FGLinuxEventInput();
|
||||||
virtual ~ FGLinuxEventInput();
|
virtual ~ FGLinuxEventInput();
|
||||||
virtual void update (double dt);
|
|
||||||
virtual void postinit();
|
// Subsystem API.
|
||||||
|
void postinit() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
};
|
};
|
||||||
|
|
|
@ -48,10 +48,12 @@ public:
|
||||||
FGMacOSXEventInput();
|
FGMacOSXEventInput();
|
||||||
|
|
||||||
virtual ~FGMacOSXEventInput();
|
virtual ~FGMacOSXEventInput();
|
||||||
virtual void update(double dt);
|
|
||||||
virtual void init();
|
// Subsystem API.
|
||||||
virtual void postinit();
|
void init() override;
|
||||||
virtual void shutdown();
|
void postinit() override;
|
||||||
|
void shutdown() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class FGMacOSXEventInputPrivate;
|
friend class FGMacOSXEventInputPrivate;
|
||||||
|
|
|
@ -45,11 +45,13 @@ public:
|
||||||
FGMouseInput();
|
FGMouseInput();
|
||||||
virtual ~FGMouseInput() = default;
|
virtual ~FGMouseInput() = default;
|
||||||
|
|
||||||
|
// Subsystem API.
|
||||||
void init() override;
|
void init() override;
|
||||||
void shutdown() override;
|
|
||||||
void reinit() override;
|
void reinit() override;
|
||||||
void update( double dt ) override;
|
void shutdown() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
|
// Subsystem identification.
|
||||||
static const char* subsystemName() { return "input-mouse"; }
|
static const char* subsystemName() { return "input-mouse"; }
|
||||||
|
|
||||||
void doMouseClick (int b, int updown, int x, int y, bool mainWindow, const osgGA::GUIEventAdapter* ea);
|
void doMouseClick (int b, int updown, int x, int y, bool mainWindow, const osgGA::GUIEventAdapter* ea);
|
||||||
|
|
|
@ -55,6 +55,7 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual ~FGInput();
|
virtual ~FGInput();
|
||||||
|
|
||||||
|
// Subsystem identification.
|
||||||
static const char* subsystemName() { return "input"; }
|
static const char* subsystemName() { return "input"; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -121,10 +121,11 @@ class HUD : public SGSubsystem,
|
||||||
public:
|
public:
|
||||||
HUD();
|
HUD();
|
||||||
~HUD();
|
~HUD();
|
||||||
void init();
|
|
||||||
void update(double);
|
|
||||||
|
|
||||||
void reinit();
|
// Subsystem API.
|
||||||
|
void init() override;
|
||||||
|
void reinit() override;
|
||||||
|
void update(double) override;
|
||||||
|
|
||||||
// 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&);
|
||||||
|
|
|
@ -96,10 +96,11 @@ public:
|
||||||
KLN89(RenderArea2D* instrument);
|
KLN89(RenderArea2D* instrument);
|
||||||
~KLN89();
|
~KLN89();
|
||||||
|
|
||||||
void bind();
|
// Subsystem API.
|
||||||
void unbind();
|
void bind() override;
|
||||||
void init();
|
void init() override;
|
||||||
void update(double dt);
|
void unbind() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
// Set Units
|
// Set Units
|
||||||
// m if true, ft if false
|
// m if true, ft if false
|
||||||
|
|
|
@ -43,8 +43,9 @@ public:
|
||||||
ADF ( SGPropertyNode *node );
|
ADF ( SGPropertyNode *node );
|
||||||
virtual ~ADF ();
|
virtual ~ADF ();
|
||||||
|
|
||||||
virtual void init ();
|
// Subsystem API.
|
||||||
virtual void update (double delta_time_sec);
|
void init() override;
|
||||||
|
void update(double delta_time_sec) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void set_bearing (double delta_time_sec, double bearing);
|
void set_bearing (double delta_time_sec, double bearing);
|
||||||
|
|
|
@ -40,9 +40,10 @@ public:
|
||||||
AirspeedIndicator ( SGPropertyNode *node );
|
AirspeedIndicator ( SGPropertyNode *node );
|
||||||
virtual ~AirspeedIndicator ();
|
virtual ~AirspeedIndicator ();
|
||||||
|
|
||||||
virtual void init ();
|
// Subsystem API.
|
||||||
virtual void reinit ();
|
void init() override;
|
||||||
virtual void update (double dt);
|
void reinit() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void computeMach();
|
void computeMach();
|
||||||
|
|
|
@ -33,11 +33,12 @@ public:
|
||||||
Altimeter (SGPropertyNode *node, const std::string& aDefaultName, double quantum = 0);
|
Altimeter (SGPropertyNode *node, const std::string& aDefaultName, double quantum = 0);
|
||||||
virtual ~Altimeter ();
|
virtual ~Altimeter ();
|
||||||
|
|
||||||
virtual void init ();
|
// Subsystem API.
|
||||||
virtual void reinit ();
|
void bind() override;
|
||||||
virtual void update (double dt);
|
void init() override;
|
||||||
virtual void bind();
|
void reinit() override;
|
||||||
virtual void unbind();
|
void unbind() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
double getSettingInHg() const;
|
double getSettingInHg() const;
|
||||||
void setSettingInHg( double value );
|
void setSettingInHg( double value );
|
||||||
|
|
|
@ -42,11 +42,12 @@ public:
|
||||||
AttitudeIndicator ( SGPropertyNode *node );
|
AttitudeIndicator ( SGPropertyNode *node );
|
||||||
virtual ~AttitudeIndicator ();
|
virtual ~AttitudeIndicator ();
|
||||||
|
|
||||||
virtual void init ();
|
// Subsystem API.
|
||||||
virtual void reinit ();
|
void bind() override;
|
||||||
virtual void bind ();
|
void init() override;
|
||||||
virtual void unbind ();
|
void reinit() override;
|
||||||
virtual void update (double dt);
|
void unbind() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string _name;
|
std::string _name;
|
||||||
|
|
|
@ -32,8 +32,9 @@ public:
|
||||||
Clock(SGPropertyNode *node);
|
Clock(SGPropertyNode *node);
|
||||||
virtual ~Clock();
|
virtual ~Clock();
|
||||||
|
|
||||||
virtual void init();
|
// Subsystem API.
|
||||||
virtual void update(double dt);
|
void init() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string _name;
|
std::string _name;
|
||||||
|
|
|
@ -461,10 +461,11 @@ public:
|
||||||
CommRadioImpl(SGPropertyNode_ptr node);
|
CommRadioImpl(SGPropertyNode_ptr node);
|
||||||
virtual ~CommRadioImpl();
|
virtual ~CommRadioImpl();
|
||||||
|
|
||||||
void update(double dt) override;
|
// Subsystem API.
|
||||||
void init() override;
|
|
||||||
void bind() override;
|
void bind() override;
|
||||||
|
void init() override;
|
||||||
void unbind() override;
|
void unbind() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool _useEightPointThree = false;
|
bool _useEightPointThree = false;
|
||||||
|
|
|
@ -202,12 +202,13 @@ public:
|
||||||
DCLGPS(RenderArea2D* instrument);
|
DCLGPS(RenderArea2D* instrument);
|
||||||
virtual ~DCLGPS() = 0;
|
virtual ~DCLGPS() = 0;
|
||||||
|
|
||||||
virtual void draw(osg::State& state);
|
// Subsystem API.
|
||||||
|
void bind() override;
|
||||||
|
void init() override;
|
||||||
|
void unbind() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
virtual void init();
|
virtual void draw(osg::State& state);
|
||||||
virtual void bind();
|
|
||||||
virtual void unbind();
|
|
||||||
virtual void update(double dt);
|
|
||||||
|
|
||||||
// Expand a SIAP ident to the full procedure name.
|
// Expand a SIAP ident to the full procedure name.
|
||||||
std::string ExpandSIAPIdent(const std::string& ident);
|
std::string ExpandSIAPIdent(const std::string& ident);
|
||||||
|
|
|
@ -38,6 +38,7 @@ public:
|
||||||
DME ( SGPropertyNode *node );
|
DME ( SGPropertyNode *node );
|
||||||
virtual ~DME ();
|
virtual ~DME ();
|
||||||
|
|
||||||
|
// Subsystem API.
|
||||||
void init() override;
|
void init() override;
|
||||||
void reinit() override;
|
void reinit() override;
|
||||||
void update(double delta_time_sec) override;
|
void update(double delta_time_sec) override;
|
||||||
|
|
|
@ -64,13 +64,12 @@ public:
|
||||||
GPS ();
|
GPS ();
|
||||||
virtual ~GPS ();
|
virtual ~GPS ();
|
||||||
|
|
||||||
// SGSubsystem interface
|
// Subsystem API.
|
||||||
virtual void init ();
|
void bind() override;
|
||||||
virtual void reinit ();
|
void init() override;
|
||||||
virtual void update (double delta_time_sec);
|
void reinit() override;
|
||||||
|
void unbind() override;
|
||||||
virtual void bind();
|
void update(double delta_time_sec) override;
|
||||||
virtual void unbind();
|
|
||||||
|
|
||||||
// RNAV interface
|
// RNAV interface
|
||||||
virtual SGGeod position();
|
virtual SGGeod position();
|
||||||
|
|
|
@ -47,8 +47,9 @@ public:
|
||||||
GSDI(SGPropertyNode *node);
|
GSDI(SGPropertyNode *node);
|
||||||
virtual ~GSDI();
|
virtual ~GSDI();
|
||||||
|
|
||||||
virtual void init();
|
// Subsystem API.
|
||||||
virtual void update(double dt);
|
void init() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string _name;
|
std::string _name;
|
||||||
|
|
|
@ -39,11 +39,12 @@ public:
|
||||||
HeadingIndicator ();
|
HeadingIndicator ();
|
||||||
virtual ~HeadingIndicator ();
|
virtual ~HeadingIndicator ();
|
||||||
|
|
||||||
virtual void init ();
|
// Subsystem API.
|
||||||
virtual void reinit ();
|
void bind() override;
|
||||||
virtual void bind ();
|
void init() override;
|
||||||
virtual void unbind ();
|
void reinit() override;
|
||||||
virtual void update (double dt);
|
void unbind() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Gyro _gyro;
|
Gyro _gyro;
|
||||||
|
|
|
@ -37,11 +37,12 @@ public:
|
||||||
HeadingIndicatorDG ();
|
HeadingIndicatorDG ();
|
||||||
virtual ~HeadingIndicatorDG ();
|
virtual ~HeadingIndicatorDG ();
|
||||||
|
|
||||||
virtual void init ();
|
// Subsystem API.
|
||||||
virtual void reinit ();
|
void bind() override;
|
||||||
virtual void bind ();
|
void init() override;
|
||||||
virtual void unbind ();
|
void reinit() override;
|
||||||
virtual void update (double dt);
|
void unbind() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Gyro _gyro;
|
Gyro _gyro;
|
||||||
|
|
|
@ -39,11 +39,12 @@ public:
|
||||||
HeadingIndicatorFG ();
|
HeadingIndicatorFG ();
|
||||||
virtual ~HeadingIndicatorFG ();
|
virtual ~HeadingIndicatorFG ();
|
||||||
|
|
||||||
virtual void init ();
|
// Subsystem API.
|
||||||
virtual void reinit ();
|
void bind() override;
|
||||||
virtual void bind ();
|
void init() override;
|
||||||
virtual void unbind ();
|
void reinit() override;
|
||||||
virtual void update (double dt);
|
void unbind() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Gyro _gyro;
|
Gyro _gyro;
|
||||||
|
|
|
@ -54,9 +54,10 @@ public:
|
||||||
InstVerticalSpeedIndicator ( SGPropertyNode *node );
|
InstVerticalSpeedIndicator ( SGPropertyNode *node );
|
||||||
virtual ~InstVerticalSpeedIndicator ();
|
virtual ~InstVerticalSpeedIndicator ();
|
||||||
|
|
||||||
virtual void init ();
|
// Subsystem API.
|
||||||
virtual void reinit ();
|
void init() override;
|
||||||
virtual void update (double dt);
|
void reinit() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string _name;
|
std::string _name;
|
||||||
|
|
|
@ -31,8 +31,9 @@ public:
|
||||||
FGInstrumentMgr ();
|
FGInstrumentMgr ();
|
||||||
virtual ~FGInstrumentMgr ();
|
virtual ~FGInstrumentMgr ();
|
||||||
|
|
||||||
virtual void init();
|
// Subsystem API.
|
||||||
virtual InitStatus incrementalInit();
|
void init() override;
|
||||||
|
InitStatus incrementalInit() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool build (SGPropertyNode* config_props);
|
bool build (SGPropertyNode* config_props);
|
||||||
|
|
|
@ -108,11 +108,12 @@ public:
|
||||||
FGKR_87( SGPropertyNode *node );
|
FGKR_87( SGPropertyNode *node );
|
||||||
~FGKR_87();
|
~FGKR_87();
|
||||||
|
|
||||||
void init ();
|
// Subsystem API.
|
||||||
void reinit ();
|
void bind() override;
|
||||||
void bind ();
|
void init() override;
|
||||||
void unbind ();
|
void reinit() override;
|
||||||
void update (double dt_sec);
|
void unbind() override;
|
||||||
|
void update(double dt_sec) override;
|
||||||
|
|
||||||
// Update nav/adf radios based on current postition
|
// Update nav/adf radios based on current postition
|
||||||
void search ();
|
void search ();
|
||||||
|
|
|
@ -45,9 +45,10 @@ public:
|
||||||
MagCompass ();
|
MagCompass ();
|
||||||
virtual ~MagCompass ();
|
virtual ~MagCompass ();
|
||||||
|
|
||||||
virtual void init ();
|
// Subsystem API.
|
||||||
virtual void reinit ();
|
void init() override;
|
||||||
virtual void update (double dt);
|
void reinit() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
double _rate_degps;
|
double _rate_degps;
|
||||||
|
|
|
@ -66,11 +66,12 @@ public:
|
||||||
FGMarkerBeacon(SGPropertyNode *node);
|
FGMarkerBeacon(SGPropertyNode *node);
|
||||||
~FGMarkerBeacon();
|
~FGMarkerBeacon();
|
||||||
|
|
||||||
void init () override;
|
// Subsystem API.
|
||||||
void reinit () override;
|
void bind() override;
|
||||||
void bind () override;
|
void init() override;
|
||||||
void unbind () override;
|
void reinit() override;
|
||||||
void update (double dt) override;
|
void unbind() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
void search ();
|
void search ();
|
||||||
|
|
||||||
|
|
|
@ -1374,10 +1374,11 @@ class MK_VIII : public SGSubsystem
|
||||||
public:
|
public:
|
||||||
MK_VIII (SGPropertyNode *node);
|
MK_VIII (SGPropertyNode *node);
|
||||||
|
|
||||||
virtual void init ();
|
// Subsystem API.
|
||||||
virtual void bind ();
|
void bind() override;
|
||||||
virtual void unbind ();
|
void init() override;
|
||||||
virtual void update (double dt);
|
void unbind() override;
|
||||||
|
void update(double dt) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
|
|
@ -40,11 +40,12 @@ public:
|
||||||
MasterReferenceGyro ();
|
MasterReferenceGyro ();
|
||||||
virtual ~MasterReferenceGyro ();
|
virtual ~MasterReferenceGyro ();
|
||||||
|
|
||||||
virtual void init ();
|
// Subsystem API.
|
||||||
virtual void reinit ();
|
void bind() override;
|
||||||
virtual void bind ();
|
void init() override;
|
||||||
virtual void unbind ();
|
void reinit() override;
|
||||||
virtual void update (double dt);
|
void unbind() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const double gravity; //conversion factor
|
static const double gravity; //conversion factor
|
||||||
|
|
|
@ -173,9 +173,10 @@ public:
|
||||||
FGNavRadio(SGPropertyNode *node);
|
FGNavRadio(SGPropertyNode *node);
|
||||||
~FGNavRadio();
|
~FGNavRadio();
|
||||||
|
|
||||||
void init ();
|
// Subsystem API.
|
||||||
void reinit ();
|
void init() override;
|
||||||
void update (double dt);
|
void reinit() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
// Update nav/adf radios based on current postition
|
// Update nav/adf radios based on current postition
|
||||||
void search ();
|
void search ();
|
||||||
|
|
|
@ -808,8 +808,9 @@ public:
|
||||||
NavRadioImpl( SGPropertyNode_ptr node );
|
NavRadioImpl( SGPropertyNode_ptr node );
|
||||||
virtual ~NavRadioImpl();
|
virtual ~NavRadioImpl();
|
||||||
|
|
||||||
virtual void update( double dt );
|
// Subsystem API.
|
||||||
virtual void init();
|
void init() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void search();
|
void search();
|
||||||
|
|
|
@ -34,10 +34,11 @@ public:
|
||||||
RadarAltimeter ( SGPropertyNode *node );
|
RadarAltimeter ( SGPropertyNode *node );
|
||||||
virtual ~RadarAltimeter ();
|
virtual ~RadarAltimeter ();
|
||||||
|
|
||||||
private:
|
// Subsystem API.
|
||||||
virtual void init ();
|
void init() override;
|
||||||
virtual void update (double dt);
|
void update(double dt) override;
|
||||||
|
|
||||||
|
private:
|
||||||
void update_altitude();
|
void update_altitude();
|
||||||
void updateSetHeight();
|
void updateSetHeight();
|
||||||
|
|
||||||
|
|
|
@ -34,9 +34,10 @@ public:
|
||||||
SlipSkidBall ( SGPropertyNode *node );
|
SlipSkidBall ( SGPropertyNode *node );
|
||||||
virtual ~SlipSkidBall ();
|
virtual ~SlipSkidBall ();
|
||||||
|
|
||||||
virtual void init ();
|
// Subsystem API.
|
||||||
virtual void reinit ();
|
void init() override;
|
||||||
virtual void update (double dt);
|
void reinit() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string _name;
|
std::string _name;
|
||||||
|
|
|
@ -38,9 +38,10 @@ public:
|
||||||
TACAN(SGPropertyNode *node);
|
TACAN(SGPropertyNode *node);
|
||||||
virtual ~TACAN();
|
virtual ~TACAN();
|
||||||
|
|
||||||
virtual void init ();
|
// Subsystem API.
|
||||||
virtual void reinit ();
|
void init() override;
|
||||||
virtual void update (double delta_time_sec);
|
void reinit() override;
|
||||||
|
void update(double delta_time_sec) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void disabled(bool force = false);
|
void disabled(bool force = false);
|
||||||
|
|
|
@ -381,12 +381,12 @@ private:
|
||||||
public:
|
public:
|
||||||
TCAS (SGPropertyNode* node);
|
TCAS (SGPropertyNode* node);
|
||||||
|
|
||||||
virtual void bind (void);
|
// Subsystem API.
|
||||||
virtual void unbind (void);
|
void bind() override;
|
||||||
virtual void init (void);
|
void init() override;
|
||||||
virtual void reinit (void);
|
void reinit() override;
|
||||||
virtual void update (double dt);
|
void unbind() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
/* configuration options */
|
/* configuration options */
|
||||||
int _verticalRange;
|
int _verticalRange;
|
||||||
|
|
|
@ -34,10 +34,11 @@ public:
|
||||||
Transponder(SGPropertyNode *node);
|
Transponder(SGPropertyNode *node);
|
||||||
virtual ~Transponder();
|
virtual ~Transponder();
|
||||||
|
|
||||||
void init () override;
|
// Subsystem API.
|
||||||
void update (double dt) override;
|
|
||||||
void bind() override;
|
void bind() override;
|
||||||
|
void init() override;
|
||||||
void unbind() override;
|
void unbind() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool isPowerSwitchOn() const override;
|
bool isPowerSwitchOn() const override;
|
||||||
|
|
|
@ -41,11 +41,12 @@ public:
|
||||||
TurnIndicator ( SGPropertyNode *node );
|
TurnIndicator ( SGPropertyNode *node );
|
||||||
virtual ~TurnIndicator ();
|
virtual ~TurnIndicator ();
|
||||||
|
|
||||||
virtual void init ();
|
// Subsystem API.
|
||||||
virtual void reinit ();
|
void bind() override;
|
||||||
virtual void bind ();
|
void init() override;
|
||||||
virtual void unbind ();
|
void reinit() override;
|
||||||
virtual void update (double dt);
|
void unbind() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Gyro _gyro;
|
Gyro _gyro;
|
||||||
|
|
|
@ -37,9 +37,10 @@ public:
|
||||||
VerticalSpeedIndicator ( SGPropertyNode *node );
|
VerticalSpeedIndicator ( SGPropertyNode *node );
|
||||||
virtual ~VerticalSpeedIndicator ();
|
virtual ~VerticalSpeedIndicator ();
|
||||||
|
|
||||||
virtual void init ();
|
// Subsystem API.
|
||||||
virtual void reinit ();
|
void init() override;
|
||||||
virtual void update (double dt);
|
void reinit() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
double _casing_pressure_Pa = 0.0;
|
double _casing_pressure_Pa = 0.0;
|
||||||
|
|
|
@ -40,13 +40,13 @@ public:
|
||||||
FGIO();
|
FGIO();
|
||||||
~FGIO();
|
~FGIO();
|
||||||
|
|
||||||
void init();
|
// Subsystem API.
|
||||||
void reinit();
|
void bind() override;
|
||||||
void bind();
|
void init() override;
|
||||||
void unbind();
|
void reinit() override;
|
||||||
void update( double dt );
|
void shutdown() override;
|
||||||
|
void unbind() override;
|
||||||
void shutdown();
|
void update(double dt) override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* helper to determine early in startup, if MP will be used.
|
* helper to determine early in startup, if MP will be used.
|
||||||
|
|
|
@ -23,10 +23,11 @@ public:
|
||||||
FGProperties ();
|
FGProperties ();
|
||||||
virtual ~FGProperties ();
|
virtual ~FGProperties ();
|
||||||
|
|
||||||
void init ();
|
// Subsystem API.
|
||||||
void bind ();
|
void bind() override;
|
||||||
void unbind ();
|
void init() override;
|
||||||
void update (double dt);
|
void unbind() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
simgear::TiedPropertyList _tiedProperties;
|
simgear::TiedPropertyList _tiedProperties;
|
||||||
|
|
|
@ -20,12 +20,12 @@
|
||||||
class FGLogger : public SGSubsystem
|
class FGLogger : public SGSubsystem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Implementation of SGSubsystem
|
// Subsystem API.
|
||||||
virtual void init ();
|
void bind() override;
|
||||||
virtual void reinit ();
|
void init() override;
|
||||||
virtual void bind ();
|
void reinit() override;
|
||||||
virtual void unbind ();
|
void unbind() override;
|
||||||
virtual void update (double dt);
|
void update(double dt) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -24,17 +24,20 @@ public:
|
||||||
FGAircraftModel ();
|
FGAircraftModel ();
|
||||||
virtual ~FGAircraftModel ();
|
virtual ~FGAircraftModel ();
|
||||||
|
|
||||||
virtual void init ();
|
// Subsystem API.
|
||||||
virtual void shutdown ();
|
void bind() override;
|
||||||
virtual void reinit ();
|
void init() override;
|
||||||
virtual void bind ();
|
void reinit() override;
|
||||||
virtual void unbind ();
|
void shutdown() override;
|
||||||
virtual void update (double dt);
|
void unbind() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
|
// Subsystem identification.
|
||||||
|
static const char* subsystemName() { return "aircraft-model"; }
|
||||||
|
|
||||||
virtual SGModelPlacement * get3DModel() { return _aircraft.get(); }
|
virtual SGModelPlacement * get3DModel() { return _aircraft.get(); }
|
||||||
virtual SGVec3d& getVelocity() { return _velocity; }
|
virtual SGVec3d& getVelocity() { return _velocity; }
|
||||||
|
|
||||||
static const char* subsystemName() { return "aircraft-model"; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void deinit ();
|
void deinit ();
|
||||||
|
|
||||||
|
|
|
@ -54,12 +54,15 @@ public:
|
||||||
FGModelMgr ();
|
FGModelMgr ();
|
||||||
virtual ~FGModelMgr ();
|
virtual ~FGModelMgr ();
|
||||||
|
|
||||||
virtual void init ();
|
// Subsystem API.
|
||||||
virtual void shutdown ();
|
void bind() override;
|
||||||
|
void init() override;
|
||||||
|
void shutdown() override;
|
||||||
|
void unbind() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
virtual void bind ();
|
// Subsystem identification.
|
||||||
virtual void unbind ();
|
static const char* subsystemName() { return "model-manager"; }
|
||||||
virtual void update (double dt);
|
|
||||||
|
|
||||||
virtual void add_model (SGPropertyNode * node);
|
virtual void add_model (SGPropertyNode * node);
|
||||||
|
|
||||||
|
@ -83,8 +86,6 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual void remove_instance (Instance * instance);
|
virtual void remove_instance (Instance * instance);
|
||||||
|
|
||||||
static const char* subsystemName() { return "model-manager"; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
* Listener class that adds models at runtime.
|
* Listener class that adds models at runtime.
|
||||||
|
|
|
@ -54,11 +54,11 @@ public:
|
||||||
FGMultiplayMgr();
|
FGMultiplayMgr();
|
||||||
~FGMultiplayMgr();
|
~FGMultiplayMgr();
|
||||||
|
|
||||||
virtual void init(void);
|
// Subsystem API.
|
||||||
virtual void update(double dt);
|
void init() override;
|
||||||
|
void reinit() override;
|
||||||
virtual void shutdown(void);
|
void shutdown() override;
|
||||||
virtual void reinit();
|
void update(double dt) override;
|
||||||
|
|
||||||
// transmitter
|
// transmitter
|
||||||
|
|
||||||
|
|
|
@ -31,18 +31,20 @@ public:
|
||||||
FGDNSClient();
|
FGDNSClient();
|
||||||
virtual ~FGDNSClient();
|
virtual ~FGDNSClient();
|
||||||
|
|
||||||
|
// Subsystem API.
|
||||||
|
void init() override;
|
||||||
|
void postinit() override;
|
||||||
|
void shutdown() override;
|
||||||
|
void update(double) override;
|
||||||
|
|
||||||
|
// Subsystem identification.
|
||||||
|
static const char* subsystemName() { return "dns"; }
|
||||||
|
|
||||||
void makeRequest(const simgear::DNS::Request_ptr& req);
|
void makeRequest(const simgear::DNS::Request_ptr& req);
|
||||||
|
|
||||||
// simgear::HTTP::Client* client() { return _http.get(); }
|
// simgear::HTTP::Client* client() { return _http.get(); }
|
||||||
// simgear::HTTP::Client const* client() const { return _http.get(); }
|
// simgear::HTTP::Client const* client() const { return _http.get(); }
|
||||||
|
|
||||||
virtual void init();
|
|
||||||
virtual void postinit();
|
|
||||||
virtual void shutdown();
|
|
||||||
virtual void update(double);
|
|
||||||
|
|
||||||
static const char* subsystemName() { return "dns"; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool _inited;
|
bool _inited;
|
||||||
std::unique_ptr<simgear::DNS::Client> _dns;
|
std::unique_ptr<simgear::DNS::Client> _dns;
|
||||||
|
|
|
@ -31,16 +31,20 @@ public:
|
||||||
FGHTTPClient();
|
FGHTTPClient();
|
||||||
virtual ~FGHTTPClient();
|
virtual ~FGHTTPClient();
|
||||||
|
|
||||||
|
// Subsystem API.
|
||||||
|
void init() override;
|
||||||
|
void postinit() override;
|
||||||
|
void shutdown() override;
|
||||||
|
void update(double) override;
|
||||||
|
|
||||||
|
// Subsystem identification.
|
||||||
|
static const char* subsystemName() { return "http"; }
|
||||||
|
|
||||||
void makeRequest(const simgear::HTTP::Request_ptr& req);
|
void makeRequest(const simgear::HTTP::Request_ptr& req);
|
||||||
|
|
||||||
simgear::HTTP::Client* client() { return _http.get(); }
|
simgear::HTTP::Client* client() { return _http.get(); }
|
||||||
simgear::HTTP::Client const* client() const { return _http.get(); }
|
simgear::HTTP::Client const* client() const { return _http.get(); }
|
||||||
|
|
||||||
virtual void init();
|
|
||||||
virtual void postinit();
|
|
||||||
virtual void shutdown();
|
|
||||||
virtual void update(double);
|
|
||||||
|
|
||||||
bool isDefaultCatalogInstalled() const;
|
bool isDefaultCatalogInstalled() const;
|
||||||
void addDefaultCatalog();
|
void addDefaultCatalog();
|
||||||
|
|
||||||
|
@ -48,8 +52,6 @@ public:
|
||||||
std::string getDefaultCatalogUrl() const;
|
std::string getDefaultCatalogUrl() const;
|
||||||
std::string getDefaultCatalogFallbackUrl() const;
|
std::string getDefaultCatalogFallbackUrl() const;
|
||||||
|
|
||||||
static const char* subsystemName() { return "http"; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool _inited;
|
bool _inited;
|
||||||
std::unique_ptr<simgear::HTTP::Client> _http;
|
std::unique_ptr<simgear::HTTP::Client> _http;
|
||||||
|
|
|
@ -38,16 +38,18 @@
|
||||||
class SwiftConnection : public SGSubsystem
|
class SwiftConnection : public SGSubsystem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bool startServer(const SGPropertyNode* arg, SGPropertyNode* root);
|
|
||||||
bool stopServer(const SGPropertyNode* arg, SGPropertyNode* root);
|
|
||||||
SwiftConnection();
|
SwiftConnection();
|
||||||
~SwiftConnection();
|
~SwiftConnection();
|
||||||
FGSwiftBus::CPlugin* plug;
|
|
||||||
|
|
||||||
virtual void init(void);
|
// Subsystem API.
|
||||||
virtual void update(double delta_time_sec) override;
|
void init() override;
|
||||||
virtual void shutdown(void);
|
void reinit() override;
|
||||||
virtual void reinit();
|
void shutdown() override;
|
||||||
|
void update(double delta_time_sec) override;
|
||||||
|
|
||||||
|
bool startServer(const SGPropertyNode* arg, SGPropertyNode* root);
|
||||||
|
bool stopServer(const SGPropertyNode* arg, SGPropertyNode* root);
|
||||||
|
FGSwiftBus::CPlugin* plug;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool serverRunning = false;
|
bool serverRunning = false;
|
||||||
|
|
|
@ -30,13 +30,15 @@ public:
|
||||||
FGCom();
|
FGCom();
|
||||||
virtual ~FGCom();
|
virtual ~FGCom();
|
||||||
|
|
||||||
virtual void bind();
|
// Subsystem API.
|
||||||
virtual void unbind();
|
void bind() override;
|
||||||
virtual void init();
|
void init() override;
|
||||||
virtual void postinit();
|
void postinit() override;
|
||||||
virtual void update(double dt);
|
void shutdown() override;
|
||||||
|
void unbind() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
virtual void valueChanged(SGPropertyNode *prop);
|
virtual void valueChanged(SGPropertyNode *prop);
|
||||||
virtual void shutdown();
|
|
||||||
void iaxTextEvent(struct iaxc_ev_text text);
|
void iaxTextEvent(struct iaxc_ev_text text);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -179,31 +179,11 @@ public:
|
||||||
*/
|
*/
|
||||||
~MongooseHttpd();
|
~MongooseHttpd();
|
||||||
|
|
||||||
/**
|
// Subsystem API.
|
||||||
* override SGSubsystem::init()
|
void bind() override; // Currently a noop
|
||||||
*
|
void init() override; // Reads the configuration PropertyNode, installs URIHandlers and configures mongoose
|
||||||
* Reads the configuration PropertyNode, installs URIHandlers and configures mongoose
|
void unbind() override; // shutdown of mongoose, clear connections, unregister URIHandlers
|
||||||
*/
|
void update(double dt) override; // poll connections, check for changed properties
|
||||||
void init();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* override SGSubsystem::bind()
|
|
||||||
*
|
|
||||||
* Currently a noop
|
|
||||||
*/
|
|
||||||
void bind();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* override SGSubsystem::unbind()
|
|
||||||
* shutdown of mongoose, clear connections, unregister URIHandlers
|
|
||||||
*/
|
|
||||||
void unbind();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* overrride SGSubsystem::update()
|
|
||||||
* poll connections, check for changed properties
|
|
||||||
*/
|
|
||||||
void update(double dt);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a URIHandler for the given uri
|
* Returns a URIHandler for the given uri
|
||||||
|
|
|
@ -71,13 +71,16 @@ public:
|
||||||
FGScenery();
|
FGScenery();
|
||||||
~FGScenery();
|
~FGScenery();
|
||||||
|
|
||||||
// Implementation of SGSubsystem.
|
// Subsystem API.
|
||||||
void init ();
|
void bind() override;
|
||||||
void reinit();
|
void init() override;
|
||||||
void shutdown ();
|
void reinit() override;
|
||||||
void bind ();
|
void shutdown() override;
|
||||||
void unbind ();
|
void unbind() override;
|
||||||
void update (double dt);
|
void update(double dt) override;
|
||||||
|
|
||||||
|
// Subsystem identification.
|
||||||
|
static const char* subsystemName() { return "scenery"; }
|
||||||
|
|
||||||
/// Compute the elevation of the scenery at geodetic latitude lat,
|
/// Compute the elevation of the scenery at geodetic latitude lat,
|
||||||
/// geodetic longitude lon and not higher than max_alt.
|
/// geodetic longitude lon and not higher than max_alt.
|
||||||
|
@ -141,9 +144,6 @@ public:
|
||||||
// tile mgr api
|
// tile mgr api
|
||||||
bool schedule_scenery(const SGGeod& position, double range_m, double duration=0.0);
|
bool schedule_scenery(const SGGeod& position, double range_m, double duration=0.0);
|
||||||
void materialLibChanged();
|
void materialLibChanged();
|
||||||
|
|
||||||
static const char* subsystemName() { return "scenery"; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// the terrain engine
|
// the terrain engine
|
||||||
FGTerrain* _terrain;
|
FGTerrain* _terrain;
|
||||||
|
|
|
@ -37,10 +37,15 @@ class FGNasalSys : public SGSubsystem
|
||||||
public:
|
public:
|
||||||
FGNasalSys();
|
FGNasalSys();
|
||||||
virtual ~FGNasalSys();
|
virtual ~FGNasalSys();
|
||||||
|
|
||||||
|
// Subsystem API.
|
||||||
void init() override;
|
void init() override;
|
||||||
void shutdown() override;
|
void shutdown() override;
|
||||||
void update(double dt) override;
|
void update(double dt) override;
|
||||||
|
|
||||||
|
// Subsystem identification.
|
||||||
|
static const char* subsystemName() { return "nasal"; }
|
||||||
|
|
||||||
// Loads a nasal script from an external file and inserts it as a
|
// Loads a nasal script from an external file and inserts it as a
|
||||||
// global module of the specified name.
|
// global module of the specified name.
|
||||||
bool loadModule(SGPath file, const char* moduleName);
|
bool loadModule(SGPath file, const char* moduleName);
|
||||||
|
@ -156,8 +161,6 @@ public:
|
||||||
simgear::BufferedLogCallback* log() const
|
simgear::BufferedLogCallback* log() const
|
||||||
{ return _log.get(); }
|
{ return _log.get(); }
|
||||||
|
|
||||||
static const char* subsystemName() { return "nasal"; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
//friend class FGNasalScript;
|
//friend class FGNasalScript;
|
||||||
friend class FGNasalListener;
|
friend class FGNasalListener;
|
||||||
|
|
|
@ -38,10 +38,14 @@ public:
|
||||||
FGSoundManager();
|
FGSoundManager();
|
||||||
virtual ~FGSoundManager();
|
virtual ~FGSoundManager();
|
||||||
|
|
||||||
void init(void);
|
// Subsystem API.
|
||||||
virtual void shutdown();
|
void init() override;
|
||||||
void update(double dt);
|
void reinit() override;
|
||||||
void reinit(void);
|
void shutdown() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
|
// Subsystem identification.
|
||||||
|
static const char* subsystemName() { return "sound"; }
|
||||||
|
|
||||||
void activate(bool State);
|
void activate(bool State);
|
||||||
void update_device_list();
|
void update_device_list();
|
||||||
|
@ -73,8 +77,10 @@ public:
|
||||||
FGSoundManager() { fgSetBool("/sim/sound/working", false);}
|
FGSoundManager() { fgSetBool("/sim/sound/working", false);}
|
||||||
~FGSoundManager() {}
|
~FGSoundManager() {}
|
||||||
|
|
||||||
void update(double dt) {}
|
// Subsystem API.
|
||||||
|
void update(double dt) {} override
|
||||||
|
|
||||||
|
// Subsystem identification.
|
||||||
static const char* subsystemName() { return "sound"; }
|
static const char* subsystemName() { return "sound"; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -55,9 +55,11 @@ class FGVoiceMgr : public SGSubsystem
|
||||||
public:
|
public:
|
||||||
FGVoiceMgr();
|
FGVoiceMgr();
|
||||||
~FGVoiceMgr();
|
~FGVoiceMgr();
|
||||||
void init(void);
|
|
||||||
void shutdown();
|
// Subsystem API.
|
||||||
void update(double dt);
|
void init() override;
|
||||||
|
void shutdown() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
class FGVoice;
|
class FGVoice;
|
||||||
|
|
||||||
|
|
|
@ -219,10 +219,11 @@ public:
|
||||||
FGElectricalSystem ( SGPropertyNode *node );
|
FGElectricalSystem ( SGPropertyNode *node );
|
||||||
virtual ~FGElectricalSystem ();
|
virtual ~FGElectricalSystem ();
|
||||||
|
|
||||||
void init () override;
|
// Subsystem API.
|
||||||
void bind () override;
|
void bind() override;
|
||||||
void unbind () override;
|
void init() override;
|
||||||
void update (double dt) override;
|
void unbind() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
bool build (SGPropertyNode* config_props);
|
bool build (SGPropertyNode* config_props);
|
||||||
float propagate( FGElectricalComponent *node, double dt,
|
float propagate( FGElectricalComponent *node, double dt,
|
||||||
|
|
|
@ -44,10 +44,11 @@ public:
|
||||||
PitotSystem ( SGPropertyNode *node );
|
PitotSystem ( SGPropertyNode *node );
|
||||||
virtual ~PitotSystem ();
|
virtual ~PitotSystem ();
|
||||||
|
|
||||||
virtual void init ();
|
// Subsystem API.
|
||||||
virtual void bind ();
|
void bind() override;
|
||||||
virtual void unbind ();
|
void init() override;
|
||||||
virtual void update (double dt);
|
void unbind() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string _name;
|
std::string _name;
|
||||||
|
|
|
@ -40,11 +40,12 @@ public:
|
||||||
StaticSystem ( int i );
|
StaticSystem ( int i );
|
||||||
virtual ~StaticSystem ();
|
virtual ~StaticSystem ();
|
||||||
|
|
||||||
virtual void init ();
|
// Subsystem API.
|
||||||
virtual void reinit ();
|
void bind() override;
|
||||||
virtual void bind ();
|
void init() override;
|
||||||
virtual void unbind ();
|
void reinit() override;
|
||||||
virtual void update (double dt);
|
void unbind() override;
|
||||||
|
void update(double dt) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string _name;
|
std::string _name;
|
||||||
|
|
|
@ -30,6 +30,7 @@ class FGSystemMgr : public SGSubsystemGroup
|
||||||
public:
|
public:
|
||||||
FGSystemMgr ();
|
FGSystemMgr ();
|
||||||
virtual ~FGSystemMgr ();
|
virtual ~FGSystemMgr ();
|
||||||
|
|
||||||
bool build (SGPropertyNode* config_props);
|
bool build (SGPropertyNode* config_props);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue