Skip to content

Commit

Permalink
Fix default checking
Browse files Browse the repository at this point in the history
  • Loading branch information
mbadams5 committed Dec 20, 2018
1 parent 81c07db commit a32d3ae
Showing 1 changed file with 32 additions and 31 deletions.
63 changes: 32 additions & 31 deletions src/EnergyPlus/ResultsSchema.cc
Original file line number Diff line number Diff line change
Expand Up @@ -670,40 +670,41 @@ namespace ResultsFramework {
void ResultsSchema::setupOutputOptions()
{
int numberOfOutputSchemaObjects = inputProcessor->getNumObjectsFound("Output:JSON");
if (numberOfOutputSchemaObjects == 1) {
Array1D_string alphas(5);
int numAlphas;
Array1D<Real64> numbers(2);
int numNumbers;
int status;
inputProcessor->getObjectItem("Output:JSON", 1, alphas, numAlphas, numbers, numNumbers, status);

if (numAlphas > 0) {
std::string option = alphas(1);
if (UtilityRoutines::SameString(option, "TimeSeries")) {
tsEnabled = true;
} else if (UtilityRoutines::SameString(option, "TimeSeriesAndTabular")) {
tsEnabled = true;
tsAndTabularEnabled = true;
}
if (numberOfOutputSchemaObjects == 0) {
return;
}

if (numAlphas >= 2) {
if (UtilityRoutines::SameString(alphas(2), "Yes")) {
outputJSON = true;
}
}
Array1D_string alphas(5);
int numAlphas;
Array1D<Real64> numbers(2);
int numNumbers;
int status;
inputProcessor->getObjectItem("Output:JSON", 1, alphas, numAlphas, numbers, numNumbers, status);

if (numAlphas > 0) {
std::string option = alphas(1);
if (UtilityRoutines::SameString(option, "TimeSeries")) {
tsEnabled = true;
} else if (UtilityRoutines::SameString(option, "TimeSeriesAndTabular")) {
tsEnabled = true;
tsAndTabularEnabled = true;
}

if (numAlphas >= 3) {
if (UtilityRoutines::SameString(alphas(3), "Yes")) {
outputCBOR = true;
}
}
// defaults
outputJSON = true;
outputCBOR = false;
outputMsgPack = false;

if (numAlphas >= 4) {
if (UtilityRoutines::SameString(alphas(4), "Yes")) {
outputMsgPack = true;
}
}
if (numAlphas >= 2) {
outputJSON = UtilityRoutines::SameString(alphas(2), "Yes");
}

if (numAlphas >= 3) {
outputCBOR = UtilityRoutines::SameString(alphas(3), "Yes");
}

if (numAlphas >= 4) {
outputMsgPack = UtilityRoutines::SameString(alphas(4), "Yes");
}
}
}
Expand Down

9 comments on commit a32d3ae

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

output_processor_json (mbadams5) - x86_64-MacOS-10.13-clang: OK (3067 of 3067 tests passed, 627 test warnings)

Messages:

  • 627 tests had: AUD diffs.

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

output_processor_json (mbadams5) - x86_64-Linux-Ubuntu-18.04-gcc-7.3: OK (3107 of 3107 tests passed, 631 test warnings)

Messages:

  • 631 tests had: AUD diffs.

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

output_processor_json (mbadams5) - i386-Windows-7-VisualStudio-14: OK (3067 of 3067 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

output_processor_json (mbadams5) - x86_64-Linux-Ubuntu-18.04-cppcheck-1.82: OK (0 of 0 tests passed, 0 test warnings)

Build Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

output_processor_json (mbadams5) - x86_64-Linux-Ubuntu-18.04-gcc-7.3-UnitTestsCoverage-Debug: OK (1799 of 1799 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

output_processor_json (mbadams5) - Win64-Windows-7-VisualStudio-14: OK (3067 of 3067 tests passed, 627 test warnings)

Messages:

  • 627 tests had: AUD diffs.

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

output_processor_json (mbadams5) - x86_64-Linux-Ubuntu-18.04-gcc-7.3-IntegrationCoverage-Debug: OK (2437 of 2437 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

output_processor_json (mbadams5) - x86_64-Linux-Ubuntu-18.04-custom_check: OK (2 of 2 tests passed, 0 test warnings)

Build Badge

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

output_processor_json (mbadams5) - x86_64-MacOS-10.13-clang: OK (0 of 0 tests passed, 0 test warnings)

Build Badge Test Badge

Please # to comment.