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/test/zone_mock.hpp b/test/zone_mock.hpp
index a5f105b..885a2c4 100644
--- a/test/zone_mock.hpp
+++ b/test/zone_mock.hpp
@@ -3,6 +3,7 @@
#include "pid/zone_interface.hpp"
#include <string>
+#include <vector>
#include <gmock/gmock.h>
@@ -49,6 +50,7 @@
MOCK_CONST_METHOD0(getAccSetPoint, bool());
MOCK_METHOD1(getSensor, Sensor*(const std::string&));
+ MOCK_METHOD0(getSensorNames, std::vector<std::string>());
MOCK_METHOD0(initializeLog, void());
MOCK_METHOD1(writeLog, void(const std::string&));