1 #pragma once 2 3 #include "common/utils.hpp" 4 #include "libpldmresponder/pdr_utils.hpp" 5 6 #include <config.h> 7 #include <stdint.h> 8 9 namespace pldm 10 { 11 12 namespace responder 13 { 14 15 namespace pdr 16 { 17 18 constexpr uint8_t BmcMctpEid = 8; 19 20 /** @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 */ 27 void getRepoByType(const pldm::responder::pdr_utils::Repo& inRepo, 28 pldm::responder::pdr_utils::Repo& outRepo, 29 pldm::responder::pdr_utils::Type pdrType); 30 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 */ 40 const 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); 44 45 } // namespace pdr 46 } // namespace responder 47 } // namespace pldm 48