PEL: New repository method to get PEL data

Add the getPELData() function on the Repository class to return
PEL data based on a PEL ID or OBMC event log ID.

The intended use for this will be a D-Bus method, mainly used for
debug via the REST interface, to get the PEL data off the BMC when
only the OpenBMC event log ID is known, which will be the case until
the Redfish APIs are ready.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ia1d8bff627992fae16be9136f2814f01ea69009e
diff --git a/extensions/openpower-pels/repository.hpp b/extensions/openpower-pels/repository.hpp
index 289541c..d153400 100644
--- a/extensions/openpower-pels/repository.hpp
+++ b/extensions/openpower-pels/repository.hpp
@@ -136,6 +136,18 @@
         return findPEL(id) != _idsToPELs.end();
     }
 
+    /**
+     * @brief Returns the PEL data based on its ID.
+     *
+     * If the data can't be found for that ID, then the optional object
+     * will be empty.
+     *
+     * @param[in] id - the LogID to get the PEL for, which can be either a
+     *                 PEL ID or OpenBMC log ID.
+     * @return std::optional<std::vector<uint8_t>> - the PEL data
+     */
+    std::optional<std::vector<uint8_t>> getPELData(const LogID& id);
+
   private:
     /**
      * @brief Finds an entry in the _idsToPELs map.