Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Concentration ¶
type Concentration struct { // Gas is a descriptive string identifying the gas or group of gasses included in the concentration Gas string // Amount is the mass concentration of gas in a volume of air Amount units.Concentration }
Concentration is a measurement of gas concentrations
type ConcentrationSpec ¶
type ConcentrationSpec struct { // Gas is a descriptive string identifying the gas or group of gasses included in the concentration Gas string // Resolution is the smallest increment of measurement from the sensor Resolution units.Concentration // MinConcentration is the minimum valid measurement from the sensor MinConcentration units.Concentration // MaxConcentration is the maximum valid measurement from the sensor MaxConcentration units.Concentration }
ConcentrationSpec is a specification of valid measurement ranges supported by the sensor
type Consumer ¶
type Consumer struct {
// contains filtered or unexported fields
}
Consumer is a consumer of gas concentrations
func NewConsumer ¶
NewConsumer returns a new Consumer with the configured handlers
type GasSensor ¶
type GasSensor interface { // Run begins reading from the sensor and blocks until either an error occurs or the context is completed Run(context.Context) error // Concentrations returns a channel of gas concentration readings as they become available from the sensor Concentrations() <-chan *Concentration // ConcentrationSpecs returns a collection of specified measurement ranges supported by the sensor ConcentrationSpecs() []*ConcentrationSpec }
GasSensor defines a sensor for measuring concentrations of gas in air
Click to show internal directories.
Click to hide internal directories.