Add in support for power supply fan fault

If the FAN FAULT OR WARN bit in the STATUS_WORD turns on, log an error
calling out the power supply, include the contents from STATUS_WORD,
MFR_SPECIFIC, STATUS_TEMPERATURE, and STATUS_FANS_1_2 in the metadata.

Change-Id: Ic9261cf08517344f594a4616a91dbec47bb07d7e
Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
diff --git a/power-supply/power_supply.hpp b/power-supply/power_supply.hpp
index 98c4c0b..a3cea2d 100644
--- a/power-supply/power_supply.hpp
+++ b/power-supply/power_supply.hpp
@@ -155,6 +155,11 @@
         bool outputOVFault = false;
 
         /**
+         * @brief Set to true when a fan fault or warning condition is detected
+         */
+        bool fanFault = false;
+
+        /**
          * @brief Callback for inventory property changes
          *
          * Process change of Present property for power supply.
@@ -225,6 +230,16 @@
          */
         void checkOutputOvervoltageFault(const uint16_t statusWord);
 
+        /**
+         * @brief Checks for a fan fault or warning condition.
+         *
+         * The high byte of STATUS_WORD is checked to see if the "FAN FAULT OR
+         * WARNING" bit is turned on. If it is on, log an error.
+         *
+         * @param[in] statusWord - 2 byte STATUS_WORD value read from sysfs
+         */
+        void checkFanFault(const uint16_t statusWord);
+
 };
 
 }