Andrew Jeffery | e3e3c97 | 2021-05-26 14:37:07 +0930 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include "NVMeContext.hpp" |
| 4 | |
| 5 | #include <boost/asio/io_service.hpp> |
| 6 | #include <boost/asio/posix/stream_descriptor.hpp> |
| 7 | |
| 8 | class NVMeBasicContext : public NVMeContext |
| 9 | { |
| 10 | public: |
| 11 | NVMeBasicContext(boost::asio::io_service& io, int rootBus); |
Ed Tanous | 74cffa8 | 2022-01-25 13:00:28 -0800 | [diff] [blame] | 12 | ~NVMeBasicContext() override = default; |
| 13 | void pollNVMeDevices() override; |
Andrew Jeffery | 8c7074e | 2022-03-21 14:58:13 +1030 | [diff] [blame^] | 14 | 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 Jeffery | e3e3c97 | 2021-05-26 14:37:07 +0930 | [diff] [blame] | 18 | |
| 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 | }; |