ipmbsensor: simplify reading
In reality there are only 4 reading types, no reason
to seperate this out by device type. Simplify it.
Also update PXE VR to use standard READ_TEMP pmbus
command.
Tested: Readings were the same
Change-Id: I707fa0d75c388bf757ad95140361ddb10ad00bd4
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/include/IpmbSensor.hpp b/include/IpmbSensor.hpp
index 564a070..3d78bfa 100644
--- a/include/IpmbSensor.hpp
+++ b/include/IpmbSensor.hpp
@@ -29,6 +29,14 @@
util
};
+enum class ReadingFormat
+{
+ byte0,
+ byte3,
+ elevenBit,
+ elevenBitShift,
+};
+
struct IpmbSensor : public Sensor
{
IpmbSensor(std::shared_ptr<sdbusplus::asio::connection>& conn,
@@ -45,6 +53,7 @@
void loadDefaults(void);
void runInitCmd(void);
void processError(void);
+ double processReading(const std::vector<uint8_t>& data);
IpmbType type;
IpmbSubType subType;
@@ -61,6 +70,7 @@
// to date all ipmb sensors are power on only
PowerState readState;
+ ReadingFormat readingFormat;
private:
sdbusplus::asio::object_server& objectServer;