Add signal based update
update sensors whenever there is a update in parameter
dbus sensor. This will register a signal for each dbus
sensor parameter and will calculate new value is there
is a change in any param sensor value.
Signed-off-by: Vijay Khemka <vijaykhemka@fb.com>
Change-Id: I164bbb32eea6f29a2378119cdf3ac07492758b09
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/virtualSensor.hpp b/virtualSensor.hpp
index 0e000e9..c8fd04c 100644
--- a/virtualSensor.hpp
+++ b/virtualSensor.hpp
@@ -51,9 +51,10 @@
*
* @param[in] bus - Handle to system dbus
* @param[in] path - The Dbus path of sensor
+ * @param[in] ctx - sensor context for update
*/
- SensorParam(sdbusplus::bus::bus& bus, std::string path) :
- dbusSensor(std::make_unique<DbusSensor>(bus, path)),
+ SensorParam(sdbusplus::bus::bus& bus, std::string path, void* ctx) :
+ dbusSensor(std::make_unique<DbusSensor>(bus, path, ctx)),
paramType(dbusParam)
{}