GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 14 / 0 / 14
Functions: 100.0% 1 / 0 / 1
Branches: 85.7% 18 / 0 / 21

src/energyplus/ForwardTranslator/ForwardTranslateOutputEnergyManagementSystem.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 "../ForwardTranslator.hpp"
7
8 #include "../../model/Model.hpp"
9 #include "../../model/OutputVariable.hpp"
10 #include "../../model/OutputVariable_Impl.hpp"
11 #include "../../model/OutputMeter.hpp"
12 #include "../../model/OutputMeter_Impl.hpp"
13 #include "../../model/Schedule.hpp"
14 #include "../../model/Schedule_Impl.hpp"
15 #include "../../model/OutputEnergyManagementSystem.hpp"
16 #include "../../model/OutputEnergyManagementSystem_Impl.hpp"
17
18 #include <utilities/idd/Output_EnergyManagementSystem_FieldEnums.hxx>
19 #include "../../utilities/idd/IddEnums.hpp"
20 #include <utilities/idd/IddEnums.hxx>
21
22 using namespace openstudio::model;
23
24 using namespace std;
25
26 namespace openstudio {
27
28 namespace energyplus {
29
30 10 boost::optional<IdfObject> ForwardTranslator::translateOutputEnergyManagementSystem(OutputEnergyManagementSystem& modelObject) {
31 10 boost::optional<std::string> s;
32
33
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 IdfObject idfObject = createAndRegisterIdfObject(openstudio::IddObjectType::Output_EnergyManagementSystem, modelObject);
34
35
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 s = modelObject.actuatorAvailabilityDictionaryReporting();
36
1/2
✓ Branch 0 taken 10 times.
✗ Branch 1 not taken.
10 if (s) {
37
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setString(Output_EnergyManagementSystemFields::ActuatorAvailabilityDictionaryReporting, s.get());
38 }
39
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 s = modelObject.internalVariableAvailabilityDictionaryReporting();
40
1/2
✓ Branch 1 taken 10 times.
✗ Branch 2 not taken.
10 if (s.is_initialized()) {
41
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setString(Output_EnergyManagementSystemFields::InternalVariableAvailabilityDictionaryReporting, s.get());
42 }
43
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 s = modelObject.eMSRuntimeLanguageDebugOutputLevel();
44
1/2
✓ Branch 1 taken 10 times.
✗ Branch 2 not taken.
10 if (s.is_initialized()) {
45
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setString(Output_EnergyManagementSystemFields::EMSRuntimeLanguageDebugOutputLevel, s.get());
46 }
47
48
1/1
✓ Branch 1 taken 10 times.
20 return idfObject;
49 10 }
50
51 } // namespace energyplus
52
53 } // namespace openstudio
54