Move the sensor utils into their own module

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I22f6a951921095660fd2be502e59a38161565a95
diff --git a/sensors/build_utils.hpp b/sensors/build_utils.hpp
new file mode 100644
index 0000000..bb2b41c
--- /dev/null
+++ b/sensors/build_utils.hpp
@@ -0,0 +1,31 @@
+#pragma once
+
+#include <string>
+
+namespace pid_control
+{
+
+/* This program assumes sensors use the Sensor.Value interface
+ * and for sensor->write() I only implemented sysfs as a type,
+ * but -- how would it know whether to use Control.FanSpeed or Control.FanPwm?
+ *
+ * One could get the interface list for the object and search for Control.*
+ * but, it needs to know the maximum, minimum.  The only sensors it wants to
+ * write in this code base are Fans...
+ */
+enum class IOInterfaceType
+{
+    NONE, // There is no interface.
+    EXTERNAL,
+    DBUSPASSIVE,
+    DBUSACTIVE, // This means for write that it needs to look up the interface.
+    SYSFS,
+    UNKNOWN
+};
+
+/* WriteInterfaceType is different because Dbusactive/passive. how to know... */
+IOInterfaceType getWriteInterfaceType(const std::string& path);
+
+IOInterfaceType getReadInterfaceType(const std::string& path);
+
+} // namespace pid_control