diff options
author | Matt Spinler <spinler@us.ibm.com> | 2017-04-27 14:29:24 -0500 |
---|---|---|
committer | Matt Spinler <spinler@us.ibm.com> | 2017-05-11 13:52:50 -0500 |
commit | a9406a774a35c02fabc94ab842788dd9891f59e8 (patch) | |
tree | ea5e5cfd98ba88f293ba31137e697903237d92d5 /monitor/fan.hpp | |
parent | ebaae6115ff5248d7f46d065ca96229c1f4e583d (diff) | |
download | phosphor-fan-presence-a9406a774a35c02fabc94ab842788dd9891f59e8.tar.gz phosphor-fan-presence-a9406a774a35c02fabc94ab842788dd9891f59e8.zip |
Add Timer support to TachSensor
Add a Timer object to the TachSensor class
Change-Id: I419b5712de9e8e94f2a08de84d13170e44c33c7a
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Diffstat (limited to 'monitor/fan.hpp')
-rw-r--r-- | monitor/fan.hpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/monitor/fan.hpp b/monitor/fan.hpp index d79ae31..9aeccd2 100644 --- a/monitor/fan.hpp +++ b/monitor/fan.hpp @@ -70,7 +70,7 @@ class Fan * @brief Callback function for when an input sensor changes * * Starts a timer, where if it expires then the sensor - * was slow for too long and can be considered not functional. + * was out of range for too long and can be considered not functional. */ void tachChanged(TachSensor& sensor); @@ -79,6 +79,18 @@ class Fan */ void tachChanged(); + /** + * @brief The callback function for the timer + * + * Sets the sensor to not functional. + * If enough sensors are now not functional, + * updates the functional status of the whole + * fan in the inventory. + * + * @param[in] sensor - the sensor whose timer expired + */ + void timerExpired(TachSensor& sensor); + private: /** |