summaryrefslogtreecommitdiffstats
path: root/control/zone.hpp
diff options
context:
space:
mode:
authorMatthew Barth <msbarth@us.ibm.com>2017-08-15 10:51:37 -0500
committerMatthew Barth <msbarth@us.ibm.com>2017-08-16 09:47:08 -0500
commit9014980aa76692cd7f08b5e69565133122c758cd (patch)
tree92caf9df963449625d513e8c1cc5c704681eb7f9 /control/zone.hpp
parent172f393696b967f23e1d166fc7eb952a11994c5d (diff)
downloadphosphor-fan-presence-9014980aa76692cd7f08b5e69565133122c758cd.tar.gz
phosphor-fan-presence-9014980aa76692cd7f08b5e69565133122c758cd.zip
Add timer option to run set speed event actions
For groups within set speed events where the property values of the group may not signal its action to occur, an optional timer may be added to the event. This timer is configured as a repeating timer on the interval provided where upon timer expiration, the event's action is run. Change-Id: I4cbe8a0ab1b734bfc7828706a6515af7f6d78b52 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'control/zone.hpp')
-rw-r--r--control/zone.hpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/control/zone.hpp b/control/zone.hpp
index a56b1c7..6e81bd1 100644
--- a/control/zone.hpp
+++ b/control/zone.hpp
@@ -247,6 +247,15 @@ class Zone
*/
void decTimerExpired();
+ /**
+ * @brief Callback function for event timers that processes the given
+ * action for a group
+ *
+ * @param[in] eventGroup - Group to process action on
+ * @param[in] eventAction - Event action to run
+ */
+ void timerExpired(Group eventGroup, Action eventAction);
+
private:
/**
@@ -330,6 +339,11 @@ class Zone
phosphor::fan::util::Timer _decTimer;
/**
+ * Dbus event used on set speed event timers
+ */
+ phosphor::fan::event::EventPtr& _sdEvents;
+
+ /**
* The vector of fans in this zone
*/
std::vector<std::unique_ptr<Fan>> _fans;
@@ -353,6 +367,11 @@ class Zone
std::vector<SignalEvent> _signalEvents;
/**
+ * @brief List of timers for events
+ */
+ std::vector<std::unique_ptr<phosphor::fan::util::Timer>> _timerEvents;
+
+ /**
* @brief Refresh the given property's cached value
*
* @param[in] bus - the bus to use
OpenPOWER on IntegriCloud