blob: fdc777275dd16702dcdb7709e101c215b02861bc [file] [log] [blame]
Patrick Venturee6206562018-03-08 15:36:53 -08001#pragma once
2
Patrick Ventureda064282018-06-12 19:33:47 -07003#include <string>
4
Patrick Venturee6206562018-03-08 15:36:53 -08005/* This program assumes sensors use the Sensor.Value interface
6 * and for sensor->write() I only implemented sysfs as a type,
7 * but -- how would it know whether to use Control.FanSpeed or Control.FanPwm?
8 *
9 * One could get the interface list for the object and search for Control.*
Patrick Ventureda4a5dd2018-08-31 09:42:48 -070010 * but, it needs to know the maximum, minimum. The only sensors it wants to
11 * write in this code base are Fans...
Patrick Venturee6206562018-03-08 15:36:53 -080012 */
13enum class IOInterfaceType
14{
15 NONE, // There is no interface.
16 EXTERNAL,
17 DBUSPASSIVE,
18 DBUSACTIVE, // This means for write that it needs to look up the interface.
19 SYSFS,
20 UNKNOWN
21};
22
23/* WriteInterfaceType is different because Dbusactive/passive. how to know... */
Patrick Venture7af157b2018-10-30 11:24:40 -070024IOInterfaceType getWriteInterfaceType(const std::string& path);
Patrick Venturee6206562018-03-08 15:36:53 -080025
Patrick Venture7af157b2018-10-30 11:24:40 -070026IOInterfaceType getReadInterfaceType(const std::string& path);