Patrick Venture | 7dc4670 | 2018-08-08 09:43:33 -0700 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <vector> |
| 4 | |
| 5 | extern "C" { |
| 6 | #include "ipmitoolintf.h" |
| 7 | } // extern "C" |
| 8 | |
| 9 | class RawInterface |
| 10 | { |
| 11 | public: |
| 12 | virtual ~RawInterface() = default; |
| 13 | |
| 14 | virtual struct IpmiResponse Raw(const std::vector<uint8_t>& buffer) = 0; |
| 15 | virtual struct IpmiResponse RawWithTries(const std::vector<uint8_t>& buffer, |
| 16 | int tries) = 0; |
| 17 | }; |
| 18 | |
| 19 | class IpmiRaw : public RawInterface |
| 20 | { |
| 21 | public: |
| 22 | IpmiRaw() = default; |
| 23 | |
| 24 | struct IpmiResponse Raw(const std::vector<uint8_t>& buffer) override; |
| 25 | struct IpmiResponse RawWithTries(const std::vector<uint8_t>& buffer, |
| 26 | int tries) override; |
| 27 | }; |