blob: 8af3e8de2a4a8c74c8171ab41d9a383b9d7a1401 [file] [log] [blame]
#pragma once
#include "NVMeContext.hpp"
#include <boost/asio/ip/tcp.hpp>
class NVMeMCTPContext : public NVMeContext
{
public:
NVMeMCTPContext(boost::asio::io_service& io, int rootBus);
~NVMeMCTPContext() override;
void pollNVMeDevices() override;
void close() override;
void readAndProcessNVMeSensor() override;
void processResponse(void* msg, size_t len) override;
private:
boost::asio::ip::tcp::socket nvmeSlaveSocket;
boost::asio::deadline_timer mctpResponseTimer;
void readResponse();
};
namespace nvme_mctp
{
void init(void);
}