pldm_events: Implement support for state sensorEvents

PLDM supports platform event message by which events can be generated
by a PLDM entity and can be processed by event receiver like BMC. This
patch adds support for remote state sensors which sends PlatformEventMessage
command with sensorEvent type. The sensor is mapped to a D-Bus property
and the eventState is mapped to a D-Bus property value.

Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
Change-Id: I50dea23eccbdf29ad1b4cf2c9ab5700d74c12c68
diff --git a/utils.hpp b/utils.hpp
index 6ac282d..abf525b 100644
--- a/utils.hpp
+++ b/utils.hpp
@@ -7,6 +7,7 @@
 #include <exception>
 #include <filesystem>
 #include <iostream>
+#include <nlohmann/json.hpp>
 #include <sdbusplus/server.hpp>
 #include <string>
 #include <variant>
@@ -248,6 +249,15 @@
  *  @return uint8_t - MCTP EID
  */
 uint8_t readHostEID();
+/** @brief Convert a value in the JSON to a D-Bus property value
+ *
+ *  @param[in] type - type of the D-Bus property
+ *  @param[in] value - value in the JSON file
+ *
+ *  @return PropertyValue - the D-Bus property value
+ */
+PropertyValue jsonEntryToDbusVal(std::string_view type,
+                                 const nlohmann::json& value);
 
 } // namespace utils
 } // namespace pldm