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/event_parser.cpp b/libpldmresponder/event_parser.cpp
index d070758..303a553 100644
--- a/libpldmresponder/event_parser.cpp
+++ b/libpldmresponder/event_parser.cpp
@@ -5,7 +5,6 @@
#include <filesystem>
#include <fstream>
-#include <iostream>
#include <set>
PHOSPHOR_LOG2_USING;
@@ -58,6 +57,8 @@
static_cast<uint16_t>(entry.value("entityInstance", 0));
stateSensorEntry.sensorOffset =
static_cast<uint8_t>(entry.value("sensorOffset", 0));
+ stateSensorEntry.stateSetid =
+ static_cast<uint16_t>(entry.value("stateSetId", 0));
pldm::utils::DBusMapping dbusInfo{};