diff options
author | Matthew Barth <msbarth@us.ibm.com> | 2017-05-11 14:12:27 -0500 |
---|---|---|
committer | Matthew Barth <msbarth@us.ibm.com> | 2017-05-31 10:48:10 -0500 |
commit | 38a93a8aa2feea7f4e785db6b4ff6d9e81f6020d (patch) | |
tree | 93131bf528c712fd9c95c353a23db9ab365d59c1 /control/types.hpp | |
parent | 06bae85443fdb1e5e9540280a7aeac2f36ffaa7b (diff) | |
download | phosphor-fan-presence-38a93a8aa2feea7f4e785db6b4ff6d9e81f6020d.tar.gz phosphor-fan-presence-38a93a8aa2feea7f4e785db6b4ff6d9e81f6020d.zip |
Add property changed signal handler
Enable the control application to handle property changed signals to set
or update a cached set of these properties
Change-Id: Ib84ffe1e801ee7dd85d17fdbb122d124d307dbd3
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'control/types.hpp')
-rw-r--r-- | control/types.hpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/control/types.hpp b/control/types.hpp index e4c3725..bbbac61 100644 --- a/control/types.hpp +++ b/control/types.hpp @@ -10,6 +10,8 @@ namespace fan namespace control { +class Zone; + //Placeholder. Conditions are completely TBD. using Condition = bool; @@ -17,12 +19,26 @@ constexpr auto fanNamePos = 0; constexpr auto sensorListPos = 1; using FanDefinition = std::tuple<std::string, std::vector<std::string>>; +using Handler = std::function<void(sdbusplus::bus::bus&, + sdbusplus::message::message&, + Zone&)>; + +constexpr auto signaturePos = 0; +constexpr auto handlerObjPos = 1; +using PropertyChange = std::tuple<std::string, Handler>; +using SetSpeedEvent = std::vector<PropertyChange>; + +constexpr auto zoneObjPos = 0; +using SignalEvent = std::tuple<Zone*, Handler>; + constexpr auto zoneNumPos = 0; constexpr auto fullSpeedPos = 1; constexpr auto fanListPos = 2; +constexpr auto setSpeedEventsPos = 3; using ZoneDefinition = std::tuple<size_t, unsigned int, - std::vector<FanDefinition>>; + std::vector<FanDefinition>, + std::vector<SetSpeedEvent>>; constexpr auto conditionListPos = 0; constexpr auto zoneListPos = 1; |