transport

package
v0.0.0-...-a01bbec Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TimeoutError = iota + 999
	ProtocolError
	EndpointError
	DisconnectedError
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HIDAPI

type HIDAPI struct {
	// contains filtered or unexported fields
}

func (*HIDAPI) Close

func (t *HIDAPI) Close()

func (*HIDAPI) Read

func (t *HIDAPI) Read() ([]byte, uint16, int, error)

func (*HIDAPI) SetDevice

func (t *HIDAPI) SetDevice(devInfo hid.DeviceInfo)

func (*HIDAPI) Write

func (t *HIDAPI) Write(msg []byte)

type Transport

type Transport interface {
	Write([]byte)
	Read() ([]byte, uint16, int, error)
	Close()
}

type TransportHID

type TransportHID struct {
	// contains filtered or unexported fields
}

func (*TransportHID) Close

func (t *TransportHID) Close()

func (*TransportHID) Read

func (t *TransportHID) Read() ([]byte, uint16, int, error)

func (*TransportHID) SetDevice

func (t *TransportHID) SetDevice(device hid.Device)

func (*TransportHID) Write

func (t *TransportHID) Write(msg []byte)

type TransportHIDAndroid

type TransportHIDAndroid struct {
	// contains filtered or unexported fields
}

func (*TransportHIDAndroid) Close

func (t *TransportHIDAndroid) Close()

func (*TransportHIDAndroid) Read

func (t *TransportHIDAndroid) Read() ([]byte, uint16, int, error)

func (*TransportHIDAndroid) SetDevice

func (t *TransportHIDAndroid) SetDevice(device hid.Device)

func (*TransportHIDAndroid) Write

func (t *TransportHIDAndroid) Write(msg []byte)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL