Add failsafe logger for zones
Tested:
...
Nov 23 21:40:06 tmddp10-nfd01.prod.google.com swampd[4893]:
Zone `0` is in failsafe mode.
With update at `fleeting0`: The sensor has bad readings.
Nov 23 21:40:06 tmddp10-nfd01.prod.google.com swampd[4893]:
Zone `1` is in failsafe mode.
With update at `fleeting1`: The sensor has bad readings.
Nov 23 21:40:06 tmddp10-nfd01.prod.google.com swampd[4893]:
Zone `1` leaves failsafe mode.
With update at `hotswap_in_Input_Power`: The sensor has recovered.
Nov 23 21:40:06 tmddp10-nfd01.prod.google.com swampd[4893]:
Zone `0` leaves failsafe mode.
With update at `hotswap_in_Input_Power`: The sensor has recovered.
...
Change-Id: I2c296addb7ad117c03c04a27de91204796cda036
Signed-off-by: James Zheng <alphetis@google.com>
diff --git a/pid/zone_interface.hpp b/pid/zone_interface.hpp
index 34a5352..33f0a6f 100644
--- a/pid/zone_interface.hpp
+++ b/pid/zone_interface.hpp
@@ -27,6 +27,9 @@
/** Return a pointer to the sensor specified by name. */
virtual Sensor* getSensor(const std::string& name) = 0;
+ /** Return the list of sensor names in the zone. */
+ virtual std::vector<std::string> getSensorNames(void) = 0;
+
/* updateFanTelemetry() and updateSensors() both clear the failsafe state
* for a sensor if it's no longer in that state.
*/