PKGBUILD/pkg/sensor/interfaces.go

16 lines
473 B
Go
Raw Normal View History

package sensor
2019-06-15 13:58:41 +00:00
import "github.com/go-flucky/flucky/pkg/types"
// HumiditySensor is a interface to describe required functions to measure humidities
type HumiditySensor interface {
GetSensorModel() types.SensorModel
ReadHumidity() (*types.Humidity, error)
}
// TemperatureSensor is a interface to describe required functions to measure temperatures
type TemperatureSensor interface {
GetSensorModel() types.SensorModel
ReadTemperature() (*types.Temperature, error)
}