UpdateVirtualSensor uses information from signals
UpdateVirtualSensor uses information obtained from signals to avoid
extensive dbus queries.
Tested:
1:Execute DBus cmd to see if VirtualSensor can correctly obtain the
value of DbusSensor
busctl tree xyz.openbmc_project.VirtualSensor
busctl introspect xyz.openbmc_project.VirtualSensor xxx
2:Waiting for the value change of DbusSensor,Check if the value of
the virtual sensor has changed after the dbusSensor changes.
Fixes openbmc/phosphor-virtual-sensor#1
Change-Id: If11f9017b31ce5cf06f910a38c65637c55d74b24
Signed-off-by: Tao Lin <lintao.lc@ieisystem.com>
diff --git a/thresholds.hpp b/thresholds.hpp
index be238a1..114138f 100644
--- a/thresholds.hpp
+++ b/thresholds.hpp
@@ -1,12 +1,16 @@
#pragma once
+#include "dbusUtils.hpp"
+
#include <xyz/openbmc_project/Sensor/Threshold/Critical/server.hpp>
#include <xyz/openbmc_project/Sensor/Threshold/HardShutdown/server.hpp>
#include <xyz/openbmc_project/Sensor/Threshold/PerformanceLoss/server.hpp>
#include <xyz/openbmc_project/Sensor/Threshold/SoftShutdown/server.hpp>
#include <xyz/openbmc_project/Sensor/Threshold/Warning/server.hpp>
-namespace phosphor::virtualSensor
+const constexpr char* entityManagerBusName =
+ "xyz.openbmc_project.EntityManager";
+namespace phosphor::virtual_sensor
{
template <typename... T>
@@ -447,4 +451,4 @@
}
};
-} // namespace phosphor::virtualSensor
+} // namespace phosphor::virtual_sensor