blob: 579030e0c415b7597c49e8ca91f7510dada9e75d [file] [log] [blame]
Andrew Jefferye3e3c972021-05-26 14:37:07 +09301#pragma once
2
3#include "NVMeContext.hpp"
4
5#include <boost/asio/io_service.hpp>
6#include <boost/asio/posix/stream_descriptor.hpp>
7
8class NVMeBasicContext : public NVMeContext
9{
10 public:
11 NVMeBasicContext(boost::asio::io_service& io, int rootBus);
12 virtual ~NVMeBasicContext() = default;
13 virtual void pollNVMeDevices() override;
14 virtual void readAndProcessNVMeSensor() override;
15 virtual void processResponse(void* msg, size_t len) override;
16
17 private:
18 NVMeBasicContext(boost::asio::io_service& io, int rootBus, int cmdOut,
19 int streamIn, int streamOut, int cmdIn);
20 boost::asio::io_service& io;
21 boost::asio::posix::stream_descriptor reqStream;
22 boost::asio::posix::stream_descriptor respStream;
23};