From 336f18a541e93e2cc1719180df73ef8b357c962f Mon Sep 17 00:00:00 2001 From: Matthew Barth Date: Tue, 26 Sep 2017 09:15:56 -0500 Subject: 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 --- control/gen-fan-zone-defs.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'control/gen-fan-zone-defs.py') 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{ %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{ }, %endfor } - +\ /* This is a generated file. */ -#include #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 Manager::_zoneLayouts std::vector{ %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}", -- cgit v1.2.1