pseq: Find and parse configuaration file

Use the compatible systems information from entity manager to find the
correct system specific configuration file.  Then parse the rail and pin
data from the configuration file.

Signed-off-by: Jim Wright <jlwright@us.ibm.com>
Change-Id: Ie7a13bece9c6cc1246cca733e2275b084bac95c8
diff --git a/phosphor-power-sequencer/src/ucd90320_monitor.hpp b/phosphor-power-sequencer/src/ucd90320_monitor.hpp
index ce6af97..d7b66ad 100644
--- a/phosphor-power-sequencer/src/ucd90320_monitor.hpp
+++ b/phosphor-power-sequencer/src/ucd90320_monitor.hpp
@@ -6,9 +6,18 @@
 #include <sdbusplus/bus.hpp>
 #include <sdbusplus/bus/match.hpp>
 
+#include <filesystem>
+#include <vector>
+
 namespace phosphor::power::sequencer
 {
 
+struct Pin
+{
+    std::string name;
+    int line;
+};
+
 /**
  * @class UCD90320Monitor
  * This class implements fault analysis for the UCD90320
@@ -51,16 +60,42 @@
     sdbusplus::bus::match_t match;
 
     /**
+     * List of pins
+     */
+    std::vector<Pin> pins;
+
+    /**
      * The read/write interface to this hardware
      */
     pmbus::PMBus pmbusInterface;
 
     /**
+     * List of rail names
+     */
+    std::vector<std::string> rails;
+
+    /**
      * Finds the list of compatible system types using D-Bus methods.
      * This list is used to find the correct JSON configuration file for the
      * current system.
      */
     void findCompatibleSystemTypes();
+
+    /**
+     * Finds the JSON configuration file.
+     * Looks for a configuration file based on the list of compatible system
+     * types.
+     * Throws an exception if an operating system error occurs while checking
+     * for the existance of a file.
+     * @param[in] compatibleSystemTypes List of compatible system types
+     */
+    void findConfigFile(const std::vector<std::string>& compatibleSystemTypes);
+
+    /**
+     * Parse the JSON configuration file.
+     * @param[in] pathName the path name
+     */
+    void parseConfigFile(const std::filesystem::path& pathName);
 };
 
 } // namespace phosphor::power::sequencer