PEL: Make PEL::flatten() const

This includes making the flatten() method const in the PEL section base
class and in all of its derived classes.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I6be787962c6d7dfa01bdced2f9024564e6ac1b08
diff --git a/extensions/openpower-pels/pel.hpp b/extensions/openpower-pels/pel.hpp
index 4cdbd1d..49b1d55 100644
--- a/extensions/openpower-pels/pel.hpp
+++ b/extensions/openpower-pels/pel.hpp
@@ -195,7 +195,7 @@
      *
      * @return std::vector<uint8_t> - the raw PEL data
      */
-    std::vector<uint8_t> data();
+    std::vector<uint8_t> data() const;
 
     /**
      * @brief Says if the PEL is valid (the sections are all valid)
@@ -217,7 +217,7 @@
     /**
      * @brief Output a PEL in JSON.
      */
-    void toJSON();
+    void toJSON() const;
 
   private:
     /**
@@ -237,7 +237,7 @@
      *
      * @param[out] pelBuffer - What the data will be written to
      */
-    void flatten(std::vector<uint8_t>& pelBuffer);
+    void flatten(std::vector<uint8_t>& pelBuffer) const;
 
     /**
      * @brief Check that the PEL fields that need to be in agreement
@@ -265,7 +265,7 @@
      * @param[in] Section& - section object reference
      * @param[in] std::string - PEL string
      */
-    void printSectionInJSON(Section& section, std::string& buf) const;
+    void printSectionInJSON(const Section& section, std::string& buf) const;
 };
 
 namespace util