GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 13 / 0 / 13
Functions: 100.0% 1 / 0 / 1
Branches: 82.4% 14 / 0 / 17

src/energyplus/ReverseTranslator/ReverseTranslateOutputEnergyManagementSystem.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/OutputEnergyManagementSystem.hpp"
9 #include "../../model/OutputEnergyManagementSystem_Impl.hpp"
10
11 #include <utilities/idd/Output_EnergyManagementSystem_FieldEnums.hxx>
12 #include "../../utilities/idd/IddEnums.hpp"
13 #include <utilities/idd/IddEnums.hxx>
14
15 using namespace openstudio::model;
16
17 namespace openstudio {
18
19 namespace energyplus {
20
21 1 OptionalModelObject ReverseTranslator::translateOutputEnergyManagementSystem(const WorkspaceObject& workspaceObject) {
22
1/1
✓ Branch 1 taken 1 time.
1 auto outputEMS = m_model.getUniqueModelObject<openstudio::model::OutputEnergyManagementSystem>();
23
24
1/1
✓ Branch 1 taken 1 time.
1 OptionalString s = workspaceObject.getString(Output_EnergyManagementSystemFields::ActuatorAvailabilityDictionaryReporting);
25
1/2
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
1 if (s) {
26
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 outputEMS.setActuatorAvailabilityDictionaryReporting(*s);
27 }
28
29
1/1
✓ Branch 1 taken 1 time.
1 s = workspaceObject.getString(Output_EnergyManagementSystemFields::InternalVariableAvailabilityDictionaryReporting);
30
1/2
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
1 if (s) {
31
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 outputEMS.setInternalVariableAvailabilityDictionaryReporting(*s);
32 }
33
34
1/1
✓ Branch 1 taken 1 time.
1 s = workspaceObject.getString(Output_EnergyManagementSystemFields::EMSRuntimeLanguageDebugOutputLevel);
35
1/2
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
1 if (s) {
36
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 outputEMS.setEMSRuntimeLanguageDebugOutputLevel(*s);
37 }
38
39
1/1
✓ Branch 1 taken 1 time.
2 return outputEMS;
40 1 }
41
42 } // namespace energyplus
43
44 } // namespace openstudio
45