Nikhil Potade | b669b6b | 2019-03-13 10:52:21 -0700 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Zhikui Ren | f57836b | 2020-09-25 15:33:55 -0700 | [diff] [blame] | 3 | #include <boost/asio/io_service.hpp> |
Nikhil Potade | b669b6b | 2019-03-13 10:52:21 -0700 | [diff] [blame] | 4 | #include <sensor.hpp> |
| 5 | |
| 6 | class NVMeSensor : public Sensor |
| 7 | { |
| 8 | public: |
Andrew Jeffery | 0c23fc3 | 2021-12-08 16:48:30 +1030 | [diff] [blame^] | 9 | static constexpr const char* CONFIG_TYPE = |
| 10 | "xyz.openbmc_project.Configuration.NVME1000"; |
| 11 | |
Nikhil Potade | b669b6b | 2019-03-13 10:52:21 -0700 | [diff] [blame] | 12 | NVMeSensor(sdbusplus::asio::object_server& objectServer, |
| 13 | boost::asio::io_service& io, |
| 14 | std::shared_ptr<sdbusplus::asio::connection>& conn, |
| 15 | const std::string& sensorName, |
Ed Tanous | 8a57ec0 | 2020-10-09 12:46:52 -0700 | [diff] [blame] | 16 | std::vector<thresholds::Threshold>&& thresholds, |
Nikhil Potade | b669b6b | 2019-03-13 10:52:21 -0700 | [diff] [blame] | 17 | const std::string& sensorConfiguration, const int busNumber); |
| 18 | virtual ~NVMeSensor(); |
| 19 | |
| 20 | NVMeSensor& operator=(const NVMeSensor& other) = delete; |
| 21 | |
Nikhil Potade | b669b6b | 2019-03-13 10:52:21 -0700 | [diff] [blame] | 22 | int bus; |
| 23 | |
| 24 | private: |
| 25 | sdbusplus::asio::object_server& objServer; |
| 26 | |
| 27 | void checkThresholds(void) override; |
| 28 | }; |