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