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/pid/zone.hpp b/pid/zone.hpp
index 01dc62e..c73ad39 100644
--- a/pid/zone.hpp
+++ b/pid/zone.hpp
@@ -61,13 +61,13 @@
bool getFailSafeMode(void) const override;
int64_t getZoneID(void) const;
- void addSetPoint(double setpoint) override;
+ void addSetPoint(double setPoint, const std::string& name) override;
double getMaxSetPointRequest(void) const override;
void addRPMCeiling(double ceiling) override;
void clearSetPoints(void) override;
void clearRPMCeilings(void) override;
double getFailSafePercent(void) const override;
- double getMinThermalSetpoint(void) const;
+ double getMinThermalSetPoint(void) const;
Sensor* getSensor(const std::string& name) override;
void determineMaxSetPointRequest(void) override;
@@ -98,6 +98,8 @@
const int64_t _zoneId;
double _maximumSetPoint = 0;
+ std::string _maximumSetPointName;
+ std::string _maximumSetPointNamePrev;
bool _manualMode = false;
bool _redundantWrite = false;
const double _minThermalOutputSetPt;