Allow OEM Effecters & Sensors leverage json infrastructure
In the current flow, if the entity type is in the OEM range,
then in both the getStateSensorReadings & setStateEffecter handler
flow, we would trigger the oem functions rather than the generic
functions (which handles the PDR's in json format) - while this gives
a seperated infrastructure, this would also limit us from using the
json infrastructure for OEM entities.
This fix would basically allow defining the OEM entities in the standard
PDR json files, and also allow us to seperate out a new 11.json & 4.json
into the oem/ configuration folders.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Change-Id: I41c771f07b0cc7879488cb9c475d90cdb845ed4c
diff --git a/libpldmresponder/platform.cpp b/libpldmresponder/platform.cpp
index 2d6ed21..707c9ff 100644
--- a/libpldmresponder/platform.cpp
+++ b/libpldmresponder/platform.cpp
@@ -283,7 +283,8 @@
if (isOemStateEffecter(*this, effecterId, compEffecterCnt, entityType,
entityInstance, stateSetId) &&
- oemPlatformHandler != nullptr)
+ oemPlatformHandler != nullptr &&
+ !effecterDbusObjMaps.contains(effecterId))
{
rc = oemPlatformHandler->oemSetStateEffecterStatesHandler(
entityType, entityInstance, stateSetId, compEffecterCnt, stateField,
@@ -663,7 +664,7 @@
if (isOemStateSensor(*this, sensorId, sensorRearmCount, comSensorCnt,
entityType, entityInstance, stateSetId) &&
- oemPlatformHandler != nullptr)
+ oemPlatformHandler != nullptr && !sensorDbusObjMaps.contains(sensorId))
{
rc = oemPlatformHandler->getOemStateSensorReadingsHandler(
entityType, entityInstance, stateSetId, comSensorCnt, stateField);