From a9406a774a35c02fabc94ab842788dd9891f59e8 Mon Sep 17 00:00:00 2001 From: Matt Spinler Date: Thu, 27 Apr 2017 14:29:24 -0500 Subject: Add Timer support to TachSensor Add a Timer object to the TachSensor class Change-Id: I419b5712de9e8e94f2a08de84d13170e44c33c7a Signed-off-by: Matt Spinler --- monitor/fan.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'monitor/fan.cpp') diff --git a/monitor/fan.cpp b/monitor/fan.cpp index 852d2ba..7d657a0 100644 --- a/monitor/fan.cpp +++ b/monitor/fan.cpp @@ -44,10 +44,9 @@ Fan::Fan(sdbusplus::bus::bus& bus, *this, std::get(s), std::get(s), - std::get(def))); - + std::get(def), + events)); } - } @@ -123,6 +122,16 @@ bool Fan::outOfRange(const TachSensor& sensor) } +void Fan::timerExpired(TachSensor& sensor) +{ + sensor.setFunctional(false); + + //If the fan is currently functional, but too many + //contained sensors are now nonfunctional, update + //the whole fan nonfunctional. + //TODO +} + } } } -- cgit v1.2.1