summaryrefslogtreecommitdiffstats
path: root/control/zone.hpp
diff options
context:
space:
mode:
authorWilliam A. Kennington III <wak@google.com>2018-10-19 17:29:46 -0700
committerWilliam A. Kennington III <wak@google.com>2018-10-29 15:59:03 -0700
commit1cfc2f11b13412a15f8478cebc35e50e6feb13a2 (patch)
tree05986154355a3d6c0667368c12cf34d7ad97d4cd /control/zone.hpp
parent5882e0c0593edaf464eea960f1ab7b2f5cd10240 (diff)
downloadphosphor-fan-presence-1cfc2f11b13412a15f8478cebc35e50e6feb13a2.tar.gz
phosphor-fan-presence-1cfc2f11b13412a15f8478cebc35e50e6feb13a2.zip
Switch sd_event loops to sdeventplus
This change is mostly focused around plumbing the sdeventplus::Event object everywhere and using the member functions provided for the event. No migration to the timer utility is performed yet. Change-Id: I912ab82bc081239d3b7c3cf7c5caca6742ef9c87 Signed-off-by: William A. Kennington III <wak@google.com>
Diffstat (limited to 'control/zone.hpp')
-rw-r--r--control/zone.hpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/control/zone.hpp b/control/zone.hpp
index cd7e5d6..e035a64 100644
--- a/control/zone.hpp
+++ b/control/zone.hpp
@@ -4,6 +4,7 @@
#include <cassert>
#include <algorithm>
#include <sdbusplus/bus.hpp>
+#include <sdeventplus/event.hpp>
#include "fan.hpp"
#include "types.hpp"
#include "timer.hpp"
@@ -48,12 +49,12 @@ class Zone
*
* @param[in] mode - mode of fan control
* @param[in] bus - the dbus object
- * @param[in] events - sd_event pointer
+ * @param[in] event - Event loop reference
* @param[in] def - the fan zone definition data
*/
Zone(Mode mode,
sdbusplus::bus::bus& bus,
- phosphor::fan::event::EventPtr& events,
+ const sdeventplus::Event& event,
const ZoneDefinition& def);
/**
@@ -332,13 +333,13 @@ class Zone
void decTimerExpired();
/**
- * @brief Get the event pointer used with this zone's timers
+ * @brief Get the event loop used with this zone's timers
*
- * @return - The Dbus event pointer for timers
+ * @return - The event loop for timers
*/
- inline auto& getEventPtr()
+ inline auto& getEventLoop()
{
- return _sdEvents;
+ return _eventLoop;
}
/**
@@ -514,9 +515,9 @@ class Zone
phosphor::fan::util::Timer _decTimer;
/**
- * Dbus event used on set speed event timers
+ * Event loop used on set speed event timers
*/
- phosphor::fan::event::EventPtr& _sdEvents;
+ sdeventplus::Event _eventLoop;
/**
* The vector of fans in this zone
OpenPOWER on IntegriCloud