Rashmica Gupta | e23af56 | 2021-07-29 15:12:16 +1000 | [diff] [blame] | 1 | { |
| 2 | "$schema": "http://json-schema.org/draft-07/schema#", |
Patrick Williams | 7d6080d | 2024-09-04 12:54:45 -0400 | [diff] [blame] | 3 | "$defs": { |
Rashmica Gupta | e23af56 | 2021-07-29 15:12:16 +1000 | [diff] [blame] | 4 | "VirtualSensor": { |
Alexander Hansen | cb68f36 | 2025-04-16 17:18:13 +0200 | [diff] [blame] | 5 | "additionalProperties": false, |
Rashmica Gupta | e23af56 | 2021-07-29 15:12:16 +1000 | [diff] [blame] | 6 | "title": "phosphor-virtual-sensor configuration", |
Andrew Jeffery | bb8aa37 | 2024-03-20 11:24:32 +1030 | [diff] [blame] | 7 | "description": "The configuration used by the virtual-sensor daemon in the phosphor-virtual-sensor repository. Virtual sensors are xyz.openbmc_project.Sensor.Value D-Bus objects that have sensor values calculated from the D-Bus sensors listed here.", |
Rashmica Gupta | e23af56 | 2021-07-29 15:12:16 +1000 | [diff] [blame] | 8 | "type": "object", |
| 9 | "properties": { |
| 10 | "MaxValidInput": { |
Andrew Jeffery | bb8aa37 | 2024-03-20 11:24:32 +1030 | [diff] [blame] | 11 | "description": "Maximum valid value of an input sensor", |
Rashmica Gupta | e23af56 | 2021-07-29 15:12:16 +1000 | [diff] [blame] | 12 | "type": "number" |
| 13 | }, |
| 14 | "MaxValue": { |
Andrew Jeffery | bb8aa37 | 2024-03-20 11:24:32 +1030 | [diff] [blame] | 15 | "description": "Maximum sensor value", |
Patrick Williams | 7d6080d | 2024-09-04 12:54:45 -0400 | [diff] [blame] | 16 | "$ref": "legacy.json#/$defs/Types/MaxValue" |
Rashmica Gupta | e23af56 | 2021-07-29 15:12:16 +1000 | [diff] [blame] | 17 | }, |
| 18 | "MinValidInput": { |
Andrew Jeffery | bb8aa37 | 2024-03-20 11:24:32 +1030 | [diff] [blame] | 19 | "description": "Miniumum valid value of an input sensor", |
Rashmica Gupta | e23af56 | 2021-07-29 15:12:16 +1000 | [diff] [blame] | 20 | "type": "number" |
| 21 | }, |
| 22 | "MinValue": { |
Andrew Jeffery | bb8aa37 | 2024-03-20 11:24:32 +1030 | [diff] [blame] | 23 | "description": "Minimum sensor value", |
Patrick Williams | 7d6080d | 2024-09-04 12:54:45 -0400 | [diff] [blame] | 24 | "$ref": "legacy.json#/$defs/Types/MinValue" |
Rashmica Gupta | e23af56 | 2021-07-29 15:12:16 +1000 | [diff] [blame] | 25 | }, |
| 26 | "Name": { |
| 27 | "type": "string" |
| 28 | }, |
Alexander Hansen | cb68f36 | 2025-04-16 17:18:13 +0200 | [diff] [blame] | 29 | "PowerState": { |
| 30 | "$ref": "legacy.json#/$defs/Types/PowerState" |
| 31 | }, |
| 32 | "EntityId": { |
| 33 | "$ref": "legacy.json#/$defs/Types/EntityId" |
| 34 | }, |
| 35 | "EntityInstance": { |
| 36 | "$ref": "legacy.json#/$defs/Types/EntityInstance" |
| 37 | }, |
Rashmica Gupta | e23af56 | 2021-07-29 15:12:16 +1000 | [diff] [blame] | 38 | "Sensors": { |
Andrew Jeffery | bb8aa37 | 2024-03-20 11:24:32 +1030 | [diff] [blame] | 39 | "description": "Any DBus sensors whose values are used to determine the value of the virtual sensor.", |
Rashmica Gupta | e23af56 | 2021-07-29 15:12:16 +1000 | [diff] [blame] | 40 | "items": { |
| 41 | "type": "string" |
| 42 | }, |
| 43 | "type": "array" |
| 44 | }, |
| 45 | "Thresholds": { |
Andrew Jeffery | bb8aa37 | 2024-03-20 11:24:32 +1030 | [diff] [blame] | 46 | "description": "Threshold values used to set and clear alarms", |
Patrick Williams | 7d6080d | 2024-09-04 12:54:45 -0400 | [diff] [blame] | 47 | "$ref": "legacy.json#/$defs/Types/Thresholds" |
Rashmica Gupta | e23af56 | 2021-07-29 15:12:16 +1000 | [diff] [blame] | 48 | }, |
| 49 | "Type": { |
Andrew Jeffery | bb8aa37 | 2024-03-20 11:24:32 +1030 | [diff] [blame] | 50 | "description": "The type of calculation this sensor uses.", |
Rashmica Gupta | e23af56 | 2021-07-29 15:12:16 +1000 | [diff] [blame] | 51 | "type": "string", |
George Liu | ae36f5e | 2024-09-19 15:43:04 +0800 | [diff] [blame] | 52 | "enum": [ |
| 53 | "Average", |
| 54 | "Maximum", |
| 55 | "Minimum", |
| 56 | "Sum", |
| 57 | "ModifiedMedian" |
| 58 | ] |
Rashmica Gupta | e23af56 | 2021-07-29 15:12:16 +1000 | [diff] [blame] | 59 | }, |
| 60 | "Units": { |
Andrew Jeffery | bb8aa37 | 2024-03-20 11:24:32 +1030 | [diff] [blame] | 61 | "description": "The sensor type, as it shows up in the D-Bus object name.", |
Patrick Williams | 7d6080d | 2024-09-04 12:54:45 -0400 | [diff] [blame] | 62 | "$ref": "legacy.json#/$defs/Types/Units" |
Rashmica Gupta | e23af56 | 2021-07-29 15:12:16 +1000 | [diff] [blame] | 63 | } |
| 64 | }, |
Patrick Williams | fa8ee87 | 2022-12-07 07:00:42 -0600 | [diff] [blame] | 65 | "required": ["Name", "Sensors", "Type", "Units"] |
Rashmica Gupta | e23af56 | 2021-07-29 15:12:16 +1000 | [diff] [blame] | 66 | } |
| 67 | } |
| 68 | } |