diff options
author | Matthew Barth <msbarth@us.ibm.com> | 2017-10-05 17:04:11 -0500 |
---|---|---|
committer | Matthew Barth <msbarth@us.ibm.com> | 2017-11-17 13:14:11 -0600 |
commit | 2a646c5fdbe24e41be6ed22b2c1c47edff09eb39 (patch) | |
tree | c5278fe1aa08767e49d25bd0e014d8500c074b99 /control/actions.hpp | |
parent | bfb1a566b781e63dfda6038d9918706423410c26 (diff) | |
download | phosphor-fan-presence-2a646c5fdbe24e41be6ed22b2c1c47edff09eb39.tar.gz phosphor-fan-presence-2a646c5fdbe24e41be6ed22b2c1c47edff09eb39.zip |
Action that creates/starts a timer
Another action is provided to the timer and is performed when the timer
expires.
Change-Id: Ie6a06b0d56272a158d74bf03287183f07f00aed8
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'control/actions.hpp')
-rw-r--r-- | control/actions.hpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/control/actions.hpp b/control/actions.hpp index 3061814..fff8250 100644 --- a/control/actions.hpp +++ b/control/actions.hpp @@ -15,6 +15,21 @@ namespace action { /** + * @brief An action that wraps a list of actions with a timer + * @details Sets up a list of actions to be invoked when the defined timer + * expires (or for each expiration of a repeating timer). + * + * @param[in] tConf - Timer configuration parameters + * @param[in] action - List of actions to be called when the timer expires + * + * @return Action lambda function + * An Action function that creates a timer + */ +Action call_actions_based_on_timer( + Timer&& tConf, + std::vector<Action>&& actions); + +/** * @brief An action to set the request speed base * @details A new target speed is determined using a speed delta being added * or subtracted, for increases or decrease respectively, from a base speed. |