blob: 656e1fdd865f304013a3566d274279510176a269 [file] [log] [blame]
Andrew Jefferya9d15082021-05-24 13:55:12 +09301#pragma once
2
3#include "NVMeContext.hpp"
4
5#include <boost/asio/ip/tcp.hpp>
6
7class NVMeMCTPContext : public NVMeContext
8{
9 public:
10 NVMeMCTPContext(boost::asio::io_service& io, int rootBus);
11
12 virtual ~NVMeMCTPContext();
13
14 virtual void pollNVMeDevices() override;
15 virtual void close() override;
16 virtual void readAndProcessNVMeSensor() override;
17 virtual void processResponse(void* msg, size_t len) override;
18
19 private:
20 boost::asio::ip::tcp::socket nvmeSlaveSocket;
21 boost::asio::deadline_timer mctpResponseTimer;
22
23 void readResponse();
24};
25
26namespace nvmeMCTP
27{
28void init(void);
29}