Implement PDR.FindStateEffecterPDR DBus API

This commit implements a DBus API defined at
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/31774
to find the stateEffecterPDR based on the entity ID
and stateSetID.

Tested: Unit tests and in witherspoon system
busctl call :1.187 /xyz/openbmc_project/pldm xyz.openbmc_project.PLDM.PDR FindStateEffecterPDR yqq 1 33 196
aay 1 29 1 0 0 0 1 11 0 0 19 0 0 0 1 0 33 0 0 0 0 0 0 0 0 0 1 196 0 1 6

busctl call :1.187 /xyz/openbmc_project/pldm xyz.openbmc_project.PLDM.PDR FindStateEffecterPDR yqq 1 31 129
aay 1 29 3 0 0 0 1 11 0 0 19 0 0 0 3 0 31 0 0 0 0 0 0 0 0 0 1 129 0 1 64

Change-Id: I5c15be5303b511465c36914f5b60a0957cd3857e
Signed-off-by: Pavithra Barithaya <pbaritha@in.ibm.com>
diff --git a/dbus_impl_pdr.cpp b/dbus_impl_pdr.cpp
new file mode 100644
index 0000000..c35e422
--- /dev/null
+++ b/dbus_impl_pdr.cpp
@@ -0,0 +1,33 @@
+#include "dbus_impl_pdr.hpp"
+
+#include "utils.hpp"
+#include "xyz/openbmc_project/Common/error.hpp"
+
+#include <iostream>
+
+#include "libpldm/pdr.h"
+#include "libpldm/pldm_types.h"
+
+using namespace sdbusplus::xyz::openbmc_project::Common::Error;
+
+namespace pldm
+{
+namespace dbus_api
+{
+
+std::vector<std::vector<uint8_t>> Pdr::findStateEffecterPDR(uint8_t tid,
+                                                            uint16_t entityID,
+                                                            uint16_t stateSetId)
+{
+    auto pdrs =
+        pldm::utils::findStateEffecterPDR(tid, entityID, stateSetId, pdrRepo);
+
+    if (pdrs.empty())
+    {
+        throw ResourceNotFound();
+    }
+
+    return pdrs;
+}
+} // namespace dbus_api
+} // namespace pldm