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/pldmd.cpp b/pldmd.cpp
index d1ca6fa..4bc8943 100644
--- a/pldmd.cpp
+++ b/pldmd.cpp
@@ -1,3 +1,4 @@
+#include "dbus_impl_pdr.hpp"
#include "dbus_impl_requester.hpp"
#include "host_pdr_handler.hpp"
#include "invoker.hpp"
@@ -218,6 +219,7 @@
exit(EXIT_FAILURE);
}
+ dbus_api::Pdr dbusImplPdr(bus, "/xyz/openbmc_project/pldm", pdrRepo.get());
auto callback = [verbose, &invoker, &dbusImplReq](IO& /*io*/, int fd,
uint32_t revents) {
if (!(revents & EPOLLIN))