summaryrefslogtreecommitdiffstats
path: root/monitor/fan.hpp
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2017-04-27 14:21:48 -0500
committerMatt Spinler <spinler@us.ibm.com>2017-05-11 13:52:50 -0500
commitebaae6115ff5248d7f46d065ca96229c1f4e583d (patch)
tree2c8771ab9f47db9c3a07aceb5cb2bba533346ba8 /monitor/fan.hpp
parentabf8da369cb1e7094cc00295131502c73ed5cbc1 (diff)
downloadphosphor-fan-presence-ebaae6115ff5248d7f46d065ca96229c1f4e583d.tar.gz
phosphor-fan-presence-ebaae6115ff5248d7f46d065ca96229c1f4e583d.zip
Add dbus support to TachSensor
TachSensor will match on properties changed signals for the Value and Target properties. When these occur, it will load in those properties and then tell the Fan class there was a change. Also, TachSensor will read in the Target property during construction so it will have a valid value to check against right away. Change-Id: I2dc2cacf5804826c6b0e0ea91196cbdaa4d5b893 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Diffstat (limited to 'monitor/fan.hpp')
-rw-r--r--monitor/fan.hpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/monitor/fan.hpp b/monitor/fan.hpp
index 6cbd370..d79ae31 100644
--- a/monitor/fan.hpp
+++ b/monitor/fan.hpp
@@ -66,6 +66,18 @@ class Fan
std::shared_ptr<sd_event>& events,
const FanDefinition& def);
+ /**
+ * @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.
+ */
+ void tachChanged(TachSensor& sensor);
+
+ /**
+ * @brief Calls tachChanged(sensor) on each sensor
+ */
+ void tachChanged();
private:
OpenPOWER on IntegriCloud