refac(pkg/sensor): temperature measurement unit

This commit is contained in:
2019-06-23 14:17:57 +02:00
parent 3bb10a4f78
commit 5e03d987c5
19 changed files with 91 additions and 76 deletions

View File

@ -18,7 +18,7 @@ type HumiditySensor interface {
// TemperatureSensor is a interface to describe required functions to measure temperatures
type TemperatureSensor interface {
GetSensorModel() types.SensorModel
ReadTemperature(degree types.Degree, round float64) (*types.Temperature, error)
ReadTemperatureWriteIntoChannel(degree types.Degree, round float64, temperatureChannel chan<- *types.Temperature, errorChannel chan<- error, wg *sync.WaitGroup)
ReadTemperatureContinously(ctx context.Context, degree types.Degree, round float64, temperatureChannel chan<- *types.Temperature, errorChannel chan<- error)
ReadTemperature(degree types.TemperatureUnit, round float64) (*types.Temperature, error)
ReadTemperatureWriteIntoChannel(degree types.TemperatureUnit, round float64, temperatureChannel chan<- *types.Temperature, errorChannel chan<- error, wg *sync.WaitGroup)
ReadTemperatureContinously(ctx context.Context, degree types.TemperatureUnit, round float64, temperatureChannel chan<- *types.Temperature, errorChannel chan<- error)
}