]> 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 365efb29db1880b28c12e83d186f9d3962f6258b..10262d8d3764f777e75cf3bb916252a57d2a08b3 100644 (file)
@@ -69,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
@@ -113,7 +117,6 @@ class FGFDMExec : public FGJSBBase
 {
 public:
 
-  
   /// Default constructor
   FGFDMExec(FGPropertyManager* root = 0);
   
@@ -202,7 +205,9 @@ public:
   inline string GetAircraftPath(void)        {return AircraftPath;}
   
   FGPropertyManager* GetPropertyManager(void);
-
+  vector <string> EnumerateFDMs(void);
+  void SetSlave(void) {IsSlave = true;}
+  
 private:
   FGModel* FirstModel;
 
@@ -213,9 +218,28 @@ private:
   unsigned int IdFDM;
   static unsigned int FDMctr;
   bool modelLoaded;
-  
-  FGPropertyManager *master;
+  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;
@@ -236,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*);