added error returns to the SendData method on the peripheral interface
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
package peripheral
|
||||
|
||||
import "errors"
|
||||
|
||||
var (
|
||||
ErrInvalidData = errors.New("invalid data")
|
||||
ErrDeviceTimedOut = errors.New("device timed out")
|
||||
ErrFailureToPackData = errors.New("failed to pack received data")
|
||||
)
|
||||
@@ -17,7 +17,7 @@ const (
|
||||
|
||||
type Peripheral interface {
|
||||
Name() string
|
||||
SendData(*telemetry.TelemetryData)
|
||||
SendData(*telemetry.TelemetryData) error
|
||||
RequiredFields() []telemetry.FieldID
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user