summaryrefslogtreecommitdiffstats
path: root/control/functor.hpp
diff options
context:
space:
mode:
authorMatthew Barth <msbarth@us.ibm.com>2017-05-11 15:00:36 -0500
committerMatthew Barth <msbarth@us.ibm.com>2017-05-31 10:55:48 -0500
commit17d1fe23b704cacb1cdd9b58156f354626b36f8c (patch)
treed448834a4cee7a2f71be26141431459f0808bd98 /control/functor.hpp
parent38a93a8aa2feea7f4e785db6b4ff6d9e81f6020d (diff)
downloadphosphor-fan-presence-17d1fe23b704cacb1cdd9b58156f354626b36f8c.tar.gz
phosphor-fan-presence-17d1fe23b704cacb1cdd9b58156f354626b36f8c.zip
Add setting zone speed action
Enable an action to be defined that sets the zone to a given speed when a number of properties are set to a given value Change-Id: I5252a20a24bdb14dee63080f2c08b080c82ad7e8 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'control/functor.hpp')
-rw-r--r--control/functor.hpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/control/functor.hpp b/control/functor.hpp
index f2f3a78..2b36445 100644
--- a/control/functor.hpp
+++ b/control/functor.hpp
@@ -27,6 +27,19 @@ auto make_handler(T&& handler)
}
/**
+ * @brief Create an action function object
+ *
+ * @param[in] action - The action being created
+ *
+ * @return - The created action function object
+ */
+template <typename T>
+auto make_action(T&& action)
+{
+ return Action(std::forward<T>(action));
+}
+
+/**
* @struct Property Changed
* @brief A match filter functor for Dbus property value changed signals
*
OpenPOWER on IntegriCloud