blob: 6b0a425054a9c868561b6b575421b3adcc6022f1 [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;
Andrew Jeffery8c7074e2022-03-21 14:58:13 +103014 void readAndProcessNVMeSensor(
15 std::list<std::shared_ptr<NVMeSensor>>::iterator iter) override;
16 void processResponse(std::shared_ptr<NVMeSensor>& sensor, void* msg,
17 size_t len) override;
Andrew Jefferye3e3c972021-05-26 14:37:07 +093018
19 private:
20 NVMeBasicContext(boost::asio::io_service& io, int rootBus, int cmdOut,
21 int streamIn, int streamOut, int cmdIn);
22 boost::asio::io_service& io;
23 boost::asio::posix::stream_descriptor reqStream;
24 boost::asio::posix::stream_descriptor respStream;
25};