PEL: peltool: Print all PELs into JSON array

Added -a option to display all PELS at once into a JSON array.

Read message registry once to parse SRC sections in PELs.

Signed-off-by: Harisuddin Mohamed Isa <harisuddin@gmail.com>
Change-Id: I19690a866a3348cf2d8a9a89be38bc09e3eb7f9f
diff --git a/extensions/openpower-pels/pel.hpp b/extensions/openpower-pels/pel.hpp
index 5f14354..0475c1c 100644
--- a/extensions/openpower-pels/pel.hpp
+++ b/extensions/openpower-pels/pel.hpp
@@ -223,8 +223,9 @@
 
     /**
      * @brief Output a PEL in JSON.
+     * @param[in] registry - Registry object reference
      */
-    void toJSON() const;
+    void toJSON(message::Registry& registry) const;
 
     /**
      * @brief Sets the host transmission state in the User Header
@@ -321,9 +322,11 @@
      * @param[in] std::string - PEL string
      * @param[in|out] pluralSections - Map used to track sections counts for
      *                                 when there is more than 1.
+     * @param[in] registry - Registry object reference
      */
     void printSectionInJSON(const Section& section, std::string& buf,
-                            std::map<uint16_t, size_t>& pluralSections) const;
+                            std::map<uint16_t, size_t>& pluralSections,
+                            message::Registry& registry) const;
 
     /**
      * @brief The maximum size a PEL can be in bytes.