James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <sdbusplus/asio/object_server.hpp> |
| 4 | |
| 5 | class PwmSensor |
| 6 | { |
| 7 | public: |
Cheng C Yang | 916360b | 2019-05-07 18:47:16 +0800 | [diff] [blame^] | 8 | PwmSensor(const std::string& name, const std::string& sysPath, |
James Feist | 82bac4c | 2019-03-11 11:16:53 -0700 | [diff] [blame] | 9 | sdbusplus::asio::object_server& objectServer, |
| 10 | const std::string& sensorConfiguration); |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 11 | ~PwmSensor(); |
| 12 | |
| 13 | private: |
| 14 | std::string sysPath; |
| 15 | sdbusplus::asio::object_server& objectServer; |
| 16 | std::string name; |
| 17 | std::shared_ptr<sdbusplus::asio::dbus_interface> sensorInterface; |
| 18 | std::shared_ptr<sdbusplus::asio::dbus_interface> controlInterface; |
James Feist | 82bac4c | 2019-03-11 11:16:53 -0700 | [diff] [blame] | 19 | std::shared_ptr<sdbusplus::asio::dbus_interface> association; |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 20 | void setValue(uint32_t value); |
| 21 | uint32_t getValue(bool errThrow = true); |
Jae Hyun Yoo | 9ced0a3 | 2018-10-25 10:42:39 -0700 | [diff] [blame] | 22 | }; |