Name Date Size #Lines LOC

..Today-

subprojects/H08-Dec-2023-3223

test/H08-Oct-2023-7455

.clang-formatH A D19-Dec-20243.7 KiB137135

.editorconfigH A D02-May-2022109 76

.gitignoreH A D04-Feb-202242 43

.prettierrc.yamlH A D05-Sep-2024115 87

LICENSEH A D04-Feb-2022549 1410

OWNERSH A D27-Jul-20221.6 KiB4944

README.mdH A D02-Nov-20241.4 KiB4229

calculate.cppH A D16-Oct-20242.2 KiB8269

calculate.hppH A D31-Aug-2024330 1611

dbusSensor.cppH A D17-Aug-20244.2 KiB152125

dbusSensor.hppH A D01-Dec-20231.8 KiB6729

dbusUtils.cppH A D18-Jun-20242.6 KiB8265

dbusUtils.hppH A D01-Dec-20231.2 KiB4331

exprtkTools.hppH A D17-Aug-20243.4 KiB11374

main.cppH A D28-Oct-2024590 2512

meson.buildH A D28-Oct-20241.5 KiB6659

meson.optionsH A D08-Oct-202361 21

phosphor-virtual-sensor.service.inH A D15-Feb-2023226 1310

thresholds.hppH A D01-Dec-202311.8 KiB455348

virtualSensor.cppH A D02-Nov-202429.5 KiB921767

virtualSensor.hppH A D31-Aug-202410.6 KiB303182

virtual_sensor_config.jsonH A D05-Sep-20241.2 KiB4948

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