commit | d000018abdbdbe7b979e04bbaf2e1d62cad326c6 | [log] [tgz] |
---|---|---|
author | Lei YU <yulei.sh@bytedance.com> | Fri Feb 07 02:54:00 2025 +0000 |
committer | Lei YU <yulei.sh@bytedance.com> | Fri Feb 07 03:14:44 2025 +0000 |
tree | 4fc1aa9fc53537e446318e8b5c2e6e771ef9b972 | |
parent | be3c77faafa5a9993dcec4b9ac3586eefb84b781 [diff] |
clang-tidy: Enable bugprone-unchecked-optional-access Enable bugprone-unchecked-optional-access to detect the case that it accesses std::optional without checking empty. See https://gerrit.openbmc.org/c/openbmc/docs/+/78034 for details. Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: I6f35cc4585e681b7f4030b85295074b1564e8a48
phosphor-virtual-sensor reads the configuration file virtual_sensor_config.json
from one of three locations:
/var/lib/phosphor-virtual-sensor
/usr/share/phosphor-virtual-sensor
By default the repository will install a sample config into (3).
There are two types of data in this file.
See virtual_sensor_config.json
in this repository for an example. Sensors added this way can use any expression that is accepted by exprtk.
For example:
{ "Desc": { "Config": "D-Bus" } }
Sensors added this way can only use a set of restricted calculations. Currently supported types are Average
, Maximum
, Minimum
, Sum
and ModifiedMedian
.
The virtual sensor configuration information needs to be added into the relevant hardware configuration file in entity-manager. This method of adding a virtual sensor allows a recipe that builds for different hardware configurations to have different virtual sensors for each configuration.
The virtual sensor configuration in entity manager follows a different format to the JSON in virtual_sensor_config.json
(specified in entity-manager/schemas/VirtualSensor.json).