1 #pragma once 2 3 #include <string> 4 5 namespace pid_control 6 { 7 8 /* This program assumes sensors use the Sensor.Value interface 9 * and for sensor->write() I only implemented sysfs as a type, 10 * but -- how would it know whether to use Control.FanSpeed or Control.FanPwm? 11 * 12 * One could get the interface list for the object and search for Control.* 13 * but, it needs to know the maximum, minimum. The only sensors it wants to 14 * write in this code base are Fans... 15 */ 16 enum class IOInterfaceType 17 { 18 NONE, // There is no interface. 19 EXTERNAL, 20 DBUSPASSIVE, 21 DBUSACTIVE, // This means for write that it needs to look up the interface. 22 SYSFS, 23 UNKNOWN 24 }; 25 26 /* WriteInterfaceType is different because Dbusactive/passive. how to know... */ 27 IOInterfaceType getWriteInterfaceType(const std::string& path); 28 29 IOInterfaceType getReadInterfaceType(const std::string& path); 30 31 } // namespace pid_control 32