Matt Spinler | f7616bc | 2019-11-19 09:23:37 -0600 | [diff] [blame] | 1 | description: > |
| 2 | Implement to provide an object that contains a history of averages. The |
| 3 | object this interface is placed on should provide information about the |
| 4 | duration the average is calculated over. |
| 5 | |
| 6 | properties: |
| 7 | - name: Scale |
| 8 | type: int64 |
| 9 | description: > |
| 10 | The reading scaling factor N, where the actual reading is value * 10^N. |
| 11 | This is immutable once set. |
| 12 | |
| 13 | - name: Unit |
| 14 | type: enum[self.Unit] |
| 15 | description: > |
| 16 | The unit of the reading. Immutable once set for a sensor. |
| 17 | For objects in the temperature namespace, Unit must be "DegreesC". |
| 18 | For objects in the fan_tach namespace, Unit must be "RPMS". |
| 19 | For objects in the voltage namespace, Unit must be "Volts". |
| 20 | For objects in the altitude namespace, Unit must be "Meters". |
| 21 | For objects in the current namespace, Unit must be "Amperes". |
| 22 | For objects in the power namespace, Unit must be "Watts". |
| 23 | For objects in the energy namespace, Unit must be "Joules". |
| 24 | |
| 25 | - name: Values |
| 26 | type: array[struct[uint64,int64]] |
| 27 | description: > |
| 28 | An array of timestamp, average value tuples. The timestamp is the |
| 29 | number of milliseconds since 1970. The entries in the array will |
| 30 | always be ordered from newest to oldest. |
| 31 | |
| 32 | enumerations: |
| 33 | - name: Unit |
| 34 | description: > |
Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 35 | A sensor reading unit. |
Matt Spinler | f7616bc | 2019-11-19 09:23:37 -0600 | [diff] [blame] | 36 | values: |
Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 37 | - name: DegreesC |
| 38 | description: > |
| 39 | Temperature as degrees Celsius. |
| 40 | - name: RPMS |
| 41 | description: > |
| 42 | Frequency of rotation as revolutions per minute. |
| 43 | - name: Volts |
| 44 | description: > |
| 45 | Electromotive force as volts. |
| 46 | - name: Meters |
| 47 | description: > |
| 48 | Length as meters. |
| 49 | - name: Amperes |
| 50 | description: > |
| 51 | Electrical charge flow rate as Amperes. |
| 52 | - name: Watts |
| 53 | description: > |
| 54 | Rate of energy transfer as Watts. |
| 55 | - name: Joules |
| 56 | description: > |
| 57 | Energy transfer as Joules. |