Link watches to callbacks
Callbacks must ultimately be triggered when a property
is updated by a watch. Add that support.
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Change-Id: I20130a11c19ddcf2c4ae45800f2068b31950bcd6
diff --git a/src/templates/generated.mako.hpp b/src/templates/generated.mako.hpp
index a4819e2..15835bf 100644
--- a/src/templates/generated.mako.hpp
+++ b/src/templates/generated.mako.hpp
@@ -188,7 +188,12 @@
{
% for w in watches:
std::make_unique<PropertyWatchOfType<${w.datatype}, SDBusPlus>>(
+ % if w.callback is None:
ConfigPropertyIndicies::get()[${w.instances}]),
+ % else:
+ ConfigPropertyIndicies::get()[${w.instances}],
+ *ConfigPropertyCallbacks::get()[${w.callback}]),
+ % endif
% endfor
};
return propertyWatches;