summaryrefslogtreecommitdiffstats
path: root/control/functor.hpp
diff options
context:
space:
mode:
authorMatthew Barth <msbarth@us.ibm.com>2019-02-13 11:37:03 -0600
committerMatthew Barth <msbarth@us.ibm.com>2019-02-14 14:44:11 -0600
commit1b3e960219c8d7d4add71c862cd8756104615251 (patch)
treee7be8b88340737ad6d9bc7dd81a125c7fcd7f120 /control/functor.hpp
parent4b258ac8b679b8d160d0c3f290c0ecee6a99a1e3 (diff)
downloadphosphor-fan-presence-1b3e960219c8d7d4add71c862cd8756104615251.tar.gz
phosphor-fan-presence-1b3e960219c8d7d4add71c862cd8756104615251.zip
Add framework to set properties on a zone
Properties hosted by a zone object need the ability to be set upon zone initialization. This adds support to allow the zone configuration yaml to contain what properties to set and with what values on a zone. The parser updates to generate what uses this framework is in a followup commit. Change-Id: I9fd93746cc097f05869400451daff03cf3ef89b7 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 71607c5..ab5005d 100644
--- a/control/functor.hpp
+++ b/control/functor.hpp
@@ -17,6 +17,19 @@ using namespace sdbusplus::bus::match;
using namespace phosphor::logging;
/**
+ * @brief Create a zone handler function object
+ *
+ * @param[in] handler - The handler being created
+ *
+ * @return - The created zone handler function object
+ */
+template <typename T>
+auto make_zoneHandler(T&& handler)
+{
+ return ZoneHandler(std::forward<T>(handler));
+}
+
+/**
* @brief Create a handler function object
*
* @param[in] handler - The handler being created
OpenPOWER on IntegriCloud