Add state set id support for remote sensor events

In the current state, PLDM does not support having a state set ID
field in the event JSONs, this commit would add that support in
PLDM there by allowing hosts to have multiple sensors with the
same entity instance number, type and container id, but with different
state sets.

TESTED: with pldmtool raw commands sending sensor events to the BMC.

Signed-off-by: Sagar Srinivas <sagar.srinivas@ibm.com>
Change-Id: If9bb9bde27d6b35f5904ac199801dbdffde0f57e
diff --git a/libpldmresponder/pdr_utils.cpp b/libpldmresponder/pdr_utils.cpp
index 06f080d..e7f6d42 100644
--- a/libpldmresponder/pdr_utils.cpp
+++ b/libpldmresponder/pdr_utils.cpp
@@ -166,6 +166,7 @@
     CompositeSensorStates sensors{};
     auto statesPtr = pdr->possible_states;
     auto compositeSensorCount = pdr->composite_sensor_count;
+    std::vector<StateSetId> stateSetIds{};
 
     while (compositeSensorCount--)
     {
@@ -189,6 +190,8 @@
                       updateStates);
 
         sensors.emplace_back(std::move(possibleStates));
+        stateSetIds.emplace_back(state->state_set_id);
+
         if (compositeSensorCount)
         {
             statesPtr += sizeof(state_sensor_possible_states) +
@@ -200,8 +203,8 @@
         std::make_tuple(static_cast<ContainerID>(pdr->container_id),
                         static_cast<EntityType>(pdr->entity_type),
                         static_cast<EntityInstance>(pdr->entity_instance));
-    auto sensorInfo = std::make_tuple(std::move(entityInfo),
-                                      std::move(sensors));
+    auto sensorInfo = std::make_tuple(std::move(entityInfo), std::move(sensors),
+                                      std::move(stateSetIds));
     return std::make_tuple(pdr->terminus_handle, pdr->sensor_id,
                            std::move(sensorInfo));
 }