2013-10-23 07:45:31 +08:00
|
|
|
package gobot
|
2013-10-24 13:00:03 +08:00
|
|
|
|
2014-12-31 21:15:52 +08:00
|
|
|
// Adaptor is the interface that describes an adaptor in gobot
|
2014-11-21 10:00:32 +08:00
|
|
|
type Adaptor interface {
|
2014-12-31 21:15:52 +08:00
|
|
|
// Name returns the label for the Adaptor
|
2014-07-04 10:52:31 +08:00
|
|
|
Name() string
|
2016-09-25 17:46:55 +08:00
|
|
|
// SetName sets the label for the Adaptor
|
|
|
|
SetName(n string)
|
2014-12-31 21:15:52 +08:00
|
|
|
// Connect initiates the Adaptor
|
2016-11-07 21:55:21 +08:00
|
|
|
Connect() error
|
2014-12-31 21:15:52 +08:00
|
|
|
// Finalize terminates the Adaptor
|
2016-11-07 21:55:21 +08:00
|
|
|
Finalize() error
|
2014-11-22 11:35:01 +08:00
|
|
|
}
|
|
|
|
|
2014-12-31 21:15:52 +08:00
|
|
|
// Porter is the interface that describes an adaptor's port
|
2014-11-22 11:35:01 +08:00
|
|
|
type Porter interface {
|
2014-11-21 10:00:32 +08:00
|
|
|
Port() string
|
2014-06-14 01:46:58 +08:00
|
|
|
}
|