Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | Today | - | ||||
subprojects/ | H | 08-Dec-2023 | - | 32 | 23 | |
test/ | H | 08-Oct-2023 | - | 74 | 55 | |
.clang-format | H A D | 17-Aug-2024 | 3.7 KiB | 137 | 135 | |
.editorconfig | H A D | 02-May-2022 | 109 | 7 | 6 | |
.gitignore | H A D | 04-Feb-2022 | 42 | 4 | 3 | |
.prettierrc.yaml | H A D | 05-Sep-2024 | 115 | 8 | 7 | |
LICENSE | H A D | 04-Feb-2022 | 549 | 14 | 10 | |
OWNERS | H A D | 27-Jul-2022 | 1.6 KiB | 49 | 44 | |
README.md | H A D | 02-Nov-2024 | 1.4 KiB | 42 | 29 | |
calculate.cpp | H A D | 16-Oct-2024 | 2.2 KiB | 82 | 69 | |
calculate.hpp | H A D | 31-Aug-2024 | 330 | 16 | 11 | |
dbusSensor.cpp | H A D | 17-Aug-2024 | 4.2 KiB | 152 | 125 | |
dbusSensor.hpp | H A D | 01-Dec-2023 | 1.8 KiB | 67 | 29 | |
dbusUtils.cpp | H A D | 18-Jun-2024 | 2.6 KiB | 82 | 65 | |
dbusUtils.hpp | H A D | 01-Dec-2023 | 1.2 KiB | 43 | 31 | |
exprtkTools.hpp | H A D | 17-Aug-2024 | 3.4 KiB | 113 | 74 | |
main.cpp | H A D | 28-Oct-2024 | 590 | 25 | 12 | |
meson.build | H A D | 28-Oct-2024 | 1.5 KiB | 66 | 59 | |
meson.options | H A D | 08-Oct-2023 | 61 | 2 | 1 | |
phosphor-virtual-sensor.service.in | H A D | 15-Feb-2023 | 226 | 13 | 10 | |
thresholds.hpp | H A D | 01-Dec-2023 | 11.8 KiB | 455 | 348 | |
virtualSensor.cpp | H A D | 02-Nov-2024 | 29.5 KiB | 921 | 767 | |
virtualSensor.hpp | H A D | 31-Aug-2024 | 10.6 KiB | 303 | 182 | |
virtual_sensor_config.json | H A D | 05-Sep-2024 | 1.2 KiB | 49 | 48 |
README.md
1# phosphor-virtual-sensor 2 3phosphor-virtual-sensor reads the configuration file 4`virtual_sensor_config.json` from one of three locations: 5 61. The current directory. 72. `/var/lib/phosphor-virtual-sensor` 83. `/usr/share/phosphor-virtual-sensor` 9 10By default the repository will install a sample config into (3). 11 12There are two types of data in this file. 13 14## virtual sensor configuration information 15 16See `virtual_sensor_config.json` in this repository for an example. Sensors 17added this way can use any expression that is accepted by exprtk. 18 19## information to get a virtual sensor configuration from D-Bus 20 21For example: 22 23```json 24{ 25 "Desc": { 26 "Config": "D-Bus" 27 } 28} 29``` 30 31Sensors added this way can only use a set of restricted calculations. Currently 32supported types are `Average`, `Maximum`, `Minimum`, `Sum` and `ModifiedMedian`. 33 34The virtual sensor configuration information needs to be added into the relevant 35hardware configuration file in entity-manager. This method of adding a virtual 36sensor allows a recipe that builds for different hardware configurations to have 37different virtual sensors for each configuration. 38 39The virtual sensor configuration in entity manager follows a different format to 40the JSON in `virtual_sensor_config.json` (specified in 41[entity-manager/schemas/VirtualSensor.json](https://github.com/openbmc/entity-manager/blob/master/schemas/virtual_sensor.json)). 42