Update analyze function to check STATUS_WORD

The STATUS_WORD PMBus command response will be the start of the power
supply fault analysis. Update the analyze() function to read its value
and process (select) fault bits.

Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
Change-Id: If7274ad237c0604a56008676ae64804a5fd2854e
diff --git a/phosphor-power-supply/util_base.hpp b/phosphor-power-supply/util_base.hpp
new file mode 100644
index 0000000..ab1a962
--- /dev/null
+++ b/phosphor-power-supply/util_base.hpp
@@ -0,0 +1,30 @@
+#pragma once
+
+#include "types.hpp"
+
+#include <sdbusplus/bus/match.hpp>
+
+namespace phosphor::power::psu
+{
+
+/**
+ * @class UtilBase
+ * A base class to allow for mocking certain utility functions.
+ */
+class UtilBase
+{
+  public:
+    virtual ~UtilBase() = default;
+
+    virtual bool getPresence(sdbusplus::bus::bus& bus,
+                             const std::string& invpath) const = 0;
+};
+
+const UtilBase& getUtils();
+
+inline bool getPresence(sdbusplus::bus::bus& bus, const std::string& invpath)
+{
+    return getUtils().getPresence(bus, invpath);
+}
+
+} // namespace phosphor::power::psu