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