Documentation ¶
Index ¶
- Variables
- type Data
- type Device
- func (dev *Device) Close() error
- func (dev *Device) Interval() (time.Duration, error)
- func (dev *Device) Name() (string, error)
- func (dev *Device) NumData() (int, error)
- func (dev *Device) Read() (Data, error)
- func (dev *Device) ReadAll() ([]Data, error)
- func (dev *Device) Since() (time.Duration, error)
- func (dev *Device) Version() (string, error)
- type Quality
- type Server
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoData indicates a missing data point. // This may happen during sensor calibration. ErrNoData = errors.New("aranet4: no data") )
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data struct {
H, P, T float64
CO2 int
Battery int
Quality Quality
Interval time.Duration
Time time.Time
}
Data holds measured data samples provided by Aranet4.
type Quality ¶
type Quality int
Quality gives a general assessment of air quality (green/yellow/red).
- green: [ 0 - 1000) ppm
- yellow: [1000 - 1400) ppm
- red: [1400 - ...) ppm
Click to show internal directories.
Click to hide internal directories.