commit | 74d9bd92b9c679c18378d7099c23e6599b074532 | [log] [tgz] |
---|---|---|
author | Josh Lehan <krellan@google.com> | Thu Oct 31 08:51:58 2019 -0700 |
committer | Josh Lehan <krellan@google.com> | Tue Nov 05 19:17:55 2019 +0000 |
tree | 953ff60b16ee3c92ec32de18e0ab3549ffc3ce94 | |
parent | 2da370eef3a4bf6410a442c735bb0509d94e0887 [diff] |
PSUSensor: Individual customization of sensors This is a large patch, but it adds a great new feature. In the "Exposes" stanza of your Entity Manager JSON file, you can now customize the properties of each individual sensor. Each sensor, identified by one of the Labels strings, now accepts 4 optional parameters. They are x_Name, x_Scale, x_Min, x_Max, where x is the Labels string. This lets you customize the PSUProperty dynamically at runtime. If x_Name is given, it will take precedence, overriding the prefix/suffix synthesis usually performed by PSUSensor. If any of these parameters are not given, the hardcoded PSUProperty table will still be used as defaults. Example usage: { "Address": "0x34", "Bus": 12, "Name": "MyDevice", "Labels": ["vin", "vout1", "iin", "iout1"], "vin_Name": "MyDevice_Vin", "vin_Scale": 500, "vin_Min": 10.0, "vin_Max": 90.0, "vout1_Name": "MyDevice_Vout", "vout1_Scale": 1000, "vout1_Min": 5.0, "vout1_Max": 45.0, ... } Signed-off-by: Josh Lehan <krellan@google.com> Change-Id: I741b61d8192a3bff364461247f31ca20edda2198
dbus-sensors is a collection of sensor applications that provide the xyz.openbmc_project.Sensor collection of interfaces. They read sensor values from hwmon, d-bus, or direct driver access to provide readings. Some advance non-sensor features such as fan presence, pwm control, and automatic cpu detection (x86) are also supported.
runtime re-configurable from d-bus (entity-manager or the like)
isolated: each sensor type is isolated into its own daemon, so a bug in one sensor is unlikely to affect another, and single sensor modifications are possible
async single-threaded: uses sdbusplus/asio bindings
multiple data inputs: hwmon, d-bus, direct driver access