1# phosphor-virtual-sensor
2
3phosphor-virtual-sensor reads in virtual_sensor_config.json
4There are two types of data in this file:
5
6## virtual sensor configuration information
7
8See virtual_sensor_config.json in this repository for an example. Sensors added
9this way can use any expression that is accepted by exprtk.
10
11## information to get a virtual sensor configuraton from D-Bus
12
13For example:
14
15```json
16{
17  "Desc": {
18    "Config": "D-Bus",
19    "Type": "ModifiedMedian"
20  }
21}
22```
23
24Sensors added this way can only use a set of restricted calculations. At this
25stage the only type supported is modifiedMedian.
26
27The virtual sensor configuration information needs to be added into the
28relevant hardware configuration file in entity-manager. This method of adding a
29virtual sensor allows a recipe that builds for different hardware
30configurations to have different virtual sensors for each configuration.
31
32The virtual sensor configuration in entity manager follows a different format
33to the JSON in virtual_sensor_config.json (specified in
34[entity-manager/schemas/VirtualSensor.json](https://github.com/openbmc/entity-manager/blob/master/schemas/VirtualSensor.json)).
35