#pragma once #include "sensor.hpp" #include #include #include class PwmSensor { public: PwmSensor(const std::string& pwmname, const std::string& sysPath, std::shared_ptr& conn, sdbusplus::asio::object_server& objectServer, const std::string& sensorConfiguration, const std::string& sensorType, bool isValueMutable = false); ~PwmSensor(); private: std::string sysPath; sdbusplus::asio::object_server& objectServer; std::string name; std::shared_ptr sensorInterface; std::shared_ptr controlInterface; std::shared_ptr association; std::shared_ptr valueMutabilityInterface; double pwmMax; void setValue(uint32_t value); uint32_t getValue(bool errThrow = true); };