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 maximum values. |
| 3 | The values are the maximum values within a time period. The object this |
| 4 | interface is placed on should provide information about the time period. |
| 5 | |
| 6 | properties: |
| 7 | - name: Scale |
| 8 | type: int64 |
| 9 | description: > |
Patrick Williams | a134741 | 2022-12-06 10:56:22 -0600 | [diff] [blame] | 10 | The reading scaling factor N, where the actual reading is value * |
| 11 | 10^N. This is immutable once set. |
Matt Spinler | f7616bc | 2019-11-19 09:23:37 -0600 | [diff] [blame] | 12 | |
| 13 | - name: Unit |
| 14 | type: enum[self.Unit] |
| 15 | description: > |
Patrick Williams | a134741 | 2022-12-06 10:56:22 -0600 | [diff] [blame] | 16 | The unit of the reading. Immutable once set for a sensor. For objects |
| 17 | in the temperature namespace, Unit must be "DegreesC". For objects in |
| 18 | the fan_tach namespace, Unit must be "RPMS". For objects in the |
| 19 | voltage namespace, Unit must be "Volts". For objects in the altitude |
| 20 | namespace, Unit must be "Meters". For objects in the current |
| 21 | namespace, Unit must be "Amperes". For objects in the power namespace, |
| 22 | Unit must be "Watts". For objects in the energy namespace, Unit must |
| 23 | be "Joules". |
Matt Spinler | f7616bc | 2019-11-19 09:23:37 -0600 | [diff] [blame] | 24 | |
| 25 | - name: Values |
| 26 | type: array[struct[uint64,int64]] |
| 27 | description: > |
| 28 | An array of timestamp, maximum 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. |