commit | 71b9c11676a08d7659c0d88a39c4de688d0feedd | [log] [tgz] |
---|---|---|
author | Matt Spinler <spinler@us.ibm.com> | Tue Oct 18 09:14:45 2022 -0500 |
committer | Matt Spinler <spinler@us.ibm.com> | Tue Oct 18 09:23:38 2022 -0500 |
tree | 4d1362fffa2908ab943192e2c2e9e7b6180f8966 | |
parent | f7ec40aa6c804f5e6a01a06b5a705bbb2168c63a [diff] |
Throw the exception on the EM D-Bus fail Throw the exception that occurs when there is a D-Bus failure when trying to talk to entity-manager instead of the name of the exception, and also add a trace that says entity-manager is the culprit. Nothing was actually printing the exception name on the crash, it would just have: terminate called after throwing an instance of 'char const*' Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I91eb65468a9a799bcd7256aae24a1121164b59b9
phosphor-virtual-sensor reads in virtual_sensor_config.json 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. At this stage 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).