commit | 9492149041be80c06a46ffd54c7166e00e74dbd4 | [log] [tgz] |
---|---|---|
author | George Liu <liuxiwei@inspur.com> | Mon Aug 21 16:18:14 2023 +0800 |
committer | George Liu <liuxiwei@inspur.com> | Wed Aug 23 08:41:19 2023 +0800 |
tree | 22894e64e16bdf0838611582b58d8edbb44e336b | |
parent | ce4241cb7173b41ace52a272dc6a52295f949385 [diff] |
hardcode dbus name The busName variable is only used as the request_name parameter in the main method, so there is no need to explicitly declare a static variable. Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Ice0ef649e6bb648707bd36687fafdeb095254e40
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).