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. |
James Feist | 8a3b49d | 2018-01-22 16:11:43 -0800 | [diff] [blame] | 24 | - name: MaxValue |
| 25 | type: int64 |
| 26 | description: > |
| 27 | The Maximum supported sensor reading. |
| 28 | - name: MinValue |
| 29 | type: int64 |
| 30 | description: > |
| 31 | The Minimum supported sensor reading. |
Brad Bishop | 45387d6 | 2016-11-10 21:58:58 -0600 | [diff] [blame] | 32 | - name: Unit |
| 33 | type: enum[self.Unit] |
| 34 | description: > |
Patrick Venture | 573f182 | 2017-11-08 10:18:18 -0800 | [diff] [blame] | 35 | The unit of the reading. Immutable once set for a sensor. |
Brad Bishop | 45387d6 | 2016-11-10 21:58:58 -0600 | [diff] [blame] | 36 | For objects in the temperature namespace, Unit must be "DegreesC". |
| 37 | For objects in the fan_tach namespace, Unit must be "RPMS". |
| 38 | For objects in the voltage namespace, Unit must be "Volts". |
| 39 | For objects in the altitude namespace, Unit must be "Meters". |
Brad Bishop | 6c4e2e9 | 2016-12-28 13:38:31 -0500 | [diff] [blame] | 40 | For objects in the current namespace, Unit must be "Amperes". |
| 41 | For objects in the power namespace, Unit must be "Watts". |
| 42 | For objects in the energy namespace, Unit must be "Joules". |
Brad Bishop | 45387d6 | 2016-11-10 21:58:58 -0600 | [diff] [blame] | 43 | - name: Scale |
| 44 | type: int64 |
| 45 | description: > |
| 46 | 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] | 47 | This is immutable once set for a sensor. |
Brad Bishop | 45387d6 | 2016-11-10 21:58:58 -0600 | [diff] [blame] | 48 | |
| 49 | enumerations: |
| 50 | - name: Unit |
| 51 | description: > |
| 52 | A sensor reading unit. |
| 53 | values: |
| 54 | - name: DegreesC |
| 55 | description: > |
| 56 | Temperature as degrees Celsius. |
| 57 | - name: RPMS |
| 58 | description: > |
| 59 | Frequency of rotation as revolutions per minute. |
| 60 | - name: Volts |
| 61 | description: > |
| 62 | Electomotive force as volts. |
| 63 | - name: Meters |
| 64 | description: > |
| 65 | Length as meters. |
Brad Bishop | 6c4e2e9 | 2016-12-28 13:38:31 -0500 | [diff] [blame] | 66 | - name: Amperes |
| 67 | description: > |
| 68 | Electrical charge flow rate as Amperes. |
| 69 | - name: Watts |
| 70 | description: > |
| 71 | Rate of energy transfer as Watts. |
| 72 | - name: Joules |
| 73 | description: > |
| 74 | Energy transfer as Joules. |
Brad Bishop | 45387d6 | 2016-11-10 21:58:58 -0600 | [diff] [blame] | 75 | |
| 76 | |
| 77 | # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 |