]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGFDMExec.h
Updated to match changes in radiostack.[ch]xx
[flightgear.git] / src / FDM / JSBSim / FGFDMExec.h
index c7a8c7b505417695d43fb80c1d0fccc3b868b2d7..10262d8d3764f777e75cf3bb916252a57d2a08b3 100644 (file)
@@ -43,8 +43,9 @@ INCLUDES
 #include "FGModel.h"
 #include "FGInitialCondition.h"
 #include "FGJSBBase.h"
-#include <vector>
+#include "FGPropertyManager.h"
 
+#include <vector>
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 DEFINITIONS
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
@@ -68,6 +69,10 @@ CLASS DOCUMENTATION
 /** Encapsulates the JSBSim simulation executive.
     @author Jon S. Berndt
     @version $Id$
+    @see <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jsbsim/JSBSim/FGFDMExec.h?rev=HEAD&content-type=text/vnd.viewcvs-markup">
+         Header File </a>
+    @see <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jsbsim/JSBSim/FGFDMExec.cpp?rev=HEAD&content-type=text/vnd.viewcvs-markup">
+         Source File </a>
 
     @doc This class is the interface class through which all other simulation classes
     are instantiated, initialized, and run. When integrated with FlightGear (or
@@ -111,9 +116,10 @@ CLASS DECLARATION
 class FGFDMExec : public FGJSBBase
 {
 public:
-  /// Default constructor
-  FGFDMExec(void);
 
+  /// Default constructor
+  FGFDMExec(FGPropertyManager* root = 0);
+  
   /// Default destructor
   ~FGFDMExec();
 
@@ -197,7 +203,11 @@ public:
   inline string GetEnginePath(void)          {return EnginePath;}
   /// Retrieves the aircraft path.
   inline string GetAircraftPath(void)        {return AircraftPath;}
-
+  
+  FGPropertyManager* GetPropertyManager(void);
+  vector <string> EnumerateFDMs(void);
+  void SetSlave(void) {IsSlave = true;}
+  
 private:
   FGModel* FirstModel;
 
@@ -208,6 +218,28 @@ private:
   unsigned int IdFDM;
   static unsigned int FDMctr;
   bool modelLoaded;
+  bool IsSlave;
+  static FGPropertyManager *master;
+  FGPropertyManager *instance;
+  
+  struct slaveData {
+    FGFDMExec* exec;
+    string info;
+    double x, y, z;
+    double roll, pitch, yaw;
+    bool mated;
+
+    slaveData(void) {
+      info = "";
+      x = y = z = 0.0;
+      roll = pitch = yaw = 0.0;
+      mated = true;
+    }
+
+    ~slaveData(void) {
+      delete exec;
+    }
+  };
 
   string AircraftPath;
   string EnginePath;
@@ -228,7 +260,10 @@ private:
   FGAuxiliary*       Auxiliary;
   FGOutput*          Output;
 
+  vector <slaveData*> SlaveFDMList;
+
   bool ReadMetrics(FGConfigFile*);
+  bool ReadSlave(FGConfigFile*);
   bool ReadPropulsion(FGConfigFile*);
   bool ReadFlightControls(FGConfigFile*);
   bool ReadAerodynamics(FGConfigFile*);