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 | |
Manojkiran Eda | cc5f158 | 2021-09-29 17:03:06 +0530 | [diff] [blame] | 6 | #include <config.h> |
Deepak Kodihalli | c6e8fb5 | 2019-05-02 08:35:31 -0500 | [diff] [blame] | 7 | #include <stdint.h> |
| 8 | |
Deepak Kodihalli | c6e8fb5 | 2019-05-02 08:35:31 -0500 | [diff] [blame] | 9 | namespace pldm |
| 10 | { |
| 11 | |
| 12 | namespace responder |
| 13 | { |
| 14 | |
| 15 | namespace pdr |
| 16 | { |
George Liu | e53193f | 2020-02-24 09:23:26 +0800 | [diff] [blame] | 17 | |
Sampa Misra | 12afe11 | 2020-05-25 11:40:44 -0500 | [diff] [blame] | 18 | constexpr uint8_t BmcMctpEid = 8; |
Sampa Misra | 12afe11 | 2020-05-25 11:40:44 -0500 | [diff] [blame] | 19 | |
George Liu | e53193f | 2020-02-24 09:23:26 +0800 | [diff] [blame] | 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 | */ |
Brad Bishop | 5079ac4 | 2021-08-19 18:35:06 -0400 | [diff] [blame] | 27 | void getRepoByType(const pldm::responder::pdr_utils::Repo& inRepo, |
| 28 | pldm::responder::pdr_utils::Repo& outRepo, |
| 29 | pldm::responder::pdr_utils::Type pdrType); |
George Liu | e53193f | 2020-02-24 09:23:26 +0800 | [diff] [blame] | 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 | */ |
Brad Bishop | 5079ac4 | 2021-08-19 18:35:06 -0400 | [diff] [blame] | 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); |
Deepak Kodihalli | c6e8fb5 | 2019-05-02 08:35:31 -0500 | [diff] [blame] | 44 | |
| 45 | } // namespace pdr |
| 46 | } // namespace responder |
| 47 | } // namespace pldm |