Documentation ¶
Index ¶
- Variables
- type Data
- type Device
- func (dev *Device) Close() error
- func (dev *Device) Interval() (time.Duration, error)
- func (dev *Device) Name() string
- 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 Message
- 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 Message ¶ added in v0.9.0
type Message struct { Root string `json:"root"` Devices []string `json:"devices"` DeviceID string `json:"device_id"` Status string `json:"status"` Refresh int `json:"refresh"` From string `json:"from"` To string `json:"to"` Plots struct { H string `json:"h"` P string `json:"p"` T string `json:"t"` CO2 string `json:"co2"` } `json:"plots"` }
Message holds informations about a device.
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
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
aranet4-daq
Command aranet4-daq retrieves data from an Aranet4 device and uploads it to an HTTP server.
|
Command aranet4-daq retrieves data from an Aranet4 device and uploads it to an HTTP server. |
Click to show internal directories.
Click to hide internal directories.