diff options
author | Matt Spinler <spinler@us.ibm.com> | 2017-04-27 14:21:48 -0500 |
---|---|---|
committer | Matt Spinler <spinler@us.ibm.com> | 2017-05-11 13:52:50 -0500 |
commit | ebaae6115ff5248d7f46d065ca96229c1f4e583d (patch) | |
tree | 2c8771ab9f47db9c3a07aceb5cb2bba533346ba8 /monitor/fan.cpp | |
parent | abf8da369cb1e7094cc00295131502c73ed5cbc1 (diff) | |
download | phosphor-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.cpp')
-rw-r--r-- | monitor/fan.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/monitor/fan.cpp b/monitor/fan.cpp index b29eaab..852d2ba 100644 --- a/monitor/fan.cpp +++ b/monitor/fan.cpp @@ -51,6 +51,21 @@ Fan::Fan(sdbusplus::bus::bus& bus, } +void Fan::tachChanged() +{ + for (auto& s : _sensors) + { + tachChanged(*s); + } +} + + +void Fan::tachChanged(TachSensor& sensor) +{ + //TODO +} + + uint64_t Fan::getTargetSpeed(const TachSensor& sensor) { uint64_t target = 0; |