Documentation ¶
Index ¶
Constants ¶
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 ¶
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);