diff options
author | Matthew Barth <msbarth@us.ibm.com> | 2017-06-27 15:14:48 -0500 |
---|---|---|
committer | Matthew Barth <msbarth@us.ibm.com> | 2017-07-06 17:25:12 -0500 |
commit | 1ee48f2bf461575bbb0698084370a555f17f6bbf (patch) | |
tree | 78ff9a82b3dfed894132b9cf0e6660e62d866fd7 /control/zone.hpp | |
parent | 1bf0ce4bef11cf2ff24b82257625f6288823377e (diff) | |
download | phosphor-fan-presence-1ee48f2bf461575bbb0698084370a555f17f6bbf.tar.gz phosphor-fan-presence-1ee48f2bf461575bbb0698084370a555f17f6bbf.zip |
Timer for fan speed increases
A oneshot timer is started on each target speed increase where the
amount of time configured is how long the fans within the zone are
allowed to reach the new target speed before additional speed increase
requests will be processed. Any speed increase request deltas that are
above the current speed increase delta being processed as the new target
speed will cause the timer to stop and the difference between the deltas
are added onto the target speed.
Change-Id: I064941c4e12c3e44be90880d6f32c6fbcf7ae32d
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'control/zone.hpp')
-rw-r--r-- | control/zone.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/control/zone.hpp b/control/zone.hpp index bdde64a..dc5771c 100644 --- a/control/zone.hpp +++ b/control/zone.hpp @@ -208,6 +208,12 @@ class Zone void requestSpeedDecrease(uint64_t targetDelta); /** + * @brief Callback function for the increase timer that delays + * processing of requested speed increases while fans are increasing + */ + void incTimerExpired(); + + /** * @brief Callback function for the decrease timer that processes any * requested speed decreases if allowed */ @@ -276,6 +282,11 @@ class Zone uint64_t _decSpeedDelta = 0; /** + * The increase timer object + */ + phosphor::fan::util::Timer _incTimer; + + /** * The decrease timer object */ phosphor::fan::util::Timer _decTimer; |