diff options
author | Matthew Barth <msbarth@us.ibm.com> | 2017-09-26 09:15:56 -0500 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2017-11-17 15:43:28 +0000 |
commit | 336f18a541e93e2cc1719180df73ef8b357c962f (patch) | |
tree | e0edf72beb42a9c7a7a6ce9e46b768d1b7fcfffd /control/gen-fan-zone-defs.py | |
parent | 6088558429fbe5f723783b4220b6ac1c9096cde9 (diff) | |
download | phosphor-fan-presence-336f18a541e93e2cc1719180df73ef8b357c962f.tar.gz phosphor-fan-presence-336f18a541e93e2cc1719180df73ef8b357c962f.zip |
Update event initialization
Using a null dbus message to the event signal will perform the necessary
steps to initialize the event parameters using the given signal
handler's function directly.
i.e.) In the case for subscribing to PropertiesChanged signals,
initially the given property must be read. When the PropertiesChanged
signal struct is given a null message, it finds the property, reads the
value, and then can perform the given signal handler function directly.
This produces the same functional path as receiving a PropertiesChanged
signal containing the property value within the message.
Change-Id: I35575cfff66eb0305156be786cb1f5536d42bb1c
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 | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/control/gen-fan-zone-defs.py b/control/gen-fan-zone-defs.py index 6d04bbd..061c314 100755 --- a/control/gen-fan-zone-defs.py +++ b/control/gen-fan-zone-defs.py @@ -11,11 +11,11 @@ import yaml from argparse import ArgumentParser from mako.template import Template -tmpl = ''' +tmpl = '''\ <%! def indent(str, depth): return ''.join(4*' '*depth+line for line in str.splitlines(True)) -%> +%>\ <%def name="genSSE(event)" buffered="True"> Group{ %for member in event['group']: @@ -49,7 +49,7 @@ Timer{ std::vector<Signal>{ %for s in event['signals']: Signal{ - ${s['match']}( + match::${s['match']}( %for i, mp in enumerate(s['mparams']): %if (i+1) != len(s['mparams']): "${mp}", @@ -79,17 +79,16 @@ std::vector<Signal>{ }, %endfor } -</%def> +</%def>\ /* This is a generated file. */ -#include <sdbusplus/bus.hpp> #include "manager.hpp" #include "functor.hpp" #include "actions.hpp" #include "handlers.hpp" #include "preconditions.hpp" +#include "matches.hpp" using namespace phosphor::fan::control; -using namespace sdbusplus::bus::match::rules; const unsigned int Manager::_powerOnDelay{${mgr_data['power_on_delay']}}; @@ -200,7 +199,7 @@ const std::vector<ZoneGroup> Manager::_zoneLayouts std::vector<Signal>{ %for s in event['pc']['pcsigs']: Signal{ - ${s['match']}( + match::${s['match']}( %for i, mp in enumerate(s['mparams']): %if (i+1) != len(s['mparams']): "${mp}", |