PEL: Wait a bit after host up before sending PELs

Wait a minute after the host state switches to running before sending
any PELs to the host.  This applies both on a normal boot and also when
the BMC is rebooted when the host is already up.

This is being done for 2 reasons:
1) Give some relief to the PLDM traffic and CPU load that occurs after a
   BMC reboot when the host is already up, because the host will also be
   exchanging PLDM PDRs with the BMC then and pretty much every
   application is also starting up at the time as well.
2) A lot of times on a normal boot the host notifier code ends up having
   to do a few retries when it first starts sending the PELs because the
   first few commands fail, possibly because the code on the receiving
   end isn't quite ready yet.

I arrived at that amount of time by deciding 30 seconds was reasonable,
and then doubling it just to be sure.  During testing of the reboots the
minute timeout gave plenty of time for the BMC to get back to BMC ready.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I0929a4acdda0a9fe8fbdcd624c5821a642ad83a6
diff --git a/extensions/openpower-pels/host_interface.hpp b/extensions/openpower-pels/host_interface.hpp
index 11319fc..d19c2cb 100644
--- a/extensions/openpower-pels/host_interface.hpp
+++ b/extensions/openpower-pels/host_interface.hpp
@@ -110,6 +110,19 @@
         return _defaultHostFullRetryDelay;
     }
 
+    /**
+     * @brief Returns the amount of time to wait after the host is up
+     *        before sending commands.
+     *
+     * In this class to help with mocking.
+     *
+     * @return milliseconds - The amount of time to wait
+     */
+    virtual std::chrono::milliseconds getHostUpDelay() const
+    {
+        return _defaultHostUpDelay;
+    }
+
     using ResponseFunction = std::function<void(ResponseStatus)>;
 
     /**
@@ -226,6 +239,12 @@
      *        was full before sending the PEL again.
      */
     const std::chrono::milliseconds _defaultHostFullRetryDelay{60000};
+
+    /**
+     * @brief The default amount of time to wait after the host is up
+     *        before sending up the PELs.
+     */
+    const std::chrono::milliseconds _defaultHostUpDelay{60000};
 };
 
 } // namespace pels