blob: d9d6815f85f14bd37b4f3fdc5729ce1b1524bf8c [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] bus - sdbusplus bus object
82 * @param[in] event - sdeventplus event loop
83 * @param[in] mgr - Manager of this zone
Matthew Barth4f0d3b72020-08-27 14:32:15 -050084 */
Matthew Barth603ef162021-03-24 15:34:53 -050085 Zone(const json& jsonObj, sdbusplus::bus::bus& bus,
86 const sdeventplus::Event& event, Manager* mgr);
Matthew Barth4f0d3b72020-08-27 14:32:15 -050087
88 /**
Matthew Barthe47c9582021-03-09 14:24:02 -060089 * @brief Get the default ceiling
Matthew Barth4f0d3b72020-08-27 14:32:15 -050090 *
Matthew Barthe47c9582021-03-09 14:24:02 -060091 * Default ceiling is the highest target the fans within this zone is
92 * allowed to increase to. The zone's ceiling defaults to this unless
93 * changed by some configured event.
Matthew Barth4f0d3b72020-08-27 14:32:15 -050094 *
Matthew Barthe47c9582021-03-09 14:24:02 -060095 * @return Default ceiling of this zone
Matthew Barth4f0d3b72020-08-27 14:32:15 -050096 */
Matthew Barthe47c9582021-03-09 14:24:02 -060097 inline const auto& getDefaultCeiling() const
Matthew Barth4f0d3b72020-08-27 14:32:15 -050098 {
Matthew Barthe47c9582021-03-09 14:24:02 -060099 return _defaultCeiling;
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500100 }
101
102 /**
Matthew Barthe47c9582021-03-09 14:24:02 -0600103 * @brief Get the default floor
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500104 *
Matthew Barthe47c9582021-03-09 14:24:02 -0600105 * The default floor is the lowest target the fans within this zone
106 * are allowed to decrease to. The zone's floor defaults to this
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500107 * unless changed by some configured event.
108 *
Matthew Barthe47c9582021-03-09 14:24:02 -0600109 * @return Default floor
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500110 */
111 inline const auto& getDefaultFloor() const
112 {
113 return _defaultFloor;
114 }
115
116 /**
Matthew Barthe47c9582021-03-09 14:24:02 -0600117 * @brief Get the increase delay(OPTIONAL)
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500118 *
Matthew Barthe47c9582021-03-09 14:24:02 -0600119 * The increase delay is the amount of time(in seconds) increases
120 * to a target are delayed before being made. The default is 0, which
121 * results in immediate increase requests when any events result in
122 * a change to the target.
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500123 *
124 * It is recommend a value other than 0 is configured, but that inherently
Matthew Barthe47c9582021-03-09 14:24:02 -0600125 * depends on the fan controller and configured increases.
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500126 *
Matthew Barthe47c9582021-03-09 14:24:02 -0600127 * @return Increase delay(in seconds)
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500128 */
129 inline const auto& getIncDelay() const
130 {
131 return _incDelay;
132 }
133
134 /**
Matthew Barthe47c9582021-03-09 14:24:02 -0600135 * @brief Get the decrease interval
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500136 *
Matthew Barthe47c9582021-03-09 14:24:02 -0600137 * Decreases happen on a set interval when no requests for an increase
138 * in fan targets exists. This is the interval(in seconds) at which the fans
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500139 * within the zone are decreased if events exist that result in a target
Matthew Barthe47c9582021-03-09 14:24:02 -0600140 * decrease.
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500141 *
Matthew Barthe47c9582021-03-09 14:24:02 -0600142 * @return Decrease interval(in seconds)
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500143 */
144 inline const auto& getDecInterval() const
145 {
146 return _decInterval;
147 }
148
Matthew Barth651f03a2020-08-27 16:15:11 -0500149 /**
Matthew Barth6f787302021-03-25 15:01:01 -0500150 * @brief Get the current target of the zone
151 *
152 * @return - The current target of the zone
153 */
154 inline const auto& getTarget() const
155 {
156 return _target;
157 }
158
159 /**
Matthew Barthdc776c82021-02-25 16:06:16 -0600160 * @brief Get the target increase delta
161 *
162 * @return - The current target increase delta
163 */
164 inline auto& getIncDelta() const
165 {
166 return _incDelta;
167 };
168
169 /**
Matthew Barth45c44ea2021-03-03 13:16:14 -0600170 * @brief Get the target decrease delta
171 *
172 * @return - The current target decrease delta
173 */
174 inline auto& getDecDelta() const
175 {
176 return _decDelta;
177 };
178
179 /**
Matthew Barth603ef162021-03-24 15:34:53 -0500180 * @brief Get the manager of the zone
181 *
182 * @return - The manager of the zone
183 */
184 inline auto* getManager() const
185 {
186 return _manager;
187 }
188
189 /**
Matthew Barthde90fb42021-03-04 16:34:28 -0600190 * @brief Add a fan object to the zone
191 *
192 * @param[in] fan - Unique pointer to a fan object that will be moved into
193 * the zone
194 *
195 * Adds a fan object to the list of fans that make up the zone by moving the
196 * fan object into the list.
197 */
198 void addFan(std::unique_ptr<Fan> fan);
199
Matthew Barth12cb1252021-03-08 16:47:30 -0600200 /**
Matthew Barth8ba715e2021-03-05 09:00:05 -0600201 * Sets all fans in the zone to the target given when the zone is active
202 *
203 * @param[in] target - Target for fans
204 */
205 void setTarget(uint64_t target);
206
207 /**
208 * @brief Sets the automatic fan control allowed active state
209 *
210 * @param[in] ident - An identifier that affects the active state
211 * @param[in] isActiveAllow - Active state according to group
212 */
213 void setActiveAllow(const std::string& ident, bool isActiveAllow);
214
215 /**
Matthew Barth12cb1252021-03-08 16:47:30 -0600216 * @brief Set the floor to the given target and increase target to the floor
217 * when the target is below the floor value when floor changes are allowed.
218 *
219 * @param[in] target - Target to set the floor to
220 */
221 void setFloor(uint64_t target);
222
223 /**
224 * @brief Sets the floor change allowed state
225 *
226 * @param[in] ident - An identifier that affects floor changes
227 * @param[in] isAllow - Allow state according to the identifier
228 */
229 inline void setFloorChangeAllow(const std::string& ident, bool isAllow)
230 {
231 _floorChange[ident] = isAllow;
232 }
233
234 /**
Matthew Barth45c44ea2021-03-03 13:16:14 -0600235 * @brief Sets the decrease allowed state of a group
236 *
237 * @param[in] ident - An identifier that affects speed decreases
238 * @param[in] isAllow - Allow state according to the identifier
239 */
240 inline void setDecreaseAllow(const std::string& ident, bool isAllow)
241 {
242 _decAllowed[ident] = isAllow;
243 }
244
245 /**
Matthew Barth12cb1252021-03-08 16:47:30 -0600246 * @brief Calculate the requested target from the given delta and increases
247 * the fans, not going above the ceiling.
248 *
249 * @param[in] targetDelta - The delta to increase the target by
250 */
251 void requestIncrease(uint64_t targetDelta);
252
Matthew Bartha0dd1352021-03-09 11:10:49 -0600253 /**
Matthew Barth007de092021-03-25 13:56:04 -0500254 * @brief Callback function for the increase timer that delays
255 * processing of requested target increases while fans are increasing
256 */
257 void incTimerExpired();
258
259 /**
Matthew Barth45c44ea2021-03-03 13:16:14 -0600260 * @brief Calculate the lowest requested decrease target from the given
261 * delta within a decrease interval.
262 *
263 * @param[in] targetDelta - The delta to decrease the target by
264 */
265 void requestDecrease(uint64_t targetDelta);
266
267 /**
Matthew Barth007de092021-03-25 13:56:04 -0500268 * @brief Callback function for the decrease timer that processes any
269 * requested target decreases if allowed
270 */
271 void decTimerExpired();
272
273 /**
Matthew Barth07fecfc2021-01-29 09:04:43 -0600274 * @brief Set the requested target base to be used as the target to base a
275 * new requested target from
276 *
277 * @param[in] targetBase - Base target value to use
278 */
279 inline void setRequestTargetBase(uint64_t targetBase)
280 {
281 _requestTargetBase = targetBase;
282 };
283
284 /**
Matthew Bartha0dd1352021-03-09 11:10:49 -0600285 * @brief Set a property to be persisted
286 *
287 * @param[in] intf - Interface containing property
288 * @param[in] prop - Property to be persisted
289 */
290 void setPersisted(const std::string& intf, const std::string& prop);
291
292 /**
293 * @brief Overridden thermal object's set 'Current' property function
294 *
295 * @param[in] value - Value to set 'Current' to
296 *
297 * @return - The updated value of the 'Current' property
298 */
299 std::string current(std::string value) override;
300
Matthew Barthb584d812021-03-11 15:55:04 -0600301 /**
302 * @brief A handler function to set/update a property on a zone
303 * @details Sets or updates a zone's dbus property to the given value using
304 * the provided base dbus object's set property function
305 *
306 * @param[in] intf - Interface on zone object
307 * @param[in] prop - Property on interface
308 * @param[in] func - Zone object's set property function pointer
309 * @param[in] value - Value to set property to
310 * @param[in] persist - Persist property value or not
311 *
312 * @return Lambda function
313 * A lambda function to set/update the zone's dbus property
314 */
315 template <typename T>
316 static auto setProperty(const char* intf, const char* prop,
317 T (Zone::*func)(T), T&& value, bool persist)
318 {
319 return [=, value = std::forward<T>(value)](Zone* zone) {
320 (zone->*func)(value);
321 if (persist)
322 {
323 zone->setPersisted(intf, prop);
324 }
325 };
326 }
327
328 /**
329 * @brief A handler function to set/update a zone's dbus property's persist
330 * state
331 * @details Sets or updates a zone's dbus property's persist state where the
332 * value of the property is to be left unchanged
333 *
334 * @param[in] intf - Interface on zone object
335 * @param[in] prop - Property on interface
336 * @param[in] persist - Persist property value or not
337 *
338 * @return Lambda function
339 * A lambda function to set/update the zone's dbus property's persist
340 * state
341 */
342 static auto setPropertyPersist(const char* intf, const char* prop,
343 bool persist)
344 {
345 return [=](Zone* zone) {
346 if (persist)
347 {
348 zone->setPersisted(intf, prop);
349 }
350 };
351 }
352
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500353 private:
Matthew Barth603ef162021-03-24 15:34:53 -0500354 /* The zone's manager */
355 Manager* _manager;
356
Matthew Barthe47c9582021-03-09 14:24:02 -0600357 /* The zone's default ceiling value for fans */
358 uint64_t _defaultCeiling;
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500359
Matthew Barthe47c9582021-03-09 14:24:02 -0600360 /* The zone's default floor value for fans */
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500361 uint64_t _defaultFloor;
362
Matthew Barthe47c9582021-03-09 14:24:02 -0600363 /* Zone's increase delay(in seconds) (OPTIONAL) */
Matthew Barth007de092021-03-25 13:56:04 -0500364 std::chrono::seconds _incDelay;
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500365
Matthew Barthe47c9582021-03-09 14:24:02 -0600366 /* Zone's decrease interval(in seconds) */
Matthew Barth007de092021-03-25 13:56:04 -0500367 std::chrono::seconds _decInterval;
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500368
Matthew Barth12cb1252021-03-08 16:47:30 -0600369 /* The floor target to not go below */
370 uint64_t _floor;
371
372 /* Target for this zone */
373 uint64_t _target;
374
Matthew Barth2b3253e2021-03-09 14:51:16 -0600375 /* Zone increase delta */
376 uint64_t _incDelta;
377
Matthew Barth45c44ea2021-03-03 13:16:14 -0600378 /* Zone decrease delta */
379 uint64_t _decDelta;
380
Matthew Barth2b3253e2021-03-09 14:51:16 -0600381 /* The ceiling target to not go above */
382 uint64_t _ceiling;
383
384 /* Requested target base */
385 uint64_t _requestTargetBase;
386
Matthew Barth12cb1252021-03-08 16:47:30 -0600387 /* Map of whether floor changes are allowed by a string identifier */
388 std::map<std::string, bool> _floorChange;
389
Matthew Barth45c44ea2021-03-03 13:16:14 -0600390 /* Map of controlling decreases allowed by a string identifer */
391 std::map<std::string, bool> _decAllowed;
392
Matthew Bartha0dd1352021-03-09 11:10:49 -0600393 /* Map of interfaces to persisted properties the zone hosts*/
394 std::map<std::string, std::vector<std::string>> _propsPersisted;
395
Matthew Barth8ba715e2021-03-05 09:00:05 -0600396 /* Automatic fan control active state */
397 bool _isActive;
398
Matthew Barth007de092021-03-25 13:56:04 -0500399 /* The target increase timer object */
400 Timer _incTimer;
401
402 /* The target decrease timer object */
403 Timer _decTimer;
404
Matthew Barth8ba715e2021-03-05 09:00:05 -0600405 /* Map of active fan control allowed by a string identifier */
406 std::map<std::string, bool> _active;
407
Matthew Barthb584d812021-03-11 15:55:04 -0600408 /* Interface to property mapping of their associated set property handler
409 * function */
410 static const std::map<
411 std::string,
412 std::map<std::string,
413 std::function<std::function<void(Zone*)>(const json&, bool)>>>
Matthew Barth216229c2020-09-24 13:47:33 -0500414 _intfPropHandlers;
Matthew Barth651f03a2020-08-27 16:15:11 -0500415
Matthew Barthde90fb42021-03-04 16:34:28 -0600416 /* List of fans included in this zone */
417 std::vector<std::unique_ptr<Fan>> _fans;
418
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500419 /**
Matthew Barthe47c9582021-03-09 14:24:02 -0600420 * @brief Parse and set the zone's default ceiling value
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500421 *
422 * @param[in] jsonObj - JSON object for the zone
423 *
Matthew Barthe47c9582021-03-09 14:24:02 -0600424 * Sets the default ceiling value for the zone from the JSON configuration
425 * object
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500426 */
Matthew Barthe47c9582021-03-09 14:24:02 -0600427 void setDefaultCeiling(const json& jsonObj);
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500428
429 /**
Matthew Barthe47c9582021-03-09 14:24:02 -0600430 * @brief Parse and set the zone's default floor value
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500431 *
432 * @param[in] jsonObj - JSON object for the zone
433 *
Matthew Barthe47c9582021-03-09 14:24:02 -0600434 * Sets the default floor value for the zone from the JSON configuration
435 * object
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500436 */
437 void setDefaultFloor(const json& jsonObj);
438
439 /**
440 * @brief Parse and set the zone's decrease interval(in seconds)
441 *
442 * @param[in] jsonObj - JSON object for the zone
443 *
Matthew Barthe47c9582021-03-09 14:24:02 -0600444 * Sets the decrease interval(in seconds) for the zone from the JSON
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500445 * configuration object
446 */
447 void setDecInterval(const json& jsonObj);
Matthew Barth651f03a2020-08-27 16:15:11 -0500448
449 /**
Matthew Barth216229c2020-09-24 13:47:33 -0500450 * @brief Parse and set the interfaces served by the zone(OPTIONAL)
Matthew Barth651f03a2020-08-27 16:15:11 -0500451 *
452 * @param[in] jsonObj - JSON object for the zone
453 *
Matthew Barth216229c2020-09-24 13:47:33 -0500454 * Constructs any zone interface handler functions for interfaces that the
455 * zone serves which contains the interface's property's value and
456 * persistency state (OPTIONAL). A property's "persist" state is defaulted
457 * to not be persisted when not given.
Matthew Barth651f03a2020-08-27 16:15:11 -0500458 */
459 void setInterfaces(const json& jsonObj);
Matthew Bartha0dd1352021-03-09 11:10:49 -0600460
461 /**
462 * @brief Is the property persisted
463 *
464 * @param[in] intf - Interface containing property
465 * @param[in] prop - Property to check if persisted
466 *
467 * @return - True if property is to be persisted, false otherwise
468 */
469 bool isPersisted(const std::string& intf, const std::string& prop);
470
471 /**
472 * @brief Save the thermal control current mode property to persisted
473 * storage
474 */
475 void saveCurrentMode();
Matthew Barth2b3253e2021-03-09 14:51:16 -0600476
477 /**
Matthew Bartha4483742021-03-25 14:09:01 -0500478 * @brief Restore persisted thermal control current mode property
479 * value, setting the mode to "Default" otherwise
480 */
481 void restoreCurrentMode();
482
483 /**
Matthew Barth2b3253e2021-03-09 14:51:16 -0600484 * @brief Get the request target base if defined, otherwise the the current
485 * target is returned
486 *
487 * @return - The request target base or current target
488 */
489 inline auto getRequestTargetBase() const
490 {
491 return (_requestTargetBase != 0) ? _requestTargetBase : _target;
492 };
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500493};
494
Matthew Barth651f03a2020-08-27 16:15:11 -0500495/**
496 * Properties of interfaces supported by the zone configuration
497 */
498namespace zone::property
499{
500
501/**
Matthew Barth216229c2020-09-24 13:47:33 -0500502 * @brief "Supported" property on the "xyz.openbmc_project.Control.ThermalMode"
Matthew Barthb584d812021-03-11 15:55:04 -0600503 * interface parser. Also creates the handler function for the Zone object to
504 * initialize the property according to what's parsed from the configuration.
Matthew Barth651f03a2020-08-27 16:15:11 -0500505 *
506 * @param[in] jsonObj - JSON object for the "Supported" property
Matthew Barth216229c2020-09-24 13:47:33 -0500507 * @param[in] persist - Whether to persist the value or not
Matthew Barth651f03a2020-08-27 16:15:11 -0500508 *
Matthew Barthb584d812021-03-11 15:55:04 -0600509 * @return Zone interface set property handler function for the "Supported"
510 * property
Matthew Barth651f03a2020-08-27 16:15:11 -0500511 */
Matthew Barthb584d812021-03-11 15:55:04 -0600512std::function<void(Zone*)> supported(const json& jsonObj, bool persist);
Matthew Barth651f03a2020-08-27 16:15:11 -0500513
514/**
Matthew Barth216229c2020-09-24 13:47:33 -0500515 * @brief "Current" property on the "xyz.openbmc_project.Control.ThermalMode"
Matthew Barthb584d812021-03-11 15:55:04 -0600516 * interface parser. Also creates the handler function for the Zone object to
517 * initialize the property according to what's parsed from the configuration.
Matthew Barth651f03a2020-08-27 16:15:11 -0500518 *
519 * @param[in] jsonObj - JSON object for the "Current" property
Matthew Barth216229c2020-09-24 13:47:33 -0500520 * @param[in] persist - Whether to persist the value or not
Matthew Barth651f03a2020-08-27 16:15:11 -0500521 *
Matthew Barthb584d812021-03-11 15:55:04 -0600522 * @return Zone interface set property handler function for the "Current"
523 * property
Matthew Barth651f03a2020-08-27 16:15:11 -0500524 */
Matthew Barthb584d812021-03-11 15:55:04 -0600525std::function<void(Zone*)> current(const json& jsonObj, bool persist);
Matthew Barth651f03a2020-08-27 16:15:11 -0500526
527} // namespace zone::property
528
Matthew Barth4f0d3b72020-08-27 14:32:15 -0500529} // namespace phosphor::fan::control::json