GCC Code Coverage Report


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

src/model/EnergyManagementSystemMeteredOutputVariable_Impl.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_ENERGYMANAGEMENTSYSTEMMETEREDOUTPUTVARIABLE_IMPL_HPP
7 #define MODEL_ENERGYMANAGEMENTSYSTEMMETEREDOUTPUTVARIABLE_IMPL_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ModelObject_Impl.hpp"
11 #include "EnergyManagementSystemProgram_Impl.hpp"
12 #include "EnergyManagementSystemSubroutine_Impl.hpp"
13
14 namespace openstudio {
15
16 class AppGFuelType;
17 class ComponentType;
18 class FuelType;
19
20 namespace model {
21
22 namespace detail {
23
24 /** EnergyManagementSystemMeteredOutputVariable_Impl is a ModelObject_Impl that is the implementation class for EnergyManagementSystemMeteredOutputVariable.*/
25 class MODEL_API EnergyManagementSystemMeteredOutputVariable_Impl : public ModelObject_Impl
26 {
27 public:
28 /** @name Constructors and Destructors */
29 //@{
30
31 EnergyManagementSystemMeteredOutputVariable_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
32
33 EnergyManagementSystemMeteredOutputVariable_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
34
35 EnergyManagementSystemMeteredOutputVariable_Impl(const EnergyManagementSystemMeteredOutputVariable_Impl& other, Model_Impl* model,
36 bool keepHandle);
37
38 20 virtual ~EnergyManagementSystemMeteredOutputVariable_Impl() override = default;
39
40 //@}
41 /** @name Virtual Methods */
42 //@{
43
44 virtual const std::vector<std::string>& outputVariableNames() const override;
45
46 virtual IddObjectType iddObjectType() const override;
47
48 //@}
49 /** @name Getters */
50 //@{
51
52 std::string emsVariableName() const;
53
54 std::string updateFrequency() const;
55
56 std::string emsProgramOrSubroutineName() const;
57
58 boost::optional<EnergyManagementSystemProgram> emsProgram() const;
59
60 boost::optional<EnergyManagementSystemSubroutine> emsSubroutine() const;
61
62 std::string resourceType() const;
63
64 std::string groupType() const;
65
66 std::string endUseCategory() const;
67
68 std::string endUseSubcategory() const;
69
70 std::string units() const;
71
72 boost::optional<ModelObject> emsVariableObject() const;
73
74 boost::optional<EnergyManagementSystemActuator> emsActuator() const;
75 boost::optional<EnergyManagementSystemSensor> emsSensor() const;
76 boost::optional<EnergyManagementSystemGlobalVariable> emsGlobalVariable() const;
77 boost::optional<EnergyManagementSystemTrendVariable> emsTrendVariable() const;
78 boost::optional<EnergyManagementSystemInternalVariable> emsInternalVariable() const;
79 boost::optional<EnergyManagementSystemCurveOrTableIndexVariable> emsCurveOrTableIndexVariable() const;
80 boost::optional<EnergyManagementSystemConstructionIndexVariable> emsConstructionIndexVariable() const;
81
82 //@}
83 /** @name Setters */
84 //@{
85
86 bool setEMSVariableName(const std::string& eMSVariableName);
87
88 bool setUpdateFrequency(const std::string& updateFrequency);
89
90 bool setEMSProgramOrSubroutineName(const EnergyManagementSystemProgram& program);
91
92 bool setEMSProgramOrSubroutineName(const EnergyManagementSystemSubroutine& subroutine);
93
94 void resetEMSProgramOrSubroutineName();
95
96 bool setResourceType(const std::string& resourceType);
97
98 bool setGroupType(const std::string& groupType);
99
100 bool setEndUseCategory(const std::string& endUseCategory);
101
102 bool setEndUseSubcategory(const std::string& endUseSubcategory);
103
104 void resetEndUseSubcategory();
105
106 bool setUnits(const std::string& units);
107
108 void resetUnits();
109
110 bool setEMSVariableName(const EnergyManagementSystemActuator& object);
111 bool setEMSVariableName(const EnergyManagementSystemSensor& object);
112 bool setEMSVariableName(const EnergyManagementSystemGlobalVariable& object);
113 bool setEMSVariableName(const EnergyManagementSystemTrendVariable& object);
114 bool setEMSVariableName(const EnergyManagementSystemInternalVariable& object);
115 bool setEMSVariableName(const EnergyManagementSystemCurveOrTableIndexVariable& object);
116 bool setEMSVariableName(const EnergyManagementSystemConstructionIndexVariable& object);
117
118 //@}
119 /** @name Other */
120 //@{
121
122 // This is not an HVACComponent but it will help in the determination of the PlantUserDefinedComponent, so implementation is here because it's
123 // more logical
124 ComponentType componentType() const;
125 boost::optional<FuelType> fuelTypeFromResourceType() const;
126 std::vector<FuelType> coolingFuelTypes() const;
127 std::vector<FuelType> heatingFuelTypes() const;
128 std::vector<AppGFuelType> appGHeatingFuelTypes() const;
129
130 //@}
131 protected:
132 private:
133 − REGISTER_LOGGER("openstudio.model.EnergyManagementSystemMeteredOutputVariable");
134 };
135
136 } // namespace detail
137
138 } // namespace model
139 } // namespace openstudio
140
141 #endif // MODEL_ENERGYMANAGEMENTSYSTEMMETEREDOUTPUTVARIABLE_IMPL_HPP
142