PEL: PELTool Application

PELTooL application would be used to interact with PELs. This commit has
the first functionality, where a PEL file is passed and all PEL sections
are hexdumped in a JSON object.

Signed-off-by: Aatir <aatrapps@gmail.com>
Change-Id: I155d75bb58cbd14a297b094314f7fd1f271f4f37
diff --git a/extensions/openpower-pels/pel.hpp b/extensions/openpower-pels/pel.hpp
index 3d1318f..3498ae6 100644
--- a/extensions/openpower-pels/pel.hpp
+++ b/extensions/openpower-pels/pel.hpp
@@ -214,6 +214,11 @@
      */
     void assignID();
 
+    /**
+     * @brief Output a PEL in JSON.
+     */
+    void toJSON();
+
   private:
     /**
      * @brief Builds the section objects from a PEL data buffer
@@ -248,6 +253,13 @@
      * @brief Holds all sections by the PH and UH.
      */
     std::vector<std::unique_ptr<Section>> _optionalSections;
+
+    /**
+     * @brief helper function for printing PELs.
+     * @param[in] Section& - section object reference
+     * @param[in] std::string - PEL string
+     */
+    void printSectionInJSON(Section& section, std::string& buf) const;
 };
 
 namespace util