]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGOutput.h
JSBSim tweaks.
[flightgear.git] / src / FDM / JSBSim / FGOutput.h
index fc94daa1833c1f3cbc834151dc033e0565647f6b..6638a89bbe81a721caabc4580fee7aff17d44e06 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGOutput.h
  Author:       Jon Berndt
@@ -27,57 +27,67 @@ HISTORY
 --------------------------------------------------------------------------------
 12/02/98   JSB   Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGOUTPUT_H
 #define FGOUTPUT_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGModel.h"
 
 #ifdef FGFS
-#  include <Include/compiler.h>
-#  ifdef FG_HAVE_STD_INCLUDES
-#    include <iostream>
-#    include <fstream>
-#  else
-#    include <iostream.h>
-#    include <fstream.h>
-#  endif
+#  include <simgear/compiler.h>
+#  include STL_IOSTREAM
+#  include STL_FSTREAM
 #else
 #  include <iostream>
 #  include <fstream>
 #endif
 
-//using namespace std;
+#include "FGfdmSocket.h"
 
-/*******************************************************************************
+#define ID_OUTPUT "$Id$"
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGOutput : public FGModel
 {
 public:
   FGOutput(FGFDMExec*);
-  ~FGOutput(void);
+  ~FGOutput();
 
   bool Run(void);
 
   void DelimitedOutput(void);
   void DelimitedOutput(string);
+  void SocketOutput(void);
+  void SocketStatusOutput(string);
+  void SetFilename(string fn) {Filename = fn;}
+  void SetType(string);
+  void SetSubsystems(int tt) {SubSystems = tt;}
+  inline void Enable(void) { enabled = true; }
+  inline void Disable(void) { enabled = false; }
+  inline bool Toggle(void) {enabled = !enabled; return enabled;}
 
 protected:
 
 private:
-  bool FirstPass;
+  bool sFirstPass, dFirstPass, enabled;
+  int SubSystems;
+  string Filename;
+  enum {otNone, otCSV, otTab, otSocket, otTerminal, otUnknown} Type;
   ofstream datafile;
+  FGfdmSocket* socket;
+  void Debug(void);
 };
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif