diff options
author | Matthew Barth <msbarth@us.ibm.com> | 2017-06-29 11:43:45 -0500 |
---|---|---|
committer | Matthew Barth <msbarth@us.ibm.com> | 2017-07-06 17:25:12 -0500 |
commit | a956184bfe6afa6803fc4456eea1f5b6742d8f80 (patch) | |
tree | 490a45ef4feb71435d28860c4758c8a416318137 /control/zone.hpp | |
parent | b4a7cb99bb82f602d3cff848a1f14ade1da2ddb5 (diff) | |
download | phosphor-fan-presence-a956184bfe6afa6803fc4456eea1f5b6742d8f80.tar.gz phosphor-fan-presence-a956184bfe6afa6803fc4456eea1f5b6742d8f80.zip |
Add increase & decrease timer values in seconds
Support setting the increase delay time(in seconds) for each zone from
the zone yaml file. Speed increases use a delay type timer where the
amount of time given delays additional increase requests from happening
until the fans within the zone reach the highest net increase in speeds.
Support setting the decrease interval time(in seconds) for each zone
from the zone yaml file. Since decreasing is done on an interval, a
decrease interval time of zero disables the decrease interval timer
causing no decreases in speed to occur. Speed decreases use an interval
type timer to decrease the fan speeds within the zone when no speed
increase requests exist on the given time interval.
Change-Id: I88334a313b6e2820b768fa7e3f1cb65887f29258
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 9786db4..706d9c2 100644 --- a/control/zone.hpp +++ b/control/zone.hpp @@ -1,4 +1,5 @@ #pragma once +#include <chrono> #include <vector> #include <algorithm> #include <sdbusplus/bus.hpp> @@ -280,6 +281,16 @@ class Zone uint64_t _decSpeedDelta = 0; /** + * Speed increase delay in seconds + */ + std::chrono::seconds _incDelay; + + /** + * Speed decrease interval in seconds + */ + std::chrono::seconds _decInterval; + + /** * The increase timer object */ phosphor::fan::util::Timer _incTimer; |