GCC Code Coverage Report


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

src/model/DaylightingControl.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_DAYLIGHTINGCONTROL_HPP
7 #define MODEL_DAYLIGHTINGCONTROL_HPP
8
9 #include "ModelAPI.hpp"
10 #include "SpaceItem.hpp"
11
12 namespace openstudio {
13
14 class Point3d;
15 class Transformation;
16
17 namespace model {
18
19 namespace detail {
20
21 class DaylightingControl_Impl;
22
23 } // namespace detail
24
25 /** DaylightingControl is a SpaceItem that wraps the OpenStudio IDD object 'OS:Daylighting:Control'. */
26 class MODEL_API DaylightingControl : public SpaceItem
27 {
28 public:
29 /** @name Constructors and Destructors */
30 //@{
31
32 explicit DaylightingControl(const Model& model);
33
34 2859 virtual ~DaylightingControl() override = default;
35 // Default the copy and move operators because the virtual dtor is explicit
36 271 DaylightingControl(const DaylightingControl& other) = default;
37 1284 DaylightingControl(DaylightingControl&& other) = default;
38 ✗ DaylightingControl& operator=(const DaylightingControl&) = default;
39 ✗ DaylightingControl& operator=(DaylightingControl&&) = default;
40
41 //@}
42 /** @name Static Methods */
43 //@{
44
45 static IddObjectType iddObjectType();
46
47 static std::vector<std::string> validLightingControlTypeValues();
48
49 //@}
50 /** @name Getters */
51 //@{
52
53 double positionXCoordinate() const;
54
55 double positionYCoordinate() const;
56
57 double positionZCoordinate() const;
58
59 double psiRotationAroundXAxis() const;
60
61 bool isPsiRotationAroundXAxisDefaulted() const;
62
63 double thetaRotationAroundYAxis() const;
64
65 bool isThetaRotationAroundYAxisDefaulted() const;
66
67 double phiRotationAroundZAxis() const;
68
69 bool isPhiRotationAroundZAxisDefaulted() const;
70
71 double illuminanceSetpoint() const;
72
73 bool isIlluminanceSetpointDefaulted() const;
74
75 std::string lightingControlType() const;
76
77 bool isLightingControlTypeDefaulted() const;
78
79 double minimumInputPowerFractionforContinuousDimmingControl() const;
80
81 bool isMinimumInputPowerFractionforContinuousDimmingControlDefaulted() const;
82
83 double minimumLightOutputFractionforContinuousDimmingControl() const;
84
85 bool isMinimumLightOutputFractionforContinuousDimmingControlDefaulted() const;
86
87 int numberofSteppedControlSteps() const;
88
89 bool isNumberofSteppedControlStepsDefaulted() const;
90
91 double probabilityLightingwillbeResetWhenNeededinManualSteppedControl() const;
92
93 bool isProbabilityLightingwillbeResetWhenNeededinManualSteppedControlDefaulted() const;
94
95 int numberofDaylightingViews() const;
96
97 bool isNumberofDaylightingViewsDefaulted() const;
98
99 boost::optional<double> maximumAllowableDiscomfortGlareIndex() const;
100
101 //@}
102 /** @name Setters */
103 //@{
104
105 bool setPositionXCoordinate(double positionXCoordinate);
106
107 bool setPositionYCoordinate(double positionYCoordinate);
108
109 bool setPositionZCoordinate(double positionZCoordinate);
110
111 bool setPsiRotationAroundXAxis(double psiRotationAroundXAxis);
112
113 void resetPsiRotationAroundXAxis();
114
115 bool setThetaRotationAroundYAxis(double thetaRotationAroundYAxis);
116
117 void resetThetaRotationAroundYAxis();
118
119 bool setPhiRotationAroundZAxis(double phiRotationAroundZAxis);
120
121 void resetPhiRotationAroundZAxis();
122
123 bool setIlluminanceSetpoint(double illuminanceSetpoint);
124
125 void resetIlluminanceSetpoint();
126
127 bool setLightingControlType(const std::string& lightingControlType);
128
129 void resetLightingControlType();
130
131 bool setMinimumInputPowerFractionforContinuousDimmingControl(double minimumInputPowerFractionforContinuousDimmingControl);
132
133 void resetMinimumInputPowerFractionforContinuousDimmingControl();
134
135 bool setMinimumLightOutputFractionforContinuousDimmingControl(double minimumLightOutputFractionforContinuousDimmingControl);
136
137 void resetMinimumLightOutputFractionforContinuousDimmingControl();
138
139 bool setNumberofSteppedControlSteps(int numberofSteppedControlSteps);
140
141 void resetNumberofSteppedControlSteps();
142
143 bool setProbabilityLightingwillbeResetWhenNeededinManualSteppedControl(double probabilityLightingwillbeResetWhenNeededinManualSteppedControl);
144
145 void resetProbabilityLightingwillbeResetWhenNeededinManualSteppedControl();
146
147 bool setNumberofDaylightingViews(int numberofDaylightingViews);
148
149 void resetNumberofDaylightingViews();
150
151 bool setMaximumAllowableDiscomfortGlareIndex(double maximumAllowableDiscomfortGlareIndex);
152
153 void resetMaximumAllowableDiscomfortGlareIndex();
154
155 //@}
156
157 /// Returns a Point3d representing position only in meters relative to the Space.
158 openstudio::Point3d position() const;
159
160 /// Sets a Point3d representing position only position in meters relative to the Space.
161 /// Does not change the orientation of the DaylightingControl.
162 bool setPosition(const openstudio::Point3d& position);
163
164 /// Returns a Transformation representing position and orientation in meters relative to the Space.
165 openstudio::Transformation transformation() const;
166
167 /** Sets a Transformation representing position and orientation in meters relative to the Space. */
168 bool setTransformation(const openstudio::Transformation& transformation);
169
170 /// Is this the primary control point for the containing ThermalZone.
171 bool isPrimaryDaylightingControl() const;
172
173 /// Is this the secondary control point for the containing ThermalZone.
174 bool isSecondaryDaylightingControl() const;
175
176 /// Keeps current position and orients the view towards the target, target is in space coordinates.
177 bool aimAt(const Point3d& target);
178
179 protected:
180 /// @cond
181 using ImplType = detail::DaylightingControl_Impl;
182
183 friend class Model;
184 friend class openstudio::IdfObject;
185
186 explicit DaylightingControl(std::shared_ptr<detail::DaylightingControl_Impl> impl);
187
188 /// @endcond
189 private:
190 REGISTER_LOGGER("openstudio.model.DaylightingControl");
191 };
192
193 /** \relates DaylightingControl*/
194 using OptionalDaylightingControl = boost::optional<DaylightingControl>;
195
196 /** \relates DaylightingControl*/
197 using DaylightingControlVector = std::vector<DaylightingControl>;
198
199 } // namespace model
200 } // namespace openstudio
201
202 #endif // MODEL_DAYLIGHTINGCONTROL_HPP
203