blob: f9ebf52cea9f4f3b26c97844c72f7476a4e25a17 [file] [log] [blame]
Deepak Kodihallic6e8fb52019-05-02 08:35:31 -05001#pragma once
2
Deepak Kodihallid130e1a2020-06-17 05:55:32 -05003#include "common/utils.hpp"
George Liue53193f2020-02-24 09:23:26 +08004#include "libpldmresponder/pdr_utils.hpp"
Deepak Kodihallic6e8fb52019-05-02 08:35:31 -05005
Manojkiran Edacc5f1582021-09-29 17:03:06 +05306#include <config.h>
Deepak Kodihallic6e8fb52019-05-02 08:35:31 -05007#include <stdint.h>
8
Deepak Kodihallic6e8fb52019-05-02 08:35:31 -05009namespace pldm
10{
11
12namespace responder
13{
14
15namespace pdr
16{
George Liue53193f2020-02-24 09:23:26 +080017
Sampa Misra12afe112020-05-25 11:40:44 -050018constexpr uint8_t BmcMctpEid = 8;
Sampa Misra12afe112020-05-25 11:40:44 -050019
George Liue53193f2020-02-24 09:23:26 +080020/** @brief Build (if not built already) and retrieve PDR by the PDR types
21 *
22 * @param[in] dir - directory housing platform specific PDR JSON files
23 * @param[in] pdrType - the type of PDRs
24 *
25 * @return Repo - Instance of pdr::Repo
26 */
Brad Bishop5079ac42021-08-19 18:35:06 -040027void getRepoByType(const pldm::responder::pdr_utils::Repo& inRepo,
28 pldm::responder::pdr_utils::Repo& outRepo,
29 pldm::responder::pdr_utils::Type pdrType);
George Liue53193f2020-02-24 09:23:26 +080030
31/** @brief Get the record of PDR by the record handle
32 *
33 * @param[in] pdrRepo - pdr::RepoInterface
34 * @param[in] recordHandle - The recordHandle value for the PDR to be
35 * retrieved.
36 * @param[out] pdrEntry - PDR entry structure reference
37 *
38 * @return pldm_pdr_record - Instance of pdr::RepoInterface
39 */
Brad Bishop5079ac42021-08-19 18:35:06 -040040const pldm_pdr_record*
41 getRecordByHandle(const pldm::responder::pdr_utils::RepoInterface& pdrRepo,
42 pldm::responder::pdr_utils::RecordHandle recordHandle,
43 pldm::responder::pdr_utils::PdrEntry& pdrEntry);
Deepak Kodihallic6e8fb52019-05-02 08:35:31 -050044
45} // namespace pdr
46} // namespace responder
47} // namespace pldm