GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 60.0% 3 / 1 / 6
Functions: 60.0% 3 / 1 / 6
Branches: -% 0 / 1 / 1

src/model/EnergyManagementSystemOutputVariable.hpp
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 #ifndef MODEL_ENERGYMANAGEMENTSYSTEMOUTPUTVARIABLE_HPP
7 #define MODEL_ENERGYMANAGEMENTSYSTEMOUTPUTVARIABLE_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ModelObject.hpp"
11 #include "EnergyManagementSystemProgram.hpp"
12 #include "EnergyManagementSystemSubroutine.hpp"
13 #include "EnergyManagementSystemActuator.hpp"
14 #include "EnergyManagementSystemSensor.hpp"
15 #include "EnergyManagementSystemGlobalVariable.hpp"
16 #include "EnergyManagementSystemTrendVariable.hpp"
17 #include "EnergyManagementSystemInternalVariable.hpp"
18 #include "EnergyManagementSystemCurveOrTableIndexVariable.hpp"
19 #include "EnergyManagementSystemConstructionIndexVariable.hpp"
20
21 namespace openstudio {
22
23 namespace energyplus {
24 class ReverseTranslator;
25 }
26
27 namespace model {
28
29 namespace detail {
30
31 class EnergyManagementSystemOutputVariable_Impl;
32
33 } // namespace detail
34
35 /** EnergyManagementSystemOutputVariable is a ModelObject that wraps the OpenStudio IDD object 'OS:EnergyManagementSystem:OutputVariable'. */
36 class MODEL_API EnergyManagementSystemOutputVariable : public ModelObject
37 {
38 public:
39 /** @name Constructors and Destructors */
40 //@{
41 explicit EnergyManagementSystemOutputVariable(const Model& model, const std::string eMSVariableName);
42
43 explicit EnergyManagementSystemOutputVariable(const Model& model, const EnergyManagementSystemActuator& object);
44
45 explicit EnergyManagementSystemOutputVariable(const Model& model, const EnergyManagementSystemSensor& object);
46
47 explicit EnergyManagementSystemOutputVariable(const Model& model, const EnergyManagementSystemGlobalVariable& object);
48
49 explicit EnergyManagementSystemOutputVariable(const Model& model, const EnergyManagementSystemTrendVariable& object);
50
51 explicit EnergyManagementSystemOutputVariable(const Model& model, const EnergyManagementSystemInternalVariable& object);
52
53 explicit EnergyManagementSystemOutputVariable(const Model& model, const EnergyManagementSystemCurveOrTableIndexVariable& object);
54
55 explicit EnergyManagementSystemOutputVariable(const Model& model, const EnergyManagementSystemConstructionIndexVariable& object);
56
57 27 virtual ~EnergyManagementSystemOutputVariable() override = default;
58 // Default the copy and move operators because the virtual dtor is explicit
59 2 EnergyManagementSystemOutputVariable(const EnergyManagementSystemOutputVariable& other) = default;
60 ✗ EnergyManagementSystemOutputVariable(EnergyManagementSystemOutputVariable&& other) = default;
61 ✗ EnergyManagementSystemOutputVariable& operator=(const EnergyManagementSystemOutputVariable&) = default;
62 1 EnergyManagementSystemOutputVariable& operator=(EnergyManagementSystemOutputVariable&&) = default;
63
64 //@}
65
66 static IddObjectType iddObjectType();
67
68 static std::vector<std::string> typeOfDataInVariableValues();
69
70 static std::vector<std::string> updateFrequencyValues();
71
72 /** @name Getters */
73 //@{
74
75 std::string emsVariableName() const;
76
77 std::string typeOfDataInVariable() const;
78
79 std::string updateFrequency() const;
80
81 std::string emsProgramOrSubroutineName() const;
82
83 boost::optional<EnergyManagementSystemProgram> emsProgram() const;
84
85 boost::optional<EnergyManagementSystemSubroutine> emsSubroutine() const;
86
87 std::string units() const;
88
89 boost::optional<ModelObject> emsVariableObject() const;
90
91 boost::optional<EnergyManagementSystemActuator> emsActuator() const;
92 boost::optional<EnergyManagementSystemSensor> emsSensor() const;
93 boost::optional<EnergyManagementSystemGlobalVariable> emsGlobalVariable() const;
94 boost::optional<EnergyManagementSystemTrendVariable> emsTrendVariable() const;
95 boost::optional<EnergyManagementSystemInternalVariable> emsInternalVariable() const;
96 boost::optional<EnergyManagementSystemCurveOrTableIndexVariable> emsCurveOrTableIndexVariable() const;
97 boost::optional<EnergyManagementSystemConstructionIndexVariable> emsConstructionIndexVariable() const;
98
99 bool exportToBCVTB() const;
100
101 bool isExportToBCVTBDefaulted() const;
102
103 //@}
104 /** @name Setters */
105 //@{
106
107 bool setEMSVariableName(const std::string& eMSVariableName);
108
109 bool setTypeOfDataInVariable(const std::string& typeofDatainVariable);
110
111 bool setUpdateFrequency(const std::string& updateFrequency);
112
113 bool setEMSProgramOrSubroutineName(const EnergyManagementSystemProgram& program);
114
115 bool setEMSProgramOrSubroutineName(const EnergyManagementSystemSubroutine& subroutine);
116
117 void resetEMSProgramOrSubroutineName();
118
119 bool setUnits(const std::string& units);
120
121 void resetUnits();
122
123 bool setEMSVariableName(const EnergyManagementSystemActuator& object);
124 bool setEMSVariableName(const EnergyManagementSystemSensor& object);
125 bool setEMSVariableName(const EnergyManagementSystemGlobalVariable& object);
126 bool setEMSVariableName(const EnergyManagementSystemTrendVariable& object);
127 bool setEMSVariableName(const EnergyManagementSystemInternalVariable& object);
128 bool setEMSVariableName(const EnergyManagementSystemCurveOrTableIndexVariable& object);
129 bool setEMSVariableName(const EnergyManagementSystemConstructionIndexVariable& object);
130
131 bool setExportToBCVTB(bool exportToBCVTB);
132
133 void resetExportToBCVTB();
134
135 //@}
136 /** @name Other */
137 //@{
138
139 //@}
140 protected:
141 /// @cond
142 using ImplType = detail::EnergyManagementSystemOutputVariable_Impl;
143
144 explicit EnergyManagementSystemOutputVariable(std::shared_ptr<detail::EnergyManagementSystemOutputVariable_Impl> impl);
145
146 friend class detail::EnergyManagementSystemOutputVariable_Impl;
147 friend class Model;
148 friend class IdfObject;
149 friend class openstudio::detail::IdfObject_Impl;
150 friend class energyplus::ReverseTranslator;
151 /// @endcond
152 private:
153 − REGISTER_LOGGER("openstudio.model.EnergyManagementSystemOutputVariable");
154 explicit EnergyManagementSystemOutputVariable(const Model& model);
155 };
156
157 /** \relates EnergyManagementSystemOutputVariable*/
158 using OptionalEnergyManagementSystemOutputVariable = boost::optional<EnergyManagementSystemOutputVariable>;
159
160 /** \relates EnergyManagementSystemOutputVariable*/
161 using EnergyManagementSystemOutputVariableVector = std::vector<EnergyManagementSystemOutputVariable>;
162
163 } // namespace model
164 } // namespace openstudio
165
166 #endif // MODEL_ENERGYMANAGEMENTSYSTEMOUTPUTVARIABLE_HPP
167