Move ERR2 monitor to the new architecture

Add an error monitor for CPU_ERR2 that polls to check if it is
asserted through the timeout and logs the event.  If it is ever
not asserted, it will wait for an interrupt to start polling
again.

Change-Id: Ia6ed6717b40e1bdba4ae79add3c93abcc019c71f
Signed-off-by: Jason M. Bills <jason.m.bills@intel.com>
diff --git a/include/host_error_monitor.hpp b/include/host_error_monitor.hpp
index 90a946e..e8498b1 100644
--- a/include/host_error_monitor.hpp
+++ b/include/host_error_monitor.hpp
@@ -107,4 +107,21 @@
               << "\n";
 }
 
+static void beep(std::shared_ptr<sdbusplus::asio::connection> conn,
+                 const uint8_t& beepPriority)
+{
+    conn->async_method_call(
+        [](boost::system::error_code ec) {
+            if (ec)
+            {
+                std::cerr << "beep returned error with "
+                             "async_method_call (ec = "
+                          << ec << ")\n";
+                return;
+            }
+        },
+        "xyz.openbmc_project.BeepCode", "/xyz/openbmc_project/BeepCode",
+        "xyz.openbmc_project.BeepCode", "Beep", uint8_t(beepPriority));
+}
+
 } // namespace host_error_monitor