X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FFDM%2FJSBSim%2Fmodels%2FFGOutput.h;h=d03ac5981ac54aff208d950de396ed87ad2f0749;hb=4f364af6d178d947eae1a5a751e3a9542b270069;hp=cd1ca6e30881c39587eb101bd983a772e0b547f6;hpb=e503591af4f16814d78ded49c5979e273d81a0be;p=flightgear.git diff --git a/src/FDM/JSBSim/models/FGOutput.h b/src/FDM/JSBSim/models/FGOutput.h index cd1ca6e30..d03ac5981 100644 --- a/src/FDM/JSBSim/models/FGOutput.h +++ b/src/FDM/JSBSim/models/FGOutput.h @@ -45,12 +45,13 @@ INCLUDES #include "input_output/FGXMLFileRead.h" #include "input_output/net_fdm.hxx" +#include "input_output/FGfdmSocket.h" /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DEFINITIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ -#define ID_OUTPUT "$Id$" +#define ID_OUTPUT "$Id: FGOutput.h,v 1.19 2010/10/31 04:48:46 jberndt Exp $" /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FORWARD DECLARATIONS @@ -123,7 +124,7 @@ CLASS DOCUMENTATION propulsion ON|OFF NOTE that Time is always output with the data. - @version $Id$ + @version $Id: FGOutput.h,v 1.19 2010/10/31 04:48:46 jberndt Exp $ */ /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -145,17 +146,19 @@ public: void SocketStatusOutput(const std::string&); void SocketDataFill(FGNetFDM* net); - void SetType(const std::string& type); + void SetProtocol(const std::string& protocol); + void SetPort(const std::string& port); void SetStartNewFile(bool tt) {StartNewFile = tt;} void SetSubsystems(int tt) {SubSystems = tt;} + void SetOutputFileName(const std::string& fname) {Filename = fname;} + void SetDirectivesFile(const std::string& fname) {DirectivesFile = fname;} + void SetRate(int rt); void Enable(void) { enabled = true; } void Disable(void) { enabled = false; } bool Toggle(void) {enabled = !enabled; return enabled;} + bool Load(Element* el); - void SetOutputFileName(const std::string& fname) {Filename = fname;} - void SetDirectivesFile(const std::string& fname) {DirectivesFile = fname;} - void SetRate(int rt); string GetOutputFileName(void) const {return Filename;} /// Subsystem types for specifying which will be output in the FDM data logging @@ -175,19 +178,19 @@ public: /** Subsystem: Propulsion (= 4096) */ ssPropulsion = 4096 } subsystems; - FGNetFDM fgSockBuf; private: enum {otNone, otCSV, otTab, otSocket, otTerminal, otFlightGear, otUnknown} Type; + FGfdmSocket::ProtocolType Protocol; bool sFirstPass, dFirstPass, enabled; int SubSystems; int runID_postfix; bool StartNewFile; std::string output_file_name, delimeter, BaseFilename, Filename, DirectivesFile; + std::string Port; std::ofstream datafile; FGfdmSocket* socket; - FGfdmSocket* flightGearSocket; std::vector OutputProperties; void Debug(int from);