commit | ffe1834826cd45d3021ca489ada7fe7c5278769e | [log] [tgz] |
---|---|---|
author | Josh Lehan <krellan@google.com> | Wed Mar 17 13:29:51 2021 -0700 |
committer | Josh Lehan <krellan@google.com> | Fri Apr 02 01:41:12 2021 -0700 |
tree | 091a9bcefb71a69272ba3ccf8f2a1072e4a5215f | |
parent | 5a3b3f8a743d4a8e2db9991a3808d82d528264a1 [diff] |
Add external write hook to Sensor Adds a member variable to Sensor, a lambda, initialized to an empty function by default. By assigning this variable to their own lambda, a user of Sensor can receive notifications whenever an external write happens, without having to modify any code within Sensor itself. This is necessary to support ExternalSensor, but is generic enough to help other dbus-sensors daemons, should the need ever arise. Tested: In conjunction with ExternalSensor, works for me, external writes correctly cause the lambda to be executed. Signed-off-by: Josh Lehan <krellan@google.com> Change-Id: I67571327d870e7c718fa4f25e91a6598daabcf3d
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