blob: 2c5eccdf2bfa3a278a6a8697ab1c1c8c4d600ca9 [file] [log] [blame]
#pragma once
/* 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);