PEL: Add support for raw symbolic FRUs and procs

Allow the FRUIdentity and Callout objects to take the raw maintenance
procedure and symbolic FRU names as opposed to just the PEL message
registry names.  This will allow the values to come from sources
besides the registry, such as the device tree used by PHAL.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I4171fb7128ae1b1b5e3e635f7f95b7f7df7c6638
diff --git a/extensions/openpower-pels/fru_identity.hpp b/extensions/openpower-pels/fru_identity.hpp
index e5eb864..e911b13 100644
--- a/extensions/openpower-pels/fru_identity.hpp
+++ b/extensions/openpower-pels/fru_identity.hpp
@@ -13,6 +13,16 @@
 {
 
 /**
+ * @brief Specifies if the incoming maintenance procedure or
+ *        symbolic FRU is the registry name or the raw name.
+ */
+enum class CalloutValueType
+{
+    raw,
+    registryName
+};
+
+/**
  * @class FRUIdentity
  *
  * This represents the FRU Identity substructure in the
@@ -92,7 +102,20 @@
      * @param[in] procedureFromRegistry - The maintenance procedure name
      *                                    as defined in the message registry.
      */
-    FRUIdentity(const std::string& procedureFromRegistry);
+    FRUIdentity(const std::string& procedureFromRegistry) :
+        FRUIdentity(procedureFromRegistry, CalloutValueType::registryName)
+    {
+    }
+
+    /**
+     * @brief Constructor
+     *
+     * Creates the object with a maintenance procedure callout.
+     *
+     * @param[in] procedure - The maintenance procedure name.
+     * @param[in] type - If the procedure is the raw name or the registry name.
+     */
+    FRUIdentity(const std::string& procedure, CalloutValueType type);
 
     /**
      * @brief Constructor
@@ -105,6 +128,23 @@
      *                                  can be trusted to be correct.
      */
     FRUIdentity(const std::string& symbolicFRUFromRegistry,
+                bool trustedLocationCode) :
+        FRUIdentity(symbolicFRUFromRegistry, CalloutValueType::registryName,
+                    trustedLocationCode)
+    {
+    }
+
+    /**
+     * @brief Constructor
+     *
+     * Creates the object with a symbolic FRU callout.
+     *
+     * @param[in] fru - The symbolic FRU name.
+     * @param[in] type - If the FRU is the raw name or the registry name.
+     * @param[in] trustedLocationCode - If this FRU callout's location code
+     *                                  can be trusted to be correct.
+     */
+    FRUIdentity(const std::string& fru, CalloutValueType type,
                 bool trustedLocationCode);
 
     /**
@@ -245,20 +285,23 @@
      *        field.  This is in the same field as the part
      *        number since they are mutually exclusive.
      *
-     * @param procedureFromRegistry - The procedure name as defined in
-     *                                the PEL message registry.
+     * @param procedure - The procedure name.
+     * @param[in] type - If the procedure is the raw name or
+     *                   the registry name.
      */
-    void setMaintenanceProcedure(const std::string& procedureFromRegistry);
+    void setMaintenanceProcedure(const std::string& procedure,
+                                 CalloutValueType type);
 
     /**
      * @brief Sets the 8 character null terminated symbolic FRU
      *        field.  This is in the same field as the part
      *        number since they are mutually exclusive.
      *
-     * @param[in] symbolicFRUFromRegistry - The symbolic FRU name as
-     *                                      defined in the message registry.
+     * @param[in] symbolicFRU - The symbolic FRU name.
+     * @param[in] type - If the FRU is the raw name or
+     *                   the registry name.
      */
-    void setSymbolicFRU(const std::string& symbolicFRUFromRegistry);
+    void setSymbolicFRU(const std::string& symbolicFRU, CalloutValueType type);
 
     /**
      * @brief The callout substructure type field. Will be "ID".