Add new PID Class types "power" and "powersum"
Implements this feature:
https://github.com/openbmc/phosphor-pid-control/issues/24
In addition to the existing "temp" and "margin" classes, adding
new "power" and "powersum" Class types.
The "power" class is the same as "temp", but expects D-Bus power
sensors, instead of D-Bus temperature sensors.
The "powersum" class is the same as "power", but sums together all of
the given inputs, instead of finding the maximum.
Signed-off-by: Josh Lehan <krellan@google.com>
Change-Id: I11d8ad8385632658ed061671134be87a560cd02a
diff --git a/test/dbus_util_unittest.cpp b/test/dbus_util_unittest.cpp
index 4896e03..09d1b5c 100644
--- a/test/dbus_util_unittest.cpp
+++ b/test/dbus_util_unittest.cpp
@@ -40,7 +40,11 @@
std::make_tuple("margin", "9",
"/xyz/openbmc_project/sensors/temperature/9"),
std::make_tuple("temp", "123",
- "/xyz/openbmc_project/sensors/temperature/123")));
+ "/xyz/openbmc_project/sensors/temperature/123"),
+ std::make_tuple("power", "9000",
+ "/xyz/openbmc_project/sensors/power/9000"),
+ std::make_tuple("powersum", "total",
+ "/xyz/openbmc_project/sensors/power/total")));
class FindSensorsTest : public ::testing::Test
{