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.cpp b/extensions/openpower-pels/data_interface.cpp
index deb4ba4..8b63726 100644
--- a/extensions/openpower-pels/data_interface.cpp
+++ b/extensions/openpower-pels/data_interface.cpp
@@ -36,6 +36,8 @@
 constexpr auto systemInv = "/xyz/openbmc_project/inventory/system";
 constexpr auto hostState = "/xyz/openbmc_project/state/host0";
 constexpr auto pldm = "/xyz/openbmc_project/pldm";
+constexpr auto enableHostPELs =
+    "/xyz/openbmc_project/logging/send_event_logs_to_host";
 } // namespace object_path
 
 namespace interface
@@ -45,6 +47,7 @@
 constexpr auto invAsset = "xyz.openbmc_project.Inventory.Decorator.Asset";
 constexpr auto osStatus = "xyz.openbmc_project.State.OperatingSystem.Status";
 constexpr auto pldmRequester = "xyz.openbmc_project.PLDM.Requester";
+constexpr auto enable = "xyz.openbmc_project.Object.Enable";
 } // namespace interface
 
 using namespace sdbusplus::xyz::openbmc_project::State::OperatingSystem::server;
@@ -89,6 +92,13 @@
                 setHostState(false);
             }
         }));
+
+    // Watch the host PEL enable property
+    _properties.emplace_back(std::make_unique<PropertyWatcher<DataInterface>>(
+        bus, object_path::enableHostPELs, interface::enable, "Enabled", *this,
+        [this](const auto& value) {
+            this->_sendPELsToHost = std::get<bool>(value);
+        }));
 }
 
 DBusPropertyMap