blob: aad64d4611aa19b1695ce5b8d8b22c363fac5d25 [file] [log] [blame]
Matthew Barth1b4de262018-03-06 13:03:16 -06001#pragma once
2
3#include "types.hpp"
4#include "zone.hpp"
5
6namespace phosphor
7{
8namespace fan
9{
10namespace control
11{
12namespace trigger
13{
14
15/**
16 * @brief A trigger to start a timer for an event
17 * @details Creates and starts a timer according to the configuration given
18 * that will call an event's actions upon each timer expiration.
19 *
20 * @param[in] tConf - Timer configuration parameters
21 *
22 * @return Trigger lambda function
23 * A Trigger function that creates and starts a timer
24 */
25Trigger timer(TimerConf&& tConf);
26
Matthew Barth016bd242018-03-07 16:06:06 -060027/**
28 * @brief A trigger of a signal for an event
29 * @details Subscribes to the defined signal match.
30 *
31 * @param[in] match - Signal match to subscribe to
32 * @param[in] handler - Handler function for the received signal
33 *
34 * @return Trigger lambda function
35 * A Trigger function that subscribes to a signal
36 */
37Trigger signal(const std::string& match, Handler&& handler);
38
Matthew Barth1b4de262018-03-06 13:03:16 -060039} // namespace trigger
40} // namespace control
41} // namespace fan
42} // namespace phosphor