pldm_events: Parse state sensor PDRs from the Host PDR

Parse the State Sensor PDRs from the host firmware and build
the HostStateSensorMap data structure which will be used to
lookup the sensor info for the sensorEventType in the
PlatformEventMessage command. Also clear the HostStateSensorMap
when the host powers off.

Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
Change-Id: Id85a73f1a0a1caf4b4155a8d235b3e807383e53a
diff --git a/libpldmresponder/pdr_utils.hpp b/libpldmresponder/pdr_utils.hpp
index 6df5d94..8f4f825 100644
--- a/libpldmresponder/pdr_utils.hpp
+++ b/libpldmresponder/pdr_utils.hpp
@@ -1,5 +1,6 @@
 #pragma once
 
+#include "types.hpp"
 #include "utils.hpp"
 
 #include <stdint.h>
@@ -195,6 +196,18 @@
     bool empty() override;
 };
 
+using namespace pldm::pdr;
+/** @brief Parse the State Sensor PDR and return the parsed sensor info which
+ *         will be used to lookup the sensor info in the PlatformEventMessage
+ *         command of sensorEvent type.
+ *
+ *  @param[in] stateSensorPdr - state sensor PDR
+ *
+ *  @return terminus handle, sensor ID and parsed sensor info
+ */
+std::tuple<TerminusHandle, SensorID, SensorInfo>
+    parseStateSensorPDR(const std::vector<uint8_t>& stateSensorPdr);
+
 } // namespace pdr_utils
 } // namespace responder
 } // namespace pldm