#include "FGPosition.h"
#include "FGAuxiliary.h"
+static const char *IdSrc = "$Header$";
+static const char *IdHdr = ID_OUTPUT;
+
/*******************************************************************************
************************************ CODE **************************************
*******************************************************************************/
Type = otNone;
Filename = "JSBSim.out";
SubSystems = 0;
+ enabled = true;
#ifdef FG_WITH_JSBSIM_SOCKET
socket = new FGfdmSocket("localhost",1138);
bool FGOutput::Run(void)
{
- if (!FGModel::Run()) {
-
- if (Type == otSocket) {
- SocketOutput();
- } else if (Type == otCSV) {
- if (Filename != "COUT" && Filename != "cout" && Filename.size() > 0) {
- DelimitedOutput(Filename);
+ if (enabled) {
+ if (!FGModel::Run()) {
+
+ if (Type == otSocket) {
+ SocketOutput();
+ } else if (Type == otCSV) {
+ if (Filename != "COUT" && Filename != "cout" && Filename.size() > 0) {
+ DelimitedOutput(Filename);
+ } else {
+ DelimitedOutput();
+ }
+ } else if (Type == otTerminal) {
+ // Not done yet
+ } else if (Type == otNone) {
+ // Do nothing
} else {
- DelimitedOutput();
+ // Not a valid type of output
}
- } else if (Type == otTerminal) {
- // Not done yet
- } else if (Type == otNone) {
- // Do nothing
+
} else {
- // Not a valid type of output
}
-
- } else {
}
-
return false;
}
{
string asciiData;
/*
- if (socket <= 0) return;
+ if (socket == NULL) return;
socket->Clear();
if (sFirstPass) {
{
string asciiData;
- if (socket <= 0) return;
+ if (socket == NULL) return;
socket->Clear();
asciiData = string("<STATUS>") + out_str;