blob: daa7f24768e1039df3974656baceb9f364741d57 [file] [log] [blame]
Brad Bishop45387d62016-11-10 21:58:58 -06001description: >
2 Implement to provide sensor readings. Objects implementing
3 Sensor.Value must be instantiated in the correct
4 hierarchy within the sensors namespace. The following sensor
5 hierarchies are recognized:
6 temperature
7 fan_tach
8 voltage
9 altitude
Brad Bishop6c4e2e92016-12-28 13:38:31 -050010 current
11 power
12 energy
Brad Bishop45387d62016-11-10 21:58:58 -060013
14 Any service implementing Sensor.Value on one or more objects must
15 implement org.freedesktop.DBus.ObjectManager on the sensors namespace root.
16
17 All Sensor.Value properties are read-only.
18
19properties:
20 - name: Value
21 type: int64
22 description: >
23 The sensor reading.
24 - name: Unit
25 type: enum[self.Unit]
26 description: >
Patrick Venture573f1822017-11-08 10:18:18 -080027 The unit of the reading. Immutable once set for a sensor.
Brad Bishop45387d62016-11-10 21:58:58 -060028 For objects in the temperature namespace, Unit must be "DegreesC".
29 For objects in the fan_tach namespace, Unit must be "RPMS".
30 For objects in the voltage namespace, Unit must be "Volts".
31 For objects in the altitude namespace, Unit must be "Meters".
Brad Bishop6c4e2e92016-12-28 13:38:31 -050032 For objects in the current namespace, Unit must be "Amperes".
33 For objects in the power namespace, Unit must be "Watts".
34 For objects in the energy namespace, Unit must be "Joules".
Brad Bishop45387d62016-11-10 21:58:58 -060035 - name: Scale
36 type: int64
37 description: >
38 The reading scaling factor N, where the actual reading is Value * 10^N.
Patrick Venture573f1822017-11-08 10:18:18 -080039 This is immutable once set for a sensor.
Brad Bishop45387d62016-11-10 21:58:58 -060040
41enumerations:
42 - name: Unit
43 description: >
44 A sensor reading unit.
45 values:
46 - name: DegreesC
47 description: >
48 Temperature as degrees Celsius.
49 - name: RPMS
50 description: >
51 Frequency of rotation as revolutions per minute.
52 - name: Volts
53 description: >
54 Electomotive force as volts.
55 - name: Meters
56 description: >
57 Length as meters.
Brad Bishop6c4e2e92016-12-28 13:38:31 -050058 - name: Amperes
59 description: >
60 Electrical charge flow rate as Amperes.
61 - name: Watts
62 description: >
63 Rate of energy transfer as Watts.
64 - name: Joules
65 description: >
66 Energy transfer as Joules.
Brad Bishop45387d62016-11-10 21:58:58 -060067
68
69# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4