Patrick Venture | e620656 | 2018-03-08 15:36:53 -0800 | [diff] [blame] | 1 | #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 | */ |
| 11 | enum 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... */ |
| 22 | IOInterfaceType GetWriteInterfaceType(const std::string& path); |
| 23 | |
| 24 | IOInterfaceType GetReadInterfaceType(const std::string& path); |
| 25 | |