DEFINITIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#define ID_OUTPUT "$Id: FGOutput.h,v 1.18 2010/10/15 11:30:29 jberndt Exp $"
+#define ID_OUTPUT "$Id: FGOutput.h,v 1.25 2012/02/07 23:15:37 bcoconni Exp $"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FORWARD DECLARATIONS
Examples:
</pre>
@code
- <output name="localhost" type="FLIGHTGEAR" port="5500" protocol="tcp" rate="10"/>
+<output name="localhost" type="FLIGHTGEAR" port="5500" protocol="tcp" rate="10"/>
@endcode
@code
- <output name="B737_datalog.csv" type="CSV" rate="20">
- <property> velocities/vc-kts </property>
- <velocities> ON </velocities>
- </output>
+<output name="B737_datalog.csv" type="CSV" rate="20">
+ <property> velocities/vc-kts </property>
+ <velocities> ON </velocities>
+</output>
@endcode
<br>
<pre>
propulsion ON|OFF
</pre>
NOTE that Time is always output with the data.
- @version $Id: FGOutput.h,v 1.18 2010/10/15 11:30:29 jberndt Exp $
+ @version $Id: FGOutput.h,v 1.25 2012/02/07 23:15:37 bcoconni Exp $
*/
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
~FGOutput();
bool InitModel(void);
- bool Run(void);
-
+ /** Runs the Output model; called by the Executive
+ Can pass in a value indicating if the executive is directing the simulation to Hold.
+ @param Holding if true, the executive has been directed to hold the sim from
+ advancing time. Some models may ignore this flag, such as the Input
+ model, which may need to be active to listen on a socket for the
+ "Resume" command to be given.
+ @return false if no error */
+ bool Run(bool Holding);
+
+ void Print(void);
void DelimitedOutput(const std::string&);
void SocketOutput(void);
void FlightGearSocketOutput(void);
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 SetRate(double rt);
void Enable(void) { enabled = true; }
void Disable(void) { enabled = false; }
bool Toggle(void) {enabled = !enabled; return enabled;}
bool Load(Element* el);
+ bool Load(int subSystems, std::string protocol, std::string type, std::string port,
+ std::string name, double outRate,
+ std::vector<FGPropertyManager *> & outputProperties);
string GetOutputFileName(void) const {return Filename;}
/// Subsystem types for specifying which will be output in the FDM data logging
/** Subsystem: Moments (= 32) */ ssMoments = 32,
/** Subsystem: Atmosphere (= 64) */ ssAtmosphere = 64,
/** Subsystem: Mass Properties (= 128) */ ssMassProps = 128,
- /** Subsystem: Coefficients (= 256) */ ssCoefficients = 256,
+ /** Subsystem: Coefficients (= 256) */ ssAeroFunctions = 256,
/** Subsystem: Propagate (= 512) */ ssPropagate = 512,
/** Subsystem: Ground Reactions (= 1024) */ ssGroundReactions = 1024,
/** Subsystem: FCS (= 2048) */ ssFCS = 2048,
/** Subsystem: Propulsion (= 4096) */ ssPropulsion = 4096
} subsystems;
-
FGNetFDM fgSockBuf;
private: