print zone failsafe reason when enter failsafe mode
Tested:
```
Jun 24 01:52:45 bmc sel-logger[640]: cpu0_nbm critical high threshold assert. Reading=49.000000 Threshold=45.000000.
Jun 24 01:52:46 bmc swampd[2944]: Zone 2 fans, entering failsafe mode, output pwm: 100
Jun 24 01:52:46 bmc swampd[2944]: Fail sensor: cpu0_nbm, reason: Sensor threshold asserted
Jun 24 01:52:46 bmc swampd[2944]: Zone 0 fans, entering failsafe mode, output pwm: 100
Jun 24 01:52:46 bmc swampd[2944]: Fail sensor: cpu0_nbm, reason: Sensor threshold asserted
```
Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com>
Change-Id: I607d01b6bed11b00a40153db6521a9c9d23da519
diff --git a/pid/zone_interface.hpp b/pid/zone_interface.hpp
index 33f0a6f..808b80f 100644
--- a/pid/zone_interface.hpp
+++ b/pid/zone_interface.hpp
@@ -2,6 +2,7 @@
#include "sensors/sensor.hpp"
+#include <map>
#include <string>
namespace pid_control
@@ -93,6 +94,10 @@
*/
virtual double getFailSafePercent() = 0;
+ /** Return failsafe sensor list */
+ virtual std::map<std::string, std::pair<std::string, double>>
+ getFailSafeSensors() const = 0;
+
/** Return the zone's cycle time settings */
virtual uint64_t getCycleIntervalTime(void) const = 0;
virtual uint64_t getUpdateThermalsCycle(void) const = 0;