commit | 150d5f6af7be3fbc3ac38f5dfab174830f08ee5b | [log] [tgz] |
---|---|---|
author | Patrick Williams <patrick@stwcx.xyz> | Fri Aug 16 15:21:45 2024 -0400 |
committer | Patrick Williams <patrick@stwcx.xyz> | Fri Aug 16 15:21:45 2024 -0400 |
tree | b7396210737ee7cb4825f19d04c1da8c98d1b30f | |
parent | 5f07fa36bbca2e9c02cb2b7f1dba0fa618a48cf9 [diff] |
clang-format: re-format for clang-18 clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda formatting also changed, so we have made changes to the organization default style format to better handle lambda formatting. See I5e08687e696dd240402a2780158664b7113def0e for updated style. See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement. Change-Id: I85f99c9dfb356b15f40667aa920fbaff1af015a3 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
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", "Type": "ModifiedMedian" } }
Sensors added this way can only use a set of restricted calculations. Currently the only type supported is 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).