Deepak Kodihalli | c6e8fb5 | 2019-05-02 08:35:31 -0500 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Deepak Kodihalli | d130e1a | 2020-06-17 05:55:32 -0500 | [diff] [blame] | 3 | #include "common/utils.hpp" |
George Liu | e53193f | 2020-02-24 09:23:26 +0800 | [diff] [blame] | 4 | #include "libpldmresponder/pdr_utils.hpp" |
Deepak Kodihalli | c6e8fb5 | 2019-05-02 08:35:31 -0500 | [diff] [blame] | 5 | |
| 6 | #include <stdint.h> |
| 7 | |
Deepak Kodihalli | c6e8fb5 | 2019-05-02 08:35:31 -0500 | [diff] [blame] | 8 | namespace pldm |
| 9 | { |
| 10 | |
| 11 | namespace responder |
| 12 | { |
| 13 | |
| 14 | namespace pdr |
| 15 | { |
George Liu | e53193f | 2020-02-24 09:23:26 +0800 | [diff] [blame] | 16 | |
Sampa Misra | 12afe11 | 2020-05-25 11:40:44 -0500 | [diff] [blame] | 17 | constexpr uint8_t BmcMctpEid = 8; |
Sampa Misra | 12afe11 | 2020-05-25 11:40:44 -0500 | [diff] [blame] | 18 | |
George Liu | e53193f | 2020-02-24 09:23:26 +0800 | [diff] [blame] | 19 | /** @brief Build (if not built already) and retrieve PDR by the PDR types |
| 20 | * |
| 21 | * @param[in] dir - directory housing platform specific PDR JSON files |
| 22 | * @param[in] pdrType - the type of PDRs |
| 23 | * |
| 24 | * @return Repo - Instance of pdr::Repo |
| 25 | */ |
Brad Bishop | 5079ac4 | 2021-08-19 18:35:06 -0400 | [diff] [blame] | 26 | void getRepoByType(const pldm::responder::pdr_utils::Repo& inRepo, |
| 27 | pldm::responder::pdr_utils::Repo& outRepo, |
| 28 | pldm::responder::pdr_utils::Type pdrType); |
George Liu | e53193f | 2020-02-24 09:23:26 +0800 | [diff] [blame] | 29 | |
| 30 | /** @brief Get the record of PDR by the record handle |
| 31 | * |
| 32 | * @param[in] pdrRepo - pdr::RepoInterface |
| 33 | * @param[in] recordHandle - The recordHandle value for the PDR to be |
| 34 | * retrieved. |
| 35 | * @param[out] pdrEntry - PDR entry structure reference |
| 36 | * |
| 37 | * @return pldm_pdr_record - Instance of pdr::RepoInterface |
| 38 | */ |
Brad Bishop | 5079ac4 | 2021-08-19 18:35:06 -0400 | [diff] [blame] | 39 | const pldm_pdr_record* |
| 40 | getRecordByHandle(const pldm::responder::pdr_utils::RepoInterface& pdrRepo, |
| 41 | pldm::responder::pdr_utils::RecordHandle recordHandle, |
| 42 | pldm::responder::pdr_utils::PdrEntry& pdrEntry); |
Deepak Kodihalli | c6e8fb5 | 2019-05-02 08:35:31 -0500 | [diff] [blame] | 43 | |
| 44 | } // namespace pdr |
| 45 | } // namespace responder |
| 46 | } // namespace pldm |