platform-mc: Added EventManager

Added eventManager to handle sensor event class(00h) which is defined in
table 11 of DSP0248 v1.3.0. In this commit, the eventManager supports to
receive event asynchronously. The commit will also log the Ipmitool SEL
log and Redfish log for PLDM sensor event messages.

Change-Id: I1b337ccae454067841ffbbd8754631216a995542
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
Signed-off-by: Gilbert Chen <gilbertc@nvidia.com>
diff --git a/platform-mc/numeric_sensor.hpp b/platform-mc/numeric_sensor.hpp
index 7b2fc6a..92c709f 100644
--- a/platform-mc/numeric_sensor.hpp
+++ b/platform-mc/numeric_sensor.hpp
@@ -4,6 +4,7 @@
 #include "libpldm/pldm.h"
 
 #include "common/types.hpp"
+#include "common/utils.hpp"
 
 #include <sdbusplus/server/object.hpp>
 #include <xyz/openbmc_project/Association/Definitions/server.hpp>
@@ -166,6 +167,20 @@
         }
     };
 
+    /** @brief Check if value is over threshold.
+     *
+     *  @param[in] eventType - event level in pldm::utils::Level
+     *  @param[in] direction - direction type in pldm::utils::Direction
+     *  @param[in] rawValue - sensor raw value
+     *  @param[in] newAlarm - trigger alarm true/false
+     *  @param[in] assert - event type asserted/deasserted
+     *
+     *  @return PLDM completion code
+     */
+    int triggerThresholdEvent(pldm::utils::Level eventType,
+                              pldm::utils::Direction direction, double rawValue,
+                              bool newAlarm, bool assert);
+
     /** @brief Terminus ID which the sensor belongs to */
     pldm_tid_t tid;