diff options
author | Matthew Barth <msbarth@us.ibm.com> | 2017-05-31 13:45:36 -0500 |
---|---|---|
committer | Matthew Barth <msbarth@us.ibm.com> | 2017-06-05 09:19:18 -0500 |
commit | 34f1bda245818e659f4af44361c81f21dba09b76 (patch) | |
tree | 8e6ed6896a672e5e5739612819b6bea776de42d2 /control/gen-fan-zone-defs.py | |
parent | df3e8d67fd8afb78105f516eac360d0a7d44326f (diff) | |
download | phosphor-fan-presence-34f1bda245818e659f4af44361c81f21dba09b76.tar.gz phosphor-fan-presence-34f1bda245818e659f4af44361c81f21dba09b76.zip |
Use updated match methods for signal callbacks
Attach the event handler callback function to the match along with
generating the match string using the new match methods
Change-Id: I7595d65cbc615f29db60e2a65534ee5b635d6f96
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'control/gen-fan-zone-defs.py')
-rwxr-xr-x | control/gen-fan-zone-defs.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/control/gen-fan-zone-defs.py b/control/gen-fan-zone-defs.py index f537716..76f4c6c 100755 --- a/control/gen-fan-zone-defs.py +++ b/control/gen-fan-zone-defs.py @@ -13,12 +13,14 @@ from mako.template import Template #Note: Condition is a TODO (openbmc/openbmc#1500) tmpl = '''/* This is a generated file. */ +#include <sdbusplus/bus.hpp> #include "manager.hpp" #include "functor.hpp" #include "actions.hpp" #include "handlers.hpp" using namespace phosphor::fan::control; +using namespace sdbusplus::bus::match::rules; const unsigned int Manager::_powerOnDelay{${mgr_data['power_on_delay']}}; @@ -68,10 +70,11 @@ const std::vector<ZoneGroup> Manager::_zoneLayouts std::vector<PropertyChange>{ %for s in event['signal']: PropertyChange{ - "interface='org.freedesktop.DBus.Properties'," - "member='PropertiesChanged'," - "type='signal'," - "path='${s['path']}'", + interface("org.freedesktop.DBus.Properties") + + member("PropertiesChanged") + + type::signal() + + path("${s['path']}") + + arg0namespace("${s['interface']}"), make_handler(propertySignal<${s['type']}>( "${s['interface']}", "${s['property']}", |