diff options
author | Matthew Barth <msbarth@us.ibm.com> | 2017-06-22 11:23:30 -0500 |
---|---|---|
committer | Matthew Barth <msbarth@us.ibm.com> | 2017-07-06 17:11:00 -0500 |
commit | 240397b9b80437db77d8d01db2b187d02ef415f7 (patch) | |
tree | ff16b6ef8983899c02974c3b12454e133e2118b4 /control/zone.hpp | |
parent | 246235237c92bd6a55487bdd9fdc6b4b11466a7e (diff) | |
download | phosphor-fan-presence-240397b9b80437db77d8d01db2b187d02ef415f7.tar.gz phosphor-fan-presence-240397b9b80437db77d8d01db2b187d02ef415f7.zip |
Process speed increase requests
Speed increases are made providing a target speed delta. The increase is
made when the delta is higher than the current increase that may be
occurring. When no increase is currently happening, the increase delta
requested is accepted. All resulting target increases will not go above
a defined ceiling speed.
Change-Id: Ia19c71a023cf5b897d5ba92974ff98451f34d5a3
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'control/zone.hpp')
-rw-r--r-- | control/zone.hpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/control/zone.hpp b/control/zone.hpp index 20b9ac9..cc05959 100644 --- a/control/zone.hpp +++ b/control/zone.hpp @@ -178,6 +178,14 @@ class Zone return _incSpeedDelta; }; + /** + * @brief Calculate the requested target speed from the given delta + * and increase the fan speeds, not going above the ceiling. + * + * @param[in] targetDelta - The delta to increase the target speed by + */ + void requestSpeedIncrease(uint64_t targetDelta); + private: /** @@ -226,6 +234,11 @@ class Zone bool _isActive = true; /** + * Target speed for this zone + */ + uint64_t _targetSpeed = _fullSpeed; + + /** * Speed increase delta */ uint64_t _incSpeedDelta = 0; |