blob: c35e422b82245b5e300fa4b7ea13de29f6f76615 [file] [log] [blame]
Pavithra Barithaya0f74c982020-04-27 02:17:10 -05001#include "dbus_impl_pdr.hpp"
2
3#include "utils.hpp"
4#include "xyz/openbmc_project/Common/error.hpp"
5
6#include <iostream>
7
8#include "libpldm/pdr.h"
9#include "libpldm/pldm_types.h"
10
11using namespace sdbusplus::xyz::openbmc_project::Common::Error;
12
13namespace pldm
14{
15namespace dbus_api
16{
17
18std::vector<std::vector<uint8_t>> Pdr::findStateEffecterPDR(uint8_t tid,
19 uint16_t entityID,
20 uint16_t stateSetId)
21{
22 auto pdrs =
23 pldm::utils::findStateEffecterPDR(tid, entityID, stateSetId, pdrRepo);
24
25 if (pdrs.empty())
26 {
27 throw ResourceNotFound();
28 }
29
30 return pdrs;
31}
32} // namespace dbus_api
33} // namespace pldm