blob: 29b55d92b54de9871c6fe72da7df407682febffa [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);
Ed Tanous74cffa82022-01-25 13:00:28 -080012 ~NVMeBasicContext() override = default;
13 void pollNVMeDevices() override;
14 void readAndProcessNVMeSensor() override;
15 void processResponse(void* msg, size_t len) override;
Andrew Jefferye3e3c972021-05-26 14:37:07 +093016
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};