Device

Undocumented in source.

Constructors

this
this(uint vendor_id, uint product_id)

Opens the first matching device

this
this(uint vendor_id, uint product_id, string serial_number)

Opens the first matching device

this
this(string path)

Opens a specific device

Members

Functions

command
ubyte[] command(ubyte[] buf, uint size)

Executes a command

command
ubyte[] command(ubyte[] buf, uint size, uint read_size)

Executes a command

getDefaultReadSize
uint getDefaultReadSize()

Gets the default read size

getFeatureReport
ubyte[] getFeatureReport(uint size)

Reads a feature report

getIndexedString
string getIndexedString(uint index)

Reads a indexed string

getIndexedString
string getIndexedString(uint index, uint size)

Reads a indexed string

getManufacturer
string getManufacturer()

Reads the manufacturer string

getManufacturer
string getManufacturer(uint size)

Reads the manufacturer string

getProduct
string getProduct()

Reads the product string

getProduct
string getProduct(uint size)

Reads the product string

getSerialNumber
string getSerialNumber()

Reads the serial number

getSerialNumber
string getSerialNumber(uint size)

Reads the serial number

getTimeout
uint getTimeout()

Gets the timeout

read
ubyte[] read()

Reads from the device

read
ubyte[] read(uint size)

Reads from the device

sendFeatureReport
void sendFeatureReport(ubyte[] buf, uint size)

Sends a feature report

setDefaultReadSize
void setDefaultReadSize(uint size)

Sets the deafult read size

setNonBlockingMode
void setNonBlockingMode(bool mode)

Enables/Disables non-blocking mode

setTimeout
void setTimeout(uint timeout)

Sets the timeout

write
void write(ubyte[] buf, uint size)

Writes to the device

Meta