For each zone log sensor name with max setpoint
Add sensor name that has the maximum setpoint for a PID zone.
Log a debug message when the sensor is changed.
The name is also added to the log file for each log record.
Tested:
Override one CPU temperature sensor
busctl set-property xyz.openbmc_project.CPUSensor /xyz/openbmc_project/sensors/temperature/DTS_CPU1 xyz.openbmc_project.Sensor.Value Value d 82
Observed log message:
swampd[443]: PID Zone 0 max SetPoint 34.5546 requested by DTS_CPU1
Signed-off-by: Nirav Shah <nirav.j2.shah@intel.com>
Signed-off-by: Zhikui Ren <zhikui.ren@intel.com>
Change-Id: Ifc12cb9a106da1bf41dd35697210f74ba1b589db
diff --git a/test/pid_stepwisecontroller_unittest.cpp b/test/pid_stepwisecontroller_unittest.cpp
index d9a7728..a832ed7 100644
--- a/test/pid_stepwisecontroller_unittest.cpp
+++ b/test/pid_stepwisecontroller_unittest.cpp
@@ -44,8 +44,8 @@
.WillOnce(Return(31.0)) // return 40
.WillOnce(Return(32.0)); // return 60
- EXPECT_CALL(z, addSetPoint(40.0)).Times(2);
- EXPECT_CALL(z, addSetPoint(60.0)).Times(1);
+ EXPECT_CALL(z, addSetPoint(40.0, "foo")).Times(2);
+ EXPECT_CALL(z, addSetPoint(60.0, "foo")).Times(1);
for (int ii = 0; ii < 3; ii++)
{
@@ -80,8 +80,8 @@
.WillOnce(Return(27.0)) // return 60
.WillOnce(Return(26.0)); // return 40
- EXPECT_CALL(z, addSetPoint(40.0)).Times(1);
- EXPECT_CALL(z, addSetPoint(60.0)).Times(2);
+ EXPECT_CALL(z, addSetPoint(40.0, "foo")).Times(1);
+ EXPECT_CALL(z, addSetPoint(60.0, "foo")).Times(2);
for (int ii = 0; ii < 3; ii++)
{