PEL: Read the send PELs to host setting

Certain manufacturing test phases do not need PELs sent to the host, and
this will be controlled with an 'Enabled' property on the settings D-Bus
object /xyz/openbmc_project/logging/send_event_logs_to_host.

Add a DataInterface API for this, and add the PropertyWatcher instance
to handle keeping the class member up to date.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I98f2f747d7d93acd890662c62666dbda744612d6
diff --git a/extensions/openpower-pels/data_interface.hpp b/extensions/openpower-pels/data_interface.hpp
index a275e4d..b3ed60d 100644
--- a/extensions/openpower-pels/data_interface.hpp
+++ b/extensions/openpower-pels/data_interface.hpp
@@ -163,6 +163,16 @@
         return std::nullopt;
     }
 
+    /**
+     * @brief Returns the 'send event logs to host' setting.
+     *
+     * @return bool - If sending PELs to the host is enabled.
+     */
+    virtual bool getHostPELEnablement() const
+    {
+        return _sendPELsToHost;
+    }
+
   protected:
     /**
      * @brief Sets the host on/off state and runs any
@@ -231,6 +241,13 @@
      * @brief The BMC firmware version ID string
      */
     std::string _bmcFWVersionID;
+
+    /**
+     * @brief If sending PELs is enabled.
+     *
+     * This is usually set to false in manufacturing test.
+     */
+    bool _sendPELsToHost = true;
 };
 
 /**
@@ -273,6 +290,7 @@
      */
     DBusService getService(const std::string& objectPath,
                            const std::string& interface) const;
+
     /**
      * @brief Wrapper for the 'GetAll' properties method call
      *
@@ -285,7 +303,6 @@
     DBusPropertyMap getAllProperties(const std::string& service,
                                      const std::string& objectPath,
                                      const std::string& interface) const;
-
     /**
      * @brief Wrapper for the 'Get' properties method call
      *