diff options
author | Matthew Barth <msbarth@us.ibm.com> | 2019-02-13 11:37:03 -0600 |
---|---|---|
committer | Matthew Barth <msbarth@us.ibm.com> | 2019-02-14 14:44:11 -0600 |
commit | 1b3e960219c8d7d4add71c862cd8756104615251 (patch) | |
tree | e7be8b88340737ad6d9bc7dd81a125c7fcd7f120 /control/types.hpp | |
parent | 4b258ac8b679b8d160d0c3f290c0ecee6a99a1e3 (diff) | |
download | phosphor-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/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 239d00d..dcc1b8c 100644 --- a/control/types.hpp +++ b/control/types.hpp @@ -45,6 +45,7 @@ using FanDefinition = std::tuple<std::string, constexpr auto intfPos = 0; constexpr auto propPos = 1; using Group = std::map<std::string, std::tuple<std::string, std::string>>; +using ZoneHandler = std::function<void(Zone&)>; using Handler = std::function<void(sdbusplus::bus::bus&, sdbusplus::message::message&, Zone&)>; @@ -108,13 +109,15 @@ constexpr auto fullSpeedPos = 1; constexpr auto floorSpeedPos = 2; constexpr auto incDelayPos = 3; constexpr auto decIntervalPos = 4; -constexpr auto fanListPos = 5; -constexpr auto setSpeedEventsPos = 6; +constexpr auto handlerPos = 5; +constexpr auto fanListPos = 6; +constexpr auto setSpeedEventsPos = 7; using ZoneDefinition = std::tuple<size_t, uint64_t, uint64_t, size_t, size_t, + std::vector<ZoneHandler>, std::vector<FanDefinition>, std::vector<SetSpeedEvent>>; |