blob: 48ffc2516f859696703ba511a903c3e7d9f5b570 [file] [log] [blame]
Nikhil Potadeb669b6b2019-03-13 10:52:21 -07001#pragma once
2
Zhikui Renf57836b2020-09-25 15:33:55 -07003#include <boost/asio/io_service.hpp>
Nikhil Potadeb669b6b2019-03-13 10:52:21 -07004#include <sensor.hpp>
5
6class NVMeSensor : public Sensor
7{
8 public:
Andrew Jeffery0c23fc32021-12-08 16:48:30 +10309 static constexpr const char* CONFIG_TYPE =
10 "xyz.openbmc_project.Configuration.NVME1000";
11
Nikhil Potadeb669b6b2019-03-13 10:52:21 -070012 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 Tanous8a57ec02020-10-09 12:46:52 -070016 std::vector<thresholds::Threshold>&& thresholds,
Nikhil Potadeb669b6b2019-03-13 10:52:21 -070017 const std::string& sensorConfiguration, const int busNumber);
18 virtual ~NVMeSensor();
19
20 NVMeSensor& operator=(const NVMeSensor& other) = delete;
21
Nikhil Potadeb669b6b2019-03-13 10:52:21 -070022 int bus;
23
24 private:
25 sdbusplus::asio::object_server& objServer;
26
27 void checkThresholds(void) override;
28};