blob: 9510dff6ba2f3e4e0b0c5483bf9c3f02879d789c [file] [log] [blame]
#pragma once
#include "interfaces.hpp"
#include "sysfs/util.hpp"
#include <string>
/*
* A WriteInterface that is expecting a path that's sysfs, but really could be
* any filesystem path.
*/
class SysFsWritePercent : public WriteInterface
{
public:
SysFsWritePercent(const std::string& writepath, int64_t min, int64_t max) :
WriteInterface(min, max), _writepath(FixupPath(writepath))
{
}
void write(double value) override;
private:
std::string _writepath;
};
class SysFsWrite : public WriteInterface
{
public:
SysFsWrite(const std::string& writepath, int64_t min, int64_t max) :
WriteInterface(min, max), _writepath(FixupPath(writepath))
{
}
void write(double value) override;
private:
std::string _writepath;
};