blob: 4a62c2c72179e7cbcf7c8f1edf937336e2b3830e [file] [log] [blame]
Patrick Venture123b5c02019-03-05 14:01:00 -08001#pragma once
2
3#include <cstdint>
4#include <vector>
5
Patrick Venture1470bec2019-03-06 07:33:12 -08006namespace ipmiblob
Patrick Venture123b5c02019-03-05 14:01:00 -08007{
8
9class IpmiInterface
10{
11 public:
12 virtual ~IpmiInterface() = default;
13
14 /**
15 * Send an IPMI packet to the BMC.
16 *
Patrick Venture958f1ce2019-05-31 17:07:25 -070017 * @param[in] netfn - the netfn for the IPMI packet.
18 * @param[in] cmd - the command.
Patrick Venture123b5c02019-03-05 14:01:00 -080019 * @param[in] data - a vector of the IPMI packet contents.
20 * @return the bytes returned.
21 * @throws IpmiException on failure.
22 */
23 virtual std::vector<std::uint8_t>
Patrick Venture958f1ce2019-05-31 17:07:25 -070024 sendPacket(std::uint8_t netfn, std::uint8_t cmd,
25 std::vector<std::uint8_t>& data) = 0;
Patrick Venture123b5c02019-03-05 14:01:00 -080026};
27
Patrick Venture1470bec2019-03-06 07:33:12 -080028} // namespace ipmiblob