Documentation ¶
Index ¶
- Variables
- func ListAll() (ret map[string]*Relay)
- type Relay
- func (r *Relay) Close()
- func (r *Relay) Device() hid.Device
- func (r *Relay) GetAllStatus() (bitmask byte, err error)
- func (r *Relay) Id() (id string, err error)
- func (r *Relay) SlotNum() int
- func (r *Relay) Status(n int) (on bool, err error)
- func (r *Relay) Toggle(n int) (err error)
- func (r *Relay) TurnAllOff() (err error)
- func (r *Relay) TurnAllOn() (err error)
- func (r *Relay) TurnOff(n int) (err error)
- func (r *Relay) TurnOn(n int) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
SlotNumberOverflow = errors.New("slot should be in 1 to 8")
)
Functions ¶
Types ¶
type Relay ¶
type Relay struct {
// contains filtered or unexported fields
}
func (*Relay) GetAllStatus ¶
func (*Relay) TurnAllOff ¶
Click to show internal directories.
Click to hide internal directories.