PEL: Move some functionality into DataIfaceBase

Refactor DataInterface to hold the data members in the base
class, and use the derived class for calculating them.

This will make it consistent with functionality that will be
added in the future.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: If6f2ba1890df296cb612c8a64dd60db72c70c46d
diff --git a/extensions/openpower-pels/data_interface.hpp b/extensions/openpower-pels/data_interface.hpp
index 34bb173..14acd70 100644
--- a/extensions/openpower-pels/data_interface.hpp
+++ b/extensions/openpower-pels/data_interface.hpp
@@ -19,8 +19,8 @@
 /**
  * @class DataInterface
  *
- * An abstract interface class for gathering data about the system
- * for use in PELs. Implemented this way to facilitate mocking.
+ * A base class for gathering data about the system for use
+ * in PELs. Implemented this way to facilitate mocking.
  */
 class DataInterfaceBase
 {
@@ -33,18 +33,35 @@
     DataInterfaceBase& operator=(DataInterfaceBase&&) = default;
 
     /**
-     * @brief Pure virtual for returning the MTM
+     * @brief Returns the machine Type/Model
      *
      * @return string - The machine Type/Model string
      */
-    virtual std::string getMachineTypeModel() const = 0;
+    virtual std::string getMachineTypeModel() const
+    {
+        return _machineTypeModel;
+    }
 
     /**
-     * @brief Pure virtual for returning the machine SN
+     * @brief Returns the machine serial number
      *
      * @return string - The machine serial number
      */
-    virtual std::string getMachineSerialNumber() const = 0;
+    virtual std::string getMachineSerialNumber() const
+    {
+        return _machineSerialNumber;
+    }
+
+  protected:
+    /**
+     * @brief The machine type-model.  Always kept up to date
+     */
+    std::string _machineTypeModel;
+
+    /**
+     * @brief The machine serial number.  Always kept up to date
+     */
+    std::string _machineSerialNumber;
 };
 
 /**
@@ -69,26 +86,6 @@
      */
     explicit DataInterface(sdbusplus::bus::bus& bus);
 
-    /**
-     * @brief Returns the machine type/model value
-     *
-     * @return string - The machine Type/Model string
-     */
-    std::string getMachineTypeModel() const override
-    {
-        return _machineTypeModel;
-    }
-
-    /**
-     * @brief Returns the machine SN
-     *
-     * @return string - The machine serial number
-     */
-    std::string getMachineSerialNumber() const override
-    {
-        return _machineSerialNumber;
-    }
-
   private:
     /**
      * @brief Reads the machine type/model and SN from D-Bus.
@@ -131,16 +128,6 @@
     void sysAssetPropChanged(sdbusplus::message::message& msg);
 
     /**
-     * @brief The machine type-model.  Always kept up to date
-     */
-    std::string _machineTypeModel;
-
-    /**
-     * @brief The machine serial number.  Always kept up to date
-     */
-    std::string _machineSerialNumber;
-
-    /**
      * @brief The match object for the system path's properties
      */
     std::unique_ptr<sdbusplus::bus::match_t> _sysInventoryPropMatch;