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>
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 @@
* @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 @@
*/
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:
/**