godbi

package
v0.0.0-...-8a2f640 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2020 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CMD_ID_EXIT       = 0
	CMD_ID_LIST_OLD   = 1 // DBI below 168
	CMD_ID_FILE_RANGE = 2
	CMD_ID_LIST       = 3 // DBI 168+

	CMD_TYPE_REQUEST  = 0
	CMD_TYPE_RESPONSE = 1
	CMD_TYPE_ACK      = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DBIBackend

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

The DBIBackend type is an API to an AKAI DBIBackend that is connected to the host machine via USB.

func Find

func Find() (*DBIBackend, error)

Find attempts to locate an AKAI DBIBackend connected via USB and returns a new instance of the DBIBackend type, exposing an API for interacting with the device. Returns an error if the device cannot be found.

func (*DBIBackend) Close

func (mpd *DBIBackend) Close()

Close stops the connection with the AKAI DBIBackend

func (*DBIBackend) Errors

func (mpd *DBIBackend) Errors() <-chan error

Errors exposes a channel that returns any errors that occur in the underlying operations of the API and the USB device.

type DBICmdHeader

type DBICmdHeader struct {
	Magic    [4]byte
	CMDType  uint32
	ID       uint32
	DataSize uint32
}

const buffer = await this.bufferRead(16); const magic = buffer.slice(0, 4).toString(); const type = buffer.readUInt32LE(4); const id = buffer.readUInt32LE(8); const data_size = buffer.readUInt32LE(12);

Jump to

Keyboard shortcuts

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