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/FanConstantVolume_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_FANCONSTANTVOLUME_IMPL_HPP
7 #define MODEL_FANCONSTANTVOLUME_IMPL_HPP
8
9 #include "StraightComponent_Impl.hpp"
10
11 namespace openstudio {
12 namespace model {
13
14 class Schedule;
15 class AirflowNetworkFan;
16
17 namespace detail {
18
19 class MODEL_API FanConstantVolume_Impl : public StraightComponent_Impl
20 {
21
22 public:
23 /** @name Constructors and Destructors */
24 //@{
25
26 // constructor
27 FanConstantVolume_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
28
29 // construct from workspace
30 FanConstantVolume_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
31
32 // copy constructor
33 FanConstantVolume_Impl(const FanConstantVolume_Impl& other, Model_Impl* model, bool keepHandle);
34
35 // virtual destructor
36 639 virtual ~FanConstantVolume_Impl() override = default;
37
38 //@}
39 /** @name Virtual Methods */
40 //@{
41
42 virtual std::vector<openstudio::IdfObject> remove() override;
43
44 virtual ModelObject clone(Model model) const override;
45
46 // Get all output variable names that could be associated with this object.
47 virtual const std::vector<std::string>& outputVariableNames() const override;
48
49 virtual IddObjectType iddObjectType() const override;
50
51 virtual std::vector<ScheduleTypeKey> getScheduleTypeKeys(const Schedule& schedule) const override;
52
53 virtual unsigned inletPort() const override;
54
55 virtual unsigned outletPort() const override;
56
57 virtual bool addToNode(Node& node) override;
58
59 virtual ComponentType componentType() const override;
60 virtual std::vector<FuelType> coolingFuelTypes() const override;
61 virtual std::vector<FuelType> heatingFuelTypes() const override;
62 virtual std::vector<AppGFuelType> appGHeatingFuelTypes() const override;
63
64 //@}
65 /** @name Getters and Setters */
66 //@{
67
68 Schedule availabilitySchedule() const;
69 bool setAvailabilitySchedule(Schedule& s);
70
71 // Get FanTotalEfficiency
72 double fanTotalEfficiency() const;
73
74 // Set fanTotalEfficiency
75 bool setFanTotalEfficiency(double val);
76
77 // Get PressureRise
78 double pressureRise() const;
79
80 // Set PressureRise
81 bool setPressureRise(double val);
82
83 // Get MotorEfficiency
84 double motorEfficiency() const;
85
86 // Set MotorEfficiency
87 bool setMotorEfficiency(double val);
88
89 // Get MotorInAirstreamFraction
90 double motorInAirstreamFraction() const;
91
92 // Set MotorInAirstreamFraction
93 bool setMotorInAirstreamFraction(double val);
94
95 // Get EndUseSubcategory
96 std::string endUseSubcategory() const;
97
98 // Set EndUseSubcategory
99 bool setEndUseSubcategory(const std::string& val);
100
101 boost::optional<double> maximumFlowRate() const;
102
103 bool isMaximumFlowRateAutosized() const;
104
105 bool setMaximumFlowRate(boost::optional<double> maximumFlowRate);
106
107 void resetMaximumFlowRate();
108
109 void autosizeMaximumFlowRate();
110
111 AirflowNetworkFan getAirflowNetworkFan();
112 boost::optional<AirflowNetworkFan> airflowNetworkFan() const;
113
114 boost::optional<double> autosizedMaximumFlowRate() const;
115
116 virtual void autosize() override;
117
118 virtual void applySizingValues() override;
119
120 virtual std::vector<EMSActuatorNames> emsActuatorNames() const override;
121
122 virtual std::vector<std::string> emsInternalVariableNames() const override;
123
124 //@}
125 private:
126 − REGISTER_LOGGER("openstudio.model.FanConstantVolume");
127
128 // Optional getters for use by methods like children() so can remove() if the constructor fails.
129 // There are other ways for the public versions of these getters to fail--perhaps all required
130 // objects should be returned as boost::optionals
131 boost::optional<Schedule> optionalAvailabilitySchedule() const;
132
133 boost::optional<ModelObject> availabilityScheduleAsModelObject() const;
134
135 bool setAvailibiltyScheduleAsModelObject(const boost::optional<ModelObject>& modelObject);
136
137 virtual boost::optional<HVACComponent> containingHVACComponent() const override;
138
139 virtual boost::optional<ZoneHVACComponent> containingZoneHVACComponent() const override;
140 };
141
142 } // namespace detail
143
144 } // namespace model
145 } // namespace openstudio
146
147 #endif // MODEL_FANCONSTANTVOLUME_IMPL_HPP
148