diff options
author | Matthew Barth <msbarth@us.ibm.com> | 2017-07-28 13:43:04 -0500 |
---|---|---|
committer | Matthew Barth <msbarth@us.ibm.com> | 2017-08-04 13:03:13 -0500 |
commit | ccc7770ecd6b758fcef98ce9e7cd585af3f3c77f (patch) | |
tree | f0199ba8f9d5e560ea3e95f7c9a99a9b98488cfe /control/types.hpp | |
parent | 771659fcd288e40eda8fb80fe04f32b5d18d3599 (diff) | |
download | phosphor-fan-presence-ccc7770ecd6b758fcef98ce9e7cd585af3f3c77f.tar.gz phosphor-fan-presence-ccc7770ecd6b758fcef98ce9e7cd585af3f3c77f.zip |
Initial updates to support preconditions
Any defined preconditions for a set speed event must be satisfied prior
to configuring the event parameters for fan control. These preconditions
will accept a list of group entries that include the value the group's
property must be to have the precondition met for that group. Once all
preconditions are met, the set speed event will be initialized and
become active.
Change-Id: Ia5555be55c5937c891af527bea63da1546655b2f
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'control/types.hpp')
-rw-r--r-- | control/types.hpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/control/types.hpp b/control/types.hpp index b6a031f..d45226f 100644 --- a/control/types.hpp +++ b/control/types.hpp @@ -42,6 +42,15 @@ using Handler = std::function<void(sdbusplus::bus::bus&, Zone&)>; using Action = std::function<void(Zone&, const Group&)>; +constexpr auto pcPathPos = 0; +constexpr auto pcIntfPos = 1; +constexpr auto pcPropPos = 2; +constexpr auto pcValuePos = 3; +using PrecondGroup = std::tuple<std::string, + std::string, + std::string, + PropertyVariantType>; + constexpr auto signaturePos = 0; constexpr auto handlerObjPos = 1; using PropertyChange = std::tuple<std::string, Handler>; @@ -49,7 +58,9 @@ using PropertyChange = std::tuple<std::string, Handler>; constexpr auto groupPos = 0; constexpr auto actionPos = 1; constexpr auto propChangeListPos = 2; -using SetSpeedEvent = std::tuple<Group, Action, std::vector<PropertyChange>>; +using SetSpeedEvent = std::tuple<Group, + Action, + std::vector<PropertyChange>>; constexpr auto eventGroupPos = 0; constexpr auto eventHandlerPos = 1; |