PKGBUILD/pkg/sensor/interfaces.go

16 lines
419 B
Go
Raw Normal View History

package sensor
import (
"context"
"sync"
"github.com/go-flucky/flucky/pkg/types"
)
type Sensor interface {
GetSensorModel() types.SensorModel
Read() ([]types.MeasuredValue, error)
ReadChannel(measuredValuesChannel chan<- []types.MeasuredValue, errorChannel chan<- error, wg *sync.WaitGroup)
ReadContinously(ctx context.Context, measuredValuesChannel chan<- []types.MeasuredValue, errorChannel chan<- error)
}