src/energyplus/ReverseTranslator/ReverseTranslateOutputMeter.cpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /*********************************************************************************************************************** | ||
| 2 | * OpenStudio(R), Copyright (c) Alliance for Energy Innovation, LLC. | ||
| 3 | * See also https://openstudio.net/license | ||
| 4 | ***********************************************************************************************************************/ | ||
| 5 | |||
| 6 | #include "../ReverseTranslator.hpp" | ||
| 7 | |||
| 8 | #include "../../model/OutputMeter.hpp" | ||
| 9 | #include "../../model/OutputMeter_Impl.hpp" | ||
| 10 | |||
| 11 | #include <utilities/idd/Output_Meter_FieldEnums.hxx> | ||
| 12 | |||
| 13 | using namespace openstudio::model; | ||
| 14 | |||
| 15 | namespace openstudio { | ||
| 16 | |||
| 17 | namespace energyplus { | ||
| 18 | |||
| 19 | 49 | OptionalModelObject ReverseTranslator::translateOutputMeter(const WorkspaceObject& workspaceObject) { | |
| 20 |
1/1✓ Branch 1 taken 49 times.
|
49 | openstudio::model::OutputMeter meter(m_model); |
| 21 | |||
| 22 |
1/1✓ Branch 1 taken 49 times.
|
49 | OptionalString s = workspaceObject.getString(Output_MeterFields::KeyName); |
| 23 |
1/2✓ Branch 0 taken 49 times.
✗ Branch 1 not taken.
|
49 | if (s) { |
| 24 |
2/2✓ Branch 1 taken 49 times.
✓ Branch 4 taken 49 times.
|
49 | meter.setName(*s); |
| 25 | } | ||
| 26 | |||
| 27 |
1/1✓ Branch 1 taken 49 times.
|
49 | s = workspaceObject.getString(Output_MeterFields::ReportingFrequency); |
| 28 |
2/2✓ Branch 0 taken 48 times.
✓ Branch 1 taken 1 time.
|
49 | if (s) { |
| 29 |
2/2✓ Branch 1 taken 48 times.
✓ Branch 4 taken 48 times.
|
48 | meter.setReportingFrequency(*s); |
| 30 | } | ||
| 31 | |||
| 32 |
1/1✓ Branch 1 taken 49 times.
|
49 | meter.setMeterFileOnly(false); |
| 33 | |||
| 34 |
1/1✓ Branch 1 taken 49 times.
|
49 | meter.setCumulative(false); |
| 35 | |||
| 36 |
1/1✓ Branch 1 taken 49 times.
|
98 | return meter; |
| 37 | 49 | } | |
| 38 | |||
| 39 | } // namespace energyplus | ||
| 40 | |||
| 41 | } // namespace openstudio | ||
| 42 |