blob: 0a712fba606f791e7d5fca49c6191686005acdcc [file] [log] [blame]
James Feist139cb572018-09-10 15:26:18 -07001#pragma once
2
3#include <sdbusplus/asio/object_server.hpp>
4
5class PwmSensor
6{
7 public:
8 PwmSensor(const std::string& sysPath,
9 sdbusplus::asio::object_server& objectServer);
10 ~PwmSensor();
11
12 private:
13 std::string sysPath;
14 sdbusplus::asio::object_server& objectServer;
15 std::string name;
16 std::shared_ptr<sdbusplus::asio::dbus_interface> sensorInterface;
17 std::shared_ptr<sdbusplus::asio::dbus_interface> controlInterface;
18 void setValue(uint32_t value);
19 uint32_t getValue(bool errThrow = true);
Jae Hyun Yoof78ec412018-10-25 10:42:39 -070020};