blob: 9429099d45bbfee6b866f6b8054ff544360da361 [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);
20};