regulators: Add monitorSensors support to Device
Implemented the monitorSensors() method in the Device class. This method
reads the sensors for the voltage rails produced by the device.
Signed-off-by: Bob King <Bob_King@wistron.com>
Change-Id: I5ca48ba8d6ab2019c1840f3905d9603233b1881a
diff --git a/phosphor-regulators/src/device.cpp b/phosphor-regulators/src/device.cpp
index b1a136b..fd07d71 100644
--- a/phosphor-regulators/src/device.cpp
+++ b/phosphor-regulators/src/device.cpp
@@ -73,4 +73,14 @@
}
}
+void Device::monitorSensors(System& system, Chassis& chassis)
+{
+
+ // Monitor sensors in each rail
+ for (std::unique_ptr<Rail>& rail : rails)
+ {
+ rail->monitorSensors(system, chassis, *this);
+ }
+}
+
} // namespace phosphor::power::regulators