commit | ff2df99659b149743ade62d93385bddcae4d261f | [log] [tgz] |
---|---|---|
author | Patrick Williams <patrick@stwcx.xyz> | Thu Aug 26 10:23:08 2021 -0500 |
committer | Patrick Williams <patrick@stwcx.xyz> | Thu Aug 26 10:23:31 2021 -0500 |
tree | 520179be1896f72c7e6012e70106e384d5a25098 | |
parent | 2344882dc030cf6d3ec51e2e626b5a97cebf32be [diff] |
build: set optimization and compile warnings Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I69f50c9c2da3725a66d331347df863319dfd3e82
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). In particular, the format for Thresholds is different. The following table shows the severity fields that correspond to a particular threshold.
Threshold | Severity |
---|---|
Warning | 0 |
Critical | 1 |
PerformanceLoss | 2 |
SoftShutdown | 3 |
HardShutdown | 4 |