PEL: Support for the host acking a PEL

After the host firmware successfully transfers a PEL to the OS,
it will respond with an 'Ack' command that the PLDM daemon sends
over to this daemon via a D-Bus method call.

Add support to the HostNotifier class for this.  It will change the
state field in the PEL to 'acked' so that it doesn't get sent up
again.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Id2a9985965017d9431419c1375d5374a2d0ae00b
diff --git a/extensions/openpower-pels/host_notifier.cpp b/extensions/openpower-pels/host_notifier.cpp
index f2d951f..b4e92a8 100644
--- a/extensions/openpower-pels/host_notifier.cpp
+++ b/extensions/openpower-pels/host_notifier.cpp
@@ -345,4 +345,16 @@
     }
 }
 
+void HostNotifier::ackPEL(uint32_t id)
+{
+    _repo.setPELHostTransState(id, TransmissionState::acked);
+
+    // No longer just 'sent', so remove it from the sent list.
+    auto sent = std::find(_sentPELs.begin(), _sentPELs.end(), id);
+    if (sent != _sentPELs.end())
+    {
+        _sentPELs.erase(sent);
+    }
+}
+
 } // namespace openpower::pels