1 #pragma once 2 3 #include "common/utils.hpp" 4 #include "libpldmresponder/pdr_utils.hpp" 5 6 #include <stdint.h> 7 8 namespace pldm 9 { 10 11 namespace responder 12 { 13 14 namespace pdr 15 { 16 17 constexpr uint8_t BmcMctpEid = 8; 18 constexpr uint8_t BmcPldmTerminusHandle = 1; 19 constexpr uint8_t BmcTerminusId = 1; 20 21 /** @brief Build (if not built already) and retrieve PDR by the PDR types 22 * 23 * @param[in] dir - directory housing platform specific PDR JSON files 24 * @param[in] pdrType - the type of PDRs 25 * 26 * @return Repo - Instance of pdr::Repo 27 */ 28 void getRepoByType(const pldm::responder::pdr_utils::Repo& inRepo, 29 pldm::responder::pdr_utils::Repo& outRepo, 30 pldm::responder::pdr_utils::Type pdrType); 31 32 /** @brief Get the record of PDR by the record handle 33 * 34 * @param[in] pdrRepo - pdr::RepoInterface 35 * @param[in] recordHandle - The recordHandle value for the PDR to be 36 * retrieved. 37 * @param[out] pdrEntry - PDR entry structure reference 38 * 39 * @return pldm_pdr_record - Instance of pdr::RepoInterface 40 */ 41 const pldm_pdr_record* 42 getRecordByHandle(const pldm::responder::pdr_utils::RepoInterface& pdrRepo, 43 pldm::responder::pdr_utils::RecordHandle recordHandle, 44 pldm::responder::pdr_utils::PdrEntry& pdrEntry); 45 46 } // namespace pdr 47 } // namespace responder 48 } // namespace pldm 49