Support more PSU Sensors
Base on PSU power sensors, support all other PSU sensors.
Tested By:
After run psusensor in BMC console, in xyz.openbmc_project.PSUSensor
PSU power, current, temperature, voltage and fan dbus interface has
been created with correct Thresholds and value.
Run ipmitool -I lanplus -H xxx -U root -P xxx sensor list, bellow
sensors can show as:
PSU2 Input Curre | 0.546 | Amps | ok | na | na | na | 8.190 | na | na
PSU2 Output Curr | 9.000 | Amps | ok | na | na | na | 100.000 | 125.000 | na
PSU2 Fan Speed 1 | 3332.000 | RPM | ok | na | na | na | na | na | na
PSU2 Input Power | 117.000 | Watts | ok | na | na | na | 1357.200 | 1509.300 | na
PSU2 Output Powe | 105.300 | Watts | ok | na | na | na | na | na | na
PSU2 Temperature | 26.000 | degrees C | ok | na | na | na | 62.000 | 65.000 | na
PSU2 Input Volta | 235.000 | Volts | ok | na | na | na | na | na | na
Change-Id: I2167594a8f369c8ed95b3dc3948f8f5b0bd8bdbb
Signed-off-by: Cheng C Yang <cheng.c.yang@linux.intel.com>
diff --git a/include/PSUSensor.hpp b/include/PSUSensor.hpp
index 8de480f..0c4edb1 100644
--- a/include/PSUSensor.hpp
+++ b/include/PSUSensor.hpp
@@ -4,14 +4,6 @@
#include <sdbusplus/asio/object_server.hpp>
#include <sensor.hpp>
-enum class SensorType
-{
- tempSensor,
- currSensor,
- powerSensor,
- voltSensor
-};
-
class PSUSensor : public Sensor
{
public:
@@ -44,13 +36,13 @@
{
public:
PSUProperty(std::string name, double max, double min, unsigned int factor) :
- sensorTypeName(name), maxReading(max), minReading(min),
+ labelTypeName(name), maxReading(max), minReading(min),
sensorScaleFactor(factor)
{
}
~PSUProperty() = default;
- std::string sensorTypeName;
+ std::string labelTypeName;
double maxReading;
double minReading;
unsigned int sensorScaleFactor;