go-usb-relay: github.com/mengzhuo/go-usb-relay Index | Files | Directories

package usbrelay

import "github.com/mengzhuo/go-usb-relay"


Package Files



var (
    SlotNumberOverflow = errors.New("slot should be in 1 to 8")

func ListAll Uses

func ListAll() (ret map[string]*Relay)

type Relay Uses

type Relay struct {
    // contains filtered or unexported fields

func (*Relay) Close Uses

func (r *Relay) Close()

func (*Relay) Device Uses

func (r *Relay) Device() hid.Device

func (*Relay) GetAllStatus Uses

func (r *Relay) GetAllStatus() (bitmask byte, err error)

func (*Relay) Id Uses

func (r *Relay) Id() (id string, err error)

func (*Relay) SlotNum Uses

func (r *Relay) SlotNum() int

func (*Relay) Status Uses

func (r *Relay) Status(n int) (on bool, err error)

func (*Relay) Toggle Uses

func (r *Relay) Toggle(n int) (err error)

func (*Relay) TurnAllOff Uses

func (r *Relay) TurnAllOff() (err error)

func (*Relay) TurnAllOn Uses

func (r *Relay) TurnAllOn() (err error)

func (*Relay) TurnOff Uses

func (r *Relay) TurnOff(n int) (err error)

func (*Relay) TurnOn Uses

func (r *Relay) TurnOn(n int) (err error)



Package usbrelay imports 4 packages (graph) and is imported by 1 packages. Updated 2018-03-26. Refresh now. Tools for package owners.