regulators: Add detectPhaseFaults() to Device
Add a detectPhaseFaults() method to the Device class. This method
executes the PhaseFaultDetection data member added in a previous commit.
Add a gtest test case to exercise the new code.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: Ie8a2bf7d1b60ebc29c256e8563e3e4808bb6a20e
diff --git a/phosphor-regulators/src/device.hpp b/phosphor-regulators/src/device.hpp
index a8f35b6..c45f330 100644
--- a/phosphor-regulators/src/device.hpp
+++ b/phosphor-regulators/src/device.hpp
@@ -134,6 +134,20 @@
void configure(Services& services, System& system, Chassis& chassis);
/**
+ * Detect redundant phase faults in this device.
+ *
+ * Does nothing if phase fault detection is not defined for this device.
+ *
+ * This method should be called every 15 seconds.
+ *
+ * @param services system services like error logging and the journal
+ * @param system system that contains the chassis
+ * @param chassis chassis that contains the device
+ */
+ void detectPhaseFaults(Services& services, System& system,
+ Chassis& chassis);
+
+ /**
* Returns the configuration changes to apply to this device, if any.
*
* @return Pointer to Configuration object. Will equal nullptr if no