2014-05-03 06:22:05 +08:00
|
|
|
package pebble
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/hybridgroup/gobot"
|
|
|
|
)
|
|
|
|
|
2014-11-17 04:25:48 +08:00
|
|
|
var _ gobot.AdaptorInterface = (*PebbleAdaptor)(nil)
|
|
|
|
|
2014-05-03 06:22:05 +08:00
|
|
|
type PebbleAdaptor struct {
|
|
|
|
gobot.Adaptor
|
|
|
|
}
|
|
|
|
|
2014-10-17 05:26:35 +08:00
|
|
|
// NewPebbleAdaptor creates a new pebble adaptor with specified name
|
2014-05-24 06:09:18 +08:00
|
|
|
func NewPebbleAdaptor(name string) *PebbleAdaptor {
|
|
|
|
return &PebbleAdaptor{
|
2014-07-08 08:35:59 +08:00
|
|
|
Adaptor: *gobot.NewAdaptor(
|
|
|
|
name,
|
|
|
|
"PebbleAdaptor",
|
|
|
|
),
|
2014-05-24 06:09:18 +08:00
|
|
|
}
|
2014-05-03 06:22:05 +08:00
|
|
|
}
|
|
|
|
|
2014-10-17 05:26:35 +08:00
|
|
|
// Connect returns true if connection to pebble is established succesfully
|
2014-11-17 04:25:48 +08:00
|
|
|
func (a *PebbleAdaptor) Connect() error {
|
|
|
|
return nil
|
2014-05-03 06:22:05 +08:00
|
|
|
}
|
|
|
|
|
2014-10-17 05:26:35 +08:00
|
|
|
// Finalize returns true if connection to pebble is finalized succesfully
|
2014-11-17 04:25:48 +08:00
|
|
|
func (a *PebbleAdaptor) Finalize() error {
|
|
|
|
return nil
|
2014-05-03 06:22:05 +08:00
|
|
|
}
|