Jayanth Othayoth | d31be2c | 2020-02-04 02:56:45 -0600 | [diff] [blame^] | 1 | #pragma once |
| 2 | |
| 3 | #include <libpldm/pldm.h> |
| 4 | |
| 5 | namespace phosphor |
| 6 | { |
| 7 | namespace dump |
| 8 | { |
| 9 | namespace pldm |
| 10 | { |
| 11 | |
| 12 | /** |
| 13 | * PLDMInterface |
| 14 | * |
| 15 | * Handles sending the SetNumericEffecterValue PLDM |
| 16 | * command to the host to start dump offload. |
| 17 | * |
| 18 | */ |
| 19 | |
| 20 | /** |
| 21 | * @brief Kicks of the SetNumericEffecterValue command to |
| 22 | * start offload the dump |
| 23 | * |
| 24 | * @param[in] id - The Dump Source ID. |
| 25 | * |
| 26 | */ |
| 27 | |
| 28 | void requestOffload(uint32_t id); |
| 29 | |
| 30 | /** |
| 31 | * @brief Reads the MCTP endpoint ID out of a file |
| 32 | */ |
| 33 | mctp_eid_t readEID(); |
| 34 | |
| 35 | /** |
| 36 | * @brief Opens the PLDM file descriptor |
| 37 | */ |
| 38 | int open(); |
| 39 | |
| 40 | /** |
| 41 | * @brief Closes the PLDM file descriptor |
| 42 | */ |
| 43 | void closeFD(int fd); |
| 44 | |
| 45 | /** |
| 46 | * @brief Returns the PLDM instance ID to use for PLDM commands |
| 47 | * |
| 48 | * @param[in] eid - The PLDM EID |
| 49 | * |
| 50 | * @return uint8_t - The instance ID |
| 51 | **/ |
| 52 | uint8_t getPLDMInstanceID(uint8_t eid); |
| 53 | |
| 54 | } // namespace pldm |
| 55 | } // namespace dump |
| 56 | } // namespace phosphor |