| commit | 74f835b014e6791b1783f689aa5c338879349e53 | [log] [tgz] |
|---|---|---|
| author | Patrick Williams <patrick@stwcx.xyz> | Wed Dec 18 11:22:16 2024 -0500 |
| committer | Patrick Williams <patrick@stwcx.xyz> | Wed Dec 18 11:22:16 2024 -0500 |
| tree | b2a1975b6eadf86d1f0296e71d7c844804460130 | |
| parent | 06f8874f26adff78f960c8937ce11b723ad31e87 [diff] |
clang-format: re-format for clang-19 clang-format-19 isn't compatible with the clang-format-18 output, so we need to reformat the code with the latest version. A few parameters in clang-tidy have been deprecated, so adjust the style file accordingly. See Ie2f6eb3b043f2d655c9df806815afd7971fd0947 for updated style. See I88192b41ab7a95599a90915013579608af7bc56f for clang-19 enablement. Change-Id: I370a946cb93cb5014f5d7ab2ae169bc996dd562e 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-sensorBy 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).