blob: 670781b0414d13cadc6eb59c3466fae4841a9677 [file] [log] [blame]
Matthew Barth4f0d3b72020-08-27 14:32:15 -05001/**
2 * Copyright © 2020 IBM Corporation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#pragma once
17
18#include "config_base.hpp"
Matthew Barthde90fb42021-03-04 16:34:28 -060019#include "fan.hpp"
Matthew Bartha0dd1352021-03-09 11:10:49 -060020#include "xyz/openbmc_project/Control/ThermalMode/server.hpp"
Matthew Barth4f0d3b72020-08-27 14:32:15 -050021
22#include <nlohmann/json.hpp>
Matthew Barthacd737c2021-03-04 11:04:01 -060023#include <sdbusplus/bus.hpp>
Matthew Barth603ef162021-03-24 15:34:53 -050024#include <sdeventplus/event.hpp>
Matthew Barth007de092021-03-25 13:56:04 -050025#include <sdeventplus/utility/timer.hpp>
Matthew Barth4f0d3b72020-08-27 14:32:15 -050026
Matthew Barth651f03a2020-08-27 16:15:11 -050027#include <any>
Matthew Barth007de092021-03-25 13:56:04 -050028#include <chrono>
Matthew Barth651f03a2020-08-27 16:15:11 -050029#include <functional>
30#include <map>
31#include <tuple>
32
Matthew Barth4f0d3b72020-08-27 14:32:15 -050033namespace phosphor::fan::control::json
34{
35
Matthew Barth603ef162021-03-24 15:34:53 -050036class Manager;
37
Matthew Barth4f0d3b72020-08-27 14:32:15 -050038using json = nlohmann::json;
39
Matthew Bartha0dd1352021-03-09 11:10:49 -060040/* Extend the Control::ThermalMode interface */
41using ThermalObject = sdbusplus::server::object::object<
42 sdbusplus::xyz::openbmc_project::Control::server::ThermalMode>;
43
Matthew Barth007de092021-03-25 13:56:04 -050044/* Dbus event timer */
45using Timer = sdeventplus::utility::Timer<sdeventplus::ClockId::Monotonic>;
46
Matthew Barth4f0d3b72020-08-27 14:32:15 -050047/**
48 * @class Zone - Represents a configured fan control zone
49 *
50 * A zone object contains the configured attributes for a zone that groups
Matthew Barthe47c9582021-03-09 14:24:02 -060051 * a number of fans together to be under the same target control. These
52 * configuration attributes include, but are not limited to, the default ceiling
53 * of the fans within the zone, a default floor, the delay between increases, a
54 * decrease interval, and any profiles(OPTIONAL) the zone should be included in.
Matthew Barth4f0d3b72020-08-27 14:32:15 -050055 *
56 * (When no profile for a zone is given, the zone defaults to always exist)
57 *
58 */
Matthew Bartha0dd1352021-03-09 11:10:49 -060059class Zone : public ConfigBase, public ThermalObject
Matthew Barth4f0d3b72020-08-27 14:32:15 -050060{
61 public:
62 /* JSON file name for zones */
63 static constexpr auto confFileName = "zones.json";
Matthew Barth216229c2020-09-24 13:47:33 -050064 static constexpr auto thermModeIntf =
65 "xyz.openbmc_project.Control.ThermalMode";
66 static constexpr auto supportedProp = "Supported";
67 static constexpr auto currentProp = "Current";
Matthew Barth651f03a2020-08-27 16:15:11 -050068
Matthew Barth4f0d3b72020-08-27 14:32:15 -050069 Zone() = delete;
70 Zone(const Zone&) = delete;
71 Zone(Zone&&) = delete;
72 Zone& operator=(const Zone&) = delete;
73 Zone& operator=(Zone&&) = delete;
74 ~Zone() = default;
75
76 /**
77 * Constructor
78 * Parses and populates a zone from JSON object data
79 *
Matthew Barth4f0d3b72020-08-27 14:32:15 -050080 * @param[in] jsonObj - JSON object
Matthew Barth603ef162021-03-24 15:34:53 -050081 * @param[in] event - sdeventplus event loop
82 * @param[in] mgr - Manager of this zone
Matthew Barth4f0d3b72020-08-27 14:32:15 -050083 */
Matthew Barth9403a212021-05-17 09:31:50 -050084 Zone(const json& jsonObj, const sdeventplus::Event& event, Manager* mgr);
Matthew Barth4f0d3b72020-08-27 14:32:15 -050085
86 /**
Matthew Barthe47c9582021-03-09 14:24:02 -060087 * @brief Get the default ceiling
Matthew Barth4f0d3b72020-08-27 14:32:15 -050088 *
Matthew Barthe47c9582021-03-09 14:24:02 -060089 * Default ceiling is the highest target the fans within this zone is
90 * allowed to increase to. The zone's ceiling defaults to this unless
91 * changed by some configured event.
Matthew Barth4f0d3b72020-08-27 14:32:15 -050092 *
Matthew Barthe47c9582021-03-09 14:24:02 -060093 * @return Default ceiling of this zone
Matthew Barth4f0d3b72020-08-27 14:32:15 -050094 */
Matthew Barthe47c9582021-03-09 14:24:02 -060095 inline const auto& getDefaultCeiling() const
Matthew Barth4f0d3b72020-08-27 14:32:15 -050096 {
Matthew Barthe47c9582021-03-09 14:24:02 -060097 return _defaultCeiling;
Matthew Barth4f0d3b72020-08-27 14:32:15 -050098 }
99
100 /**
Matthew Barthe47c9582021-03-09 14:24:02 -0600101 * @brief Get the default floor
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500102 *
Matthew Barthe47c9582021-03-09 14:24:02 -0600103 * The default floor is the lowest target the fans within this zone
104 * are allowed to decrease to. The zone's floor defaults to this
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500105 * unless changed by some configured event.
106 *
Matthew Barthe47c9582021-03-09 14:24:02 -0600107 * @return Default floor
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500108 */
109 inline const auto& getDefaultFloor() const
110 {
111 return _defaultFloor;
112 }
113
114 /**
Matthew Barthe47c9582021-03-09 14:24:02 -0600115 * @brief Get the increase delay(OPTIONAL)
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500116 *
Matthew Barthe47c9582021-03-09 14:24:02 -0600117 * The increase delay is the amount of time(in seconds) increases
118 * to a target are delayed before being made. The default is 0, which
119 * results in immediate increase requests when any events result in
120 * a change to the target.
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500121 *
122 * It is recommend a value other than 0 is configured, but that inherently
Matthew Barthe47c9582021-03-09 14:24:02 -0600123 * depends on the fan controller and configured increases.
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500124 *
Matthew Barthe47c9582021-03-09 14:24:02 -0600125 * @return Increase delay(in seconds)
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500126 */
127 inline const auto& getIncDelay() const
128 {
129 return _incDelay;
130 }
131
132 /**
Matthew Barthe47c9582021-03-09 14:24:02 -0600133 * @brief Get the decrease interval
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500134 *
Matthew Barthe47c9582021-03-09 14:24:02 -0600135 * Decreases happen on a set interval when no requests for an increase
136 * in fan targets exists. This is the interval(in seconds) at which the fans
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500137 * within the zone are decreased if events exist that result in a target
Matthew Barthe47c9582021-03-09 14:24:02 -0600138 * decrease.
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500139 *
Matthew Barthe47c9582021-03-09 14:24:02 -0600140 * @return Decrease interval(in seconds)
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500141 */
142 inline const auto& getDecInterval() const
143 {
144 return _decInterval;
145 }
146
Matthew Barth651f03a2020-08-27 16:15:11 -0500147 /**
Matthew Barth6f787302021-03-25 15:01:01 -0500148 * @brief Get the current target of the zone
149 *
150 * @return - The current target of the zone
151 */
152 inline const auto& getTarget() const
153 {
154 return _target;
155 }
156
157 /**
Matthew Barthdc776c82021-02-25 16:06:16 -0600158 * @brief Get the target increase delta
159 *
160 * @return - The current target increase delta
161 */
162 inline auto& getIncDelta() const
163 {
164 return _incDelta;
165 };
166
167 /**
Matthew Barth45c44ea2021-03-03 13:16:14 -0600168 * @brief Get the target decrease delta
169 *
170 * @return - The current target decrease delta
171 */
172 inline auto& getDecDelta() const
173 {
174 return _decDelta;
175 };
176
177 /**
Matthew Barth603ef162021-03-24 15:34:53 -0500178 * @brief Get the manager of the zone
179 *
180 * @return - The manager of the zone
181 */
182 inline auto* getManager() const
183 {
184 return _manager;
185 }
186
187 /**
Matthew Barthde90fb42021-03-04 16:34:28 -0600188 * @brief Add a fan object to the zone
189 *
190 * @param[in] fan - Unique pointer to a fan object that will be moved into
191 * the zone
192 *
193 * Adds a fan object to the list of fans that make up the zone by moving the
194 * fan object into the list.
195 */
196 void addFan(std::unique_ptr<Fan> fan);
197
Matthew Barth12cb1252021-03-08 16:47:30 -0600198 /**
Matthew Barth8ba715e2021-03-05 09:00:05 -0600199 * Sets all fans in the zone to the target given when the zone is active
200 *
201 * @param[in] target - Target for fans
202 */
203 void setTarget(uint64_t target);
204
205 /**
206 * @brief Sets the automatic fan control allowed active state
207 *
208 * @param[in] ident - An identifier that affects the active state
209 * @param[in] isActiveAllow - Active state according to group
210 */
211 void setActiveAllow(const std::string& ident, bool isActiveAllow);
212
213 /**
Matthew Barth12cb1252021-03-08 16:47:30 -0600214 * @brief Set the floor to the given target and increase target to the floor
215 * when the target is below the floor value when floor changes are allowed.
216 *
217 * @param[in] target - Target to set the floor to
218 */
219 void setFloor(uint64_t target);
220
221 /**
222 * @brief Sets the floor change allowed state
223 *
224 * @param[in] ident - An identifier that affects floor changes
225 * @param[in] isAllow - Allow state according to the identifier
226 */
227 inline void setFloorChangeAllow(const std::string& ident, bool isAllow)
228 {
229 _floorChange[ident] = isAllow;
230 }
231
232 /**
Matthew Barth45c44ea2021-03-03 13:16:14 -0600233 * @brief Sets the decrease allowed state of a group
234 *
235 * @param[in] ident - An identifier that affects speed decreases
236 * @param[in] isAllow - Allow state according to the identifier
237 */
238 inline void setDecreaseAllow(const std::string& ident, bool isAllow)
239 {
240 _decAllowed[ident] = isAllow;
241 }
242
243 /**
Matthew Barth12cb1252021-03-08 16:47:30 -0600244 * @brief Calculate the requested target from the given delta and increases
245 * the fans, not going above the ceiling.
246 *
247 * @param[in] targetDelta - The delta to increase the target by
248 */
249 void requestIncrease(uint64_t targetDelta);
250
Matthew Bartha0dd1352021-03-09 11:10:49 -0600251 /**
Matthew Barth007de092021-03-25 13:56:04 -0500252 * @brief Callback function for the increase timer that delays
253 * processing of requested target increases while fans are increasing
254 */
255 void incTimerExpired();
256
257 /**
Matthew Barth45c44ea2021-03-03 13:16:14 -0600258 * @brief Calculate the lowest requested decrease target from the given
259 * delta within a decrease interval.
260 *
261 * @param[in] targetDelta - The delta to decrease the target by
262 */
263 void requestDecrease(uint64_t targetDelta);
264
265 /**
Matthew Barth007de092021-03-25 13:56:04 -0500266 * @brief Callback function for the decrease timer that processes any
267 * requested target decreases if allowed
268 */
269 void decTimerExpired();
270
271 /**
Matthew Barth07fecfc2021-01-29 09:04:43 -0600272 * @brief Set the requested target base to be used as the target to base a
273 * new requested target from
274 *
275 * @param[in] targetBase - Base target value to use
276 */
277 inline void setRequestTargetBase(uint64_t targetBase)
278 {
279 _requestTargetBase = targetBase;
280 };
281
282 /**
Matthew Bartha0dd1352021-03-09 11:10:49 -0600283 * @brief Set a property to be persisted
284 *
285 * @param[in] intf - Interface containing property
286 * @param[in] prop - Property to be persisted
287 */
288 void setPersisted(const std::string& intf, const std::string& prop);
289
290 /**
291 * @brief Overridden thermal object's set 'Current' property function
292 *
293 * @param[in] value - Value to set 'Current' to
294 *
295 * @return - The updated value of the 'Current' property
296 */
297 std::string current(std::string value) override;
298
Matthew Barthb584d812021-03-11 15:55:04 -0600299 /**
300 * @brief A handler function to set/update a property on a zone
301 * @details Sets or updates a zone's dbus property to the given value using
302 * the provided base dbus object's set property function
303 *
304 * @param[in] intf - Interface on zone object
305 * @param[in] prop - Property on interface
306 * @param[in] func - Zone object's set property function pointer
307 * @param[in] value - Value to set property to
308 * @param[in] persist - Persist property value or not
309 *
310 * @return Lambda function
311 * A lambda function to set/update the zone's dbus property
312 */
313 template <typename T>
314 static auto setProperty(const char* intf, const char* prop,
315 T (Zone::*func)(T), T&& value, bool persist)
316 {
317 return [=, value = std::forward<T>(value)](Zone* zone) {
318 (zone->*func)(value);
319 if (persist)
320 {
321 zone->setPersisted(intf, prop);
322 }
323 };
324 }
325
326 /**
327 * @brief A handler function to set/update a zone's dbus property's persist
328 * state
329 * @details Sets or updates a zone's dbus property's persist state where the
330 * value of the property is to be left unchanged
331 *
332 * @param[in] intf - Interface on zone object
333 * @param[in] prop - Property on interface
334 * @param[in] persist - Persist property value or not
335 *
336 * @return Lambda function
337 * A lambda function to set/update the zone's dbus property's persist
338 * state
339 */
340 static auto setPropertyPersist(const char* intf, const char* prop,
341 bool persist)
342 {
343 return [=](Zone* zone) {
344 if (persist)
345 {
346 zone->setPersisted(intf, prop);
347 }
348 };
349 }
350
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500351 private:
Matthew Barth603ef162021-03-24 15:34:53 -0500352 /* The zone's manager */
353 Manager* _manager;
354
Matthew Barthe47c9582021-03-09 14:24:02 -0600355 /* The zone's default ceiling value for fans */
356 uint64_t _defaultCeiling;
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500357
Matthew Barthe47c9582021-03-09 14:24:02 -0600358 /* The zone's default floor value for fans */
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500359 uint64_t _defaultFloor;
360
Matthew Barthe47c9582021-03-09 14:24:02 -0600361 /* Zone's increase delay(in seconds) (OPTIONAL) */
Matthew Barth007de092021-03-25 13:56:04 -0500362 std::chrono::seconds _incDelay;
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500363
Matthew Barthe47c9582021-03-09 14:24:02 -0600364 /* Zone's decrease interval(in seconds) */
Matthew Barth007de092021-03-25 13:56:04 -0500365 std::chrono::seconds _decInterval;
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500366
Matthew Barth12cb1252021-03-08 16:47:30 -0600367 /* The floor target to not go below */
368 uint64_t _floor;
369
370 /* Target for this zone */
371 uint64_t _target;
372
Matthew Barth2b3253e2021-03-09 14:51:16 -0600373 /* Zone increase delta */
374 uint64_t _incDelta;
375
Matthew Barth45c44ea2021-03-03 13:16:14 -0600376 /* Zone decrease delta */
377 uint64_t _decDelta;
378
Matthew Barth2b3253e2021-03-09 14:51:16 -0600379 /* The ceiling target to not go above */
380 uint64_t _ceiling;
381
382 /* Requested target base */
383 uint64_t _requestTargetBase;
384
Matthew Barth12cb1252021-03-08 16:47:30 -0600385 /* Map of whether floor changes are allowed by a string identifier */
386 std::map<std::string, bool> _floorChange;
387
Matthew Barth45c44ea2021-03-03 13:16:14 -0600388 /* Map of controlling decreases allowed by a string identifer */
389 std::map<std::string, bool> _decAllowed;
390
Matthew Bartha0dd1352021-03-09 11:10:49 -0600391 /* Map of interfaces to persisted properties the zone hosts*/
392 std::map<std::string, std::vector<std::string>> _propsPersisted;
393
Matthew Barth8ba715e2021-03-05 09:00:05 -0600394 /* Automatic fan control active state */
395 bool _isActive;
396
Matthew Barth007de092021-03-25 13:56:04 -0500397 /* The target increase timer object */
398 Timer _incTimer;
399
400 /* The target decrease timer object */
401 Timer _decTimer;
402
Matthew Barth8ba715e2021-03-05 09:00:05 -0600403 /* Map of active fan control allowed by a string identifier */
404 std::map<std::string, bool> _active;
405
Matthew Barthb584d812021-03-11 15:55:04 -0600406 /* Interface to property mapping of their associated set property handler
407 * function */
408 static const std::map<
409 std::string,
410 std::map<std::string,
411 std::function<std::function<void(Zone*)>(const json&, bool)>>>
Matthew Barth216229c2020-09-24 13:47:33 -0500412 _intfPropHandlers;
Matthew Barth651f03a2020-08-27 16:15:11 -0500413
Matthew Barthde90fb42021-03-04 16:34:28 -0600414 /* List of fans included in this zone */
415 std::vector<std::unique_ptr<Fan>> _fans;
416
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500417 /**
Matthew Barthe47c9582021-03-09 14:24:02 -0600418 * @brief Parse and set the zone's default ceiling value
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500419 *
420 * @param[in] jsonObj - JSON object for the zone
421 *
Matthew Barthe47c9582021-03-09 14:24:02 -0600422 * Sets the default ceiling value for the zone from the JSON configuration
423 * object
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500424 */
Matthew Barthe47c9582021-03-09 14:24:02 -0600425 void setDefaultCeiling(const json& jsonObj);
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500426
427 /**
Matthew Barthe47c9582021-03-09 14:24:02 -0600428 * @brief Parse and set the zone's default floor value
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500429 *
430 * @param[in] jsonObj - JSON object for the zone
431 *
Matthew Barthe47c9582021-03-09 14:24:02 -0600432 * Sets the default floor value for the zone from the JSON configuration
433 * object
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500434 */
435 void setDefaultFloor(const json& jsonObj);
436
437 /**
438 * @brief Parse and set the zone's decrease interval(in seconds)
439 *
440 * @param[in] jsonObj - JSON object for the zone
441 *
Matthew Barthe47c9582021-03-09 14:24:02 -0600442 * Sets the decrease interval(in seconds) for the zone from the JSON
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500443 * configuration object
444 */
445 void setDecInterval(const json& jsonObj);
Matthew Barth651f03a2020-08-27 16:15:11 -0500446
447 /**
Matthew Barth216229c2020-09-24 13:47:33 -0500448 * @brief Parse and set the interfaces served by the zone(OPTIONAL)
Matthew Barth651f03a2020-08-27 16:15:11 -0500449 *
450 * @param[in] jsonObj - JSON object for the zone
451 *
Matthew Barth216229c2020-09-24 13:47:33 -0500452 * Constructs any zone interface handler functions for interfaces that the
453 * zone serves which contains the interface's property's value and
454 * persistency state (OPTIONAL). A property's "persist" state is defaulted
455 * to not be persisted when not given.
Matthew Barth651f03a2020-08-27 16:15:11 -0500456 */
457 void setInterfaces(const json& jsonObj);
Matthew Bartha0dd1352021-03-09 11:10:49 -0600458
459 /**
460 * @brief Is the property persisted
461 *
462 * @param[in] intf - Interface containing property
463 * @param[in] prop - Property to check if persisted
464 *
465 * @return - True if property is to be persisted, false otherwise
466 */
467 bool isPersisted(const std::string& intf, const std::string& prop);
468
469 /**
470 * @brief Save the thermal control current mode property to persisted
471 * storage
472 */
473 void saveCurrentMode();
Matthew Barth2b3253e2021-03-09 14:51:16 -0600474
475 /**
Matthew Bartha4483742021-03-25 14:09:01 -0500476 * @brief Restore persisted thermal control current mode property
477 * value, setting the mode to "Default" otherwise
478 */
479 void restoreCurrentMode();
480
481 /**
Matthew Barth2b3253e2021-03-09 14:51:16 -0600482 * @brief Get the request target base if defined, otherwise the the current
483 * target is returned
484 *
485 * @return - The request target base or current target
486 */
487 inline auto getRequestTargetBase() const
488 {
489 return (_requestTargetBase != 0) ? _requestTargetBase : _target;
490 };
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500491};
492
Matthew Barth651f03a2020-08-27 16:15:11 -0500493/**
494 * Properties of interfaces supported by the zone configuration
495 */
496namespace zone::property
497{
498
499/**
Matthew Barth216229c2020-09-24 13:47:33 -0500500 * @brief "Supported" property on the "xyz.openbmc_project.Control.ThermalMode"
Matthew Barthb584d812021-03-11 15:55:04 -0600501 * interface parser. Also creates the handler function for the Zone object to
502 * initialize the property according to what's parsed from the configuration.
Matthew Barth651f03a2020-08-27 16:15:11 -0500503 *
504 * @param[in] jsonObj - JSON object for the "Supported" property
Matthew Barth216229c2020-09-24 13:47:33 -0500505 * @param[in] persist - Whether to persist the value or not
Matthew Barth651f03a2020-08-27 16:15:11 -0500506 *
Matthew Barthb584d812021-03-11 15:55:04 -0600507 * @return Zone interface set property handler function for the "Supported"
508 * property
Matthew Barth651f03a2020-08-27 16:15:11 -0500509 */
Matthew Barthb584d812021-03-11 15:55:04 -0600510std::function<void(Zone*)> supported(const json& jsonObj, bool persist);
Matthew Barth651f03a2020-08-27 16:15:11 -0500511
512/**
Matthew Barth216229c2020-09-24 13:47:33 -0500513 * @brief "Current" property on the "xyz.openbmc_project.Control.ThermalMode"
Matthew Barthb584d812021-03-11 15:55:04 -0600514 * interface parser. Also creates the handler function for the Zone object to
515 * initialize the property according to what's parsed from the configuration.
Matthew Barth651f03a2020-08-27 16:15:11 -0500516 *
517 * @param[in] jsonObj - JSON object for the "Current" property
Matthew Barth216229c2020-09-24 13:47:33 -0500518 * @param[in] persist - Whether to persist the value or not
Matthew Barth651f03a2020-08-27 16:15:11 -0500519 *
Matthew Barthb584d812021-03-11 15:55:04 -0600520 * @return Zone interface set property handler function for the "Current"
521 * property
Matthew Barth651f03a2020-08-27 16:15:11 -0500522 */
Matthew Barthb584d812021-03-11 15:55:04 -0600523std::function<void(Zone*)> current(const json& jsonObj, bool persist);
Matthew Barth651f03a2020-08-27 16:15:11 -0500524
525} // namespace zone::property
526
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500527} // namespace phosphor::fan::control::json