Sensor Objects

This includes all the sensor objects including a few
implementations, including dbus and sysfs sensors.

Change-Id: I9897c79f9fd463f00f0e02aeb6c32ffa89635dbe
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/sysfs/sysfswrite.hpp b/sysfs/sysfswrite.hpp
new file mode 100644
index 0000000..9f7083c
--- /dev/null
+++ b/sysfs/sysfswrite.hpp
@@ -0,0 +1,39 @@
+#pragma once
+
+#include <string>
+
+#include "interfaces.hpp"
+#include "sysfs/util.hpp"
+
+
+/*
+ * A WriteInterface that is expecting a path that's sysfs, but really could be
+ * any filesystem path.
+ */
+class SysFsWritePercent : public WriteInterface
+{
+    public:
+        SysFsWritePercent(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(std::string& writepath, int64_t min, int64_t max)
+            : WriteInterface(min, max),
+              _writepath(FixupPath(writepath))
+        { }
+
+        void write(double value) override;
+
+    private:
+        std::string _writepath;
+};