PEL: Create a PEL that takes parameters for test

Make a pelFactory() function that unit tests can use where the caller
can specify the following attributes:
  * ID (PLID also set to this. BMC log ID = ID + 500)
  * Creator ID
  * Severity
  * Action Flags
  * PEL Size

The desired size is reached by adding a UserData section as the last
section.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I99add4c17a352030298874340f8bf9d8041a3e74
diff --git a/test/openpower-pels/pel_utils.hpp b/test/openpower-pels/pel_utils.hpp
index fb7662e..1c4eebb 100644
--- a/test/openpower-pels/pel_utils.hpp
+++ b/test/openpower-pels/pel_utils.hpp
@@ -85,6 +85,27 @@
 std::vector<uint8_t> pelDataFactory(TestPELType type);
 
 /**
+ * @brief PEL factory to create a PEL with the specified fields.
+ *
+ * The size is obtained by adding a UserData section of
+ * the size necessary after adding the 5 required sections.
+ *
+ * @param[in] id - The desired PEL ID
+ * @param[in] creatorID - The desired creator ID
+ * @param[in] severity - The desired severity
+ * @param[in] actionFlags - The desired action flags
+ * @param[in] size - The desired size.
+ *                   Must be:
+ *                     * 4B aligned
+ *                     * min 276 (size of the 5 required sections)
+ *                     * max 16834
+ *
+ * @return std::vector<uint8_t> - The PEL data
+ */
+std::vector<uint8_t> pelFactory(uint32_t id, char creatorID, uint8_t severity,
+                                uint16_t actionFlags, size_t size);
+
+/**
  * @brief SRC data factory, for testing
  *
  * Provides pieces of the SRC PEL section, such as a callout.