2013-10-23 07:45:31 +08:00
|
|
|
package gobot
|
2013-10-24 13:00:03 +08:00
|
|
|
|
|
|
|
import "fmt"
|
|
|
|
|
|
|
|
type Driver struct {
|
2013-11-14 12:44:54 +08:00
|
|
|
Interval string
|
|
|
|
Pin string
|
|
|
|
Name string
|
|
|
|
Params map[string]string
|
2013-11-25 06:41:36 +08:00
|
|
|
Commands []string
|
2013-11-24 02:36:08 +08:00
|
|
|
Events map[string]chan interface{} `json:"-"`
|
2013-10-24 13:00:03 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func NewDriver(d Driver) Driver {
|
2013-11-14 12:44:54 +08:00
|
|
|
return d
|
2013-10-24 13:00:03 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (d *Driver) Start() {
|
2013-11-14 12:44:54 +08:00
|
|
|
fmt.Println("Starting driver " + d.Name + "...")
|
2013-10-24 13:00:03 +08:00
|
|
|
}
|