USB

package
v0.0.0-...-cd9caf7 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2017 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Listen

func Listen(conn net.Conn, delegate USBDeviceDelegate) net.Conn

Types

type ConnectedDeviceDelegate

type ConnectedDeviceDelegate interface {
	USBDeviceDidSuccessfullyConnect(device ConnectedDevices, deviceID int, toPort int)
	USBDeviceDidFailToConnect(device ConnectedDevices, deviceID int, toPort int, err error)
	USBDeviceDidReceiveData(device ConnectedDevices, deviceID int, messageTAG uint32, data []byte)
	USBDeviceDidDisconnect(devices ConnectedDevices, deviceID int, toPort int)
}

type ConnectedDevices

type ConnectedDevices struct {
	Delegate   ConnectedDeviceDelegate
	Connection net.Conn
}

func (ConnectedDevices) Connect

func (device ConnectedDevices) Connect(conn net.Conn, frame frames.USBDeviceAttachedDetachedFrame, port int) net.Conn

func (ConnectedDevices) SendData

func (device ConnectedDevices) SendData(data []byte, messageTagType uint32)

type Scan

type Scan struct {
	IsScanning bool
}

func (*Scan) Start

func (scan *Scan) Start(device *ConnectedDevices, frame frames.USBDeviceAttachedDetachedFrame, toPort int)

func (*Scan) Stop

func (scan *Scan) Stop()

type USBDeviceDelegate

type USBDeviceDelegate interface {
	USBDeviceDidPlug(frames.USBDeviceAttachedDetachedFrame)
	USBDeviceDidUnPlug(frames.USBDeviceAttachedDetachedFrame)
	USBDidReceiveErrorWhilePluggingOrUnplugging(error, string)
}

Delegate methods for USBDevice, if any ios Device is plugged or unplugged

Jump to

Keyboard shortcuts

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