measurement.go 354 B

123456789101112131415161718
  1. package temperature
  2. type BatteryState int
  3. const (
  4. BATT_NOT_AVAILABLE BatteryState = -1
  5. BATT_BAD BatteryState = 0
  6. BATT_GOOD BatteryState = 1
  7. )
  8. // Measurement provides an interface for each reading
  9. type Measurement struct {
  10. // ID of the sensor
  11. ID int
  12. // Temperature in celcius
  13. Temperature float64
  14. BatteryState BatteryState
  15. }