diff options
author | Matthew Barth <msbarth@us.ibm.com> | 2017-10-05 17:03:40 -0500 |
---|---|---|
committer | Matthew Barth <msbarth@us.ibm.com> | 2017-11-17 13:14:11 -0600 |
commit | bfb1a566b781e63dfda6038d9918706423410c26 (patch) | |
tree | 92197497cb281cff15d69fd91b331c0bba367718 /control/types.hpp | |
parent | 7b7ceb8deb48d6d5833b02bc33987fca2e647a68 (diff) | |
download | phosphor-fan-presence-bfb1a566b781e63dfda6038d9918706423410c26.tar.gz phosphor-fan-presence-bfb1a566b781e63dfda6038d9918706423410c26.zip |
Add timer event management
Events defined to have timers require the ability to find a timer, add a
timer to the event, and removing a timer event entirely. These event
timers are intended to allow actions based on the event to be delayed or
recurring based on the timer defined.
Change-Id: Ieaf26f031c5e5aac9472e92354bfb76392642cb4
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'control/types.hpp')
-rw-r--r-- | control/types.hpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/control/types.hpp b/control/types.hpp index 0d7610c..b0b84f3 100644 --- a/control/types.hpp +++ b/control/types.hpp @@ -81,8 +81,11 @@ constexpr auto eventHandlerPos = 2; constexpr auto eventActionsPos = 3; using EventData = std::tuple<Group, std::string, Handler, std::vector<Action>>; -constexpr auto timerTimerPos = 0; -using TimerEvent = std::tuple<phosphor::fan::util::Timer>; +constexpr auto timerEventDataPos = 0; +constexpr auto timerTimerPos = 1; +using TimerEvent = + std::tuple<std::unique_ptr<EventData>, + std::unique_ptr<phosphor::fan::util::Timer>>; constexpr auto signalEventDataPos = 0; constexpr auto signalMatchPos = 1; |