Add function to convert from linear format

The average and maximum power values are returned from the
power supply in Watts specified in linear format.  The values
must be converted from linear format to be useful.  The value
will be converted to an integer, keeping the units as Watts.

Linear format is a 16 bit value made up of 5 bits of exponent
followed by 11 bits of mantissa, where the value is:
   X = mantissa * 2^exponent

These values are specified as two's complement, and technically
may be negative, though there isn't really a reason for a power
supply to specify negative power values.  The code will support
them anyway for completeness, and to be helpful to future code
that may need to for sure.

Change-Id: I2cde529ed4355e173c8a3ecff2865f2c350ad61e
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/power-supply/record_manager.hpp b/power-supply/record_manager.hpp
index fe35db0..09b55f9 100644
--- a/power-supply/record_manager.hpp
+++ b/power-supply/record_manager.hpp
@@ -73,6 +73,19 @@
         }
 
         /**
+         * @brief Converts a Linear Format power number to an integer
+         *
+         * The PMBus spec describes a 2 byte Linear Format
+         * number that is composed of an exponent and mantissa
+         * in two's complement notation.
+         *
+         * Value = Mantissa * 2**Exponent
+         *
+         * @return int64_t the converted value
+         */
+        static int64_t linearToInteger(uint16_t data);
+
+        /**
          * @brief Returns the number of records
          *
          * @return size_t - the number of records