Brad Bishop | 45387d6 | 2016-11-10 21:58:58 -0600 | [diff] [blame] | 1 | description: > |
| 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 Bishop | 6c4e2e9 | 2016-12-28 13:38:31 -0500 | [diff] [blame] | 10 | current |
| 11 | power |
| 12 | energy |
Brad Bishop | 45387d6 | 2016-11-10 21:58:58 -0600 | [diff] [blame] | 13 | |
| 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 | |
| 19 | properties: |
| 20 | - name: Value |
| 21 | type: int64 |
| 22 | description: > |
| 23 | The sensor reading. |
| 24 | - name: Unit |
| 25 | type: enum[self.Unit] |
| 26 | description: > |
Patrick Venture | 573f182 | 2017-11-08 10:18:18 -0800 | [diff] [blame] | 27 | The unit of the reading. Immutable once set for a sensor. |
Brad Bishop | 45387d6 | 2016-11-10 21:58:58 -0600 | [diff] [blame] | 28 | 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 Bishop | 6c4e2e9 | 2016-12-28 13:38:31 -0500 | [diff] [blame] | 32 | 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 Bishop | 45387d6 | 2016-11-10 21:58:58 -0600 | [diff] [blame] | 35 | - name: Scale |
| 36 | type: int64 |
| 37 | description: > |
| 38 | The reading scaling factor N, where the actual reading is Value * 10^N. |
Patrick Venture | 573f182 | 2017-11-08 10:18:18 -0800 | [diff] [blame] | 39 | This is immutable once set for a sensor. |
Brad Bishop | 45387d6 | 2016-11-10 21:58:58 -0600 | [diff] [blame] | 40 | |
| 41 | enumerations: |
| 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 Bishop | 6c4e2e9 | 2016-12-28 13:38:31 -0500 | [diff] [blame] | 58 | - 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 Bishop | 45387d6 | 2016-11-10 21:58:58 -0600 | [diff] [blame] | 67 | |
| 68 | |
| 69 | # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 |