blob: fffa682a3928c4401034941adfe5e51baeb3d02f [file] [log] [blame]
Jayanth Othayothd31be2c2020-02-04 02:56:45 -06001#pragma once
2
3#include <libpldm/pldm.h>
4
5namespace phosphor
6{
7namespace dump
8{
9namespace 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
28void requestOffload(uint32_t id);
29
30/**
31 * @brief Reads the MCTP endpoint ID out of a file
32 */
33mctp_eid_t readEID();
34
35/**
36 * @brief Opens the PLDM file descriptor
37 */
38int open();
39
40/**
41 * @brief Closes the PLDM file descriptor
42 */
43void 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 **/
52uint8_t getPLDMInstanceID(uint8_t eid);
53
54} // namespace pldm
55} // namespace dump
56} // namespace phosphor