xref: /openbmc/phosphor-dbus-interfaces/yaml/xyz/openbmc_project/Sensor/Value.interface.yaml (revision 1f7befd2490bed95e38efa75a540cbdbb9823600)
1description: >
2    Implement to provide sensor readings.  Objects implementing Sensor.Value
3    must be instantiated in the correct hierarchy within the sensors
4    namespace.  The following sensor hierarchies are recognized:
5      airflow
6      altitude
7      current
8      energy
9      fan_tach
10      frequency
11      humidity
12      liquidflow
13      power
14      pressure
15      temperature
16      utilization
17      valve
18      voltage
19
20    Any service implementing Sensor.Value on one or more objects must implement
21    org.freedesktop.DBus.ObjectManager on /xyz/openbmc_project/sensors.
22
23    All Sensor.Value properties are read-only, unless the
24    xyz.openbmc_project.Sensor.ValueMutability interface is present on the same
25    object path. In that case, refer to the docs for ValueMutability interface.
26
27properties:
28    - name: Value
29      type: double
30      description: >
31          The sensor reading.
32    - name: MaxValue
33      type: double
34      default: infinity
35      description: >
36          The Maximum supported sensor reading.
37    - name: MinValue
38      type: double
39      default: -infinity
40      description: >
41          The Minimum supported sensor reading.
42    - name: Unit
43      type: enum[self.Unit]
44      description: >
45          The unit of the reading.  Immutable once set for a sensor. For objects
46          in the airflow namespace, Unit must be "CFM" For objects in the
47          altitude namespace, Unit must be "Meters". For objects in the current
48          namespace, Unit must be "Amperes". For objects in the energy
49          namespace, Unit must be "Joules". For objects in the fan_tach
50          namespace, Unit must be "RPMS". For objects in the humidity namespace,
51          Unit must be "PercentRH" For objects in the power namespace, Unit must
52          be "Watts". For objects in the pressure namespace, Unit must be
53          "Pascals" For objects in the temperature namespace, Unit must be
54          "DegreesC". For objects in the utilization namespace, Unit must be
55          "Percent" For objects in the voltage namespace, Unit must be "Volts",
56          For objects in the liquidflow namespace, Unit must be "LPM". For
57          objects in the frequency namespace, Unit must be "Hertz". For objects
58          in the valve namespace, Unit must be "Percent".
59
60enumerations:
61    - name: Unit
62      description: >
63          A sensor reading unit.
64      values:
65          - name: Amperes
66            description: >
67                Electrical charge flow rate as Amperes.
68          - name: CFM
69            description: >
70                To calculate Air Flow in Cubic Feet per Minute
71          - name: DegreesC
72            description: >
73                Temperature as degrees Celsius.
74          - name: Hertz
75            description: >
76                Frequency in Hertz
77          - name: Joules
78            description: >
79                Energy transfer as Joules.
80          - name: LPM
81            description: >
82                To calculate the liquid flow in Liters Per Minute.
83          - name: Meters
84            description: >
85                Length as meters.
86          - name: Percent
87            description: >
88                Resource utilization as a percentage.
89          - name: PercentRH
90            description: >
91                Relative humidity as a percentage.
92          - name: Pascals
93            description: >
94                Pressure as pascals.
95          - name: RPMS
96            description: >
97                Frequency of rotation as revolutions per minute.
98          - name: Volts
99            description: >
100                Electromotive force as volts.
101          - name: Watts
102            description: >
103                Rate of energy transfer as Watts.
104
105associations:
106    - name: inventory
107      description: >
108          Sensors may implement an 'inventory' to 'sensors' association with the
109          inventory item related to it.
110      reverse_names:
111          - sensors
112      required_endpoint_interfaces:
113          - xyz.openbmc_project.Inventory.Item
114    - name: monitoring
115      description: >
116          Sensors may monitor the BMC's resource utilization and implement an
117          association to the Bmc item.
118      reverse_names:
119          - monitored_by
120      required_endpoint_interfaces:
121          - xyz.openbmc_project.Inventory.Item.Bmc
122
123paths:
124    - namespace: /xyz/openbmc_project/sensors
125      segments:
126          - name: Airflow
127            value: airflow
128          - name: Altitude
129            value: altitude
130          - name: Current
131            value: current
132          - name: Energy
133            value: energy
134          - name: FanTach
135            value: fan_tach
136          - name: Frequency
137            value: frequency
138          - name: Humidity
139            value: humidity
140          - name: Liquidflow
141            value: liquidflow
142          - name: Power
143            value: power
144          - name: Pressure
145            value: pressure
146          - name: Temperature
147            value: temperature
148          - name: Utilization
149            value: utilization
150          - name: Valve
151            value: valve
152            description: >
153                This path segment implements the value interface for the valve,
154                representing its open status.
155          - name: Voltage
156            value: voltage
157