LibusbJava

libusb for Java

User Tools

Site Tools


implementation:start

This is an old revision of the document!


Implementation

In libusb, the bus structure (with devices, configurations, interfaces and endpoints) is represented in C structs. These structures are kept there, no Java object are created out of them. In C/C++ we keep the native (libusb) device pointer and from there, every call from Java is initiated over this device pointer. So we are sure we have everytime the most actual USB information libusb has.
In Java you can access the descriptors with a tree-like Object structure and you don't have to worry about the internal pointers and structs.

It provides a simple Device class which represents a USB device and makes it easy to write to and read from it. Errors and Timeouts will result in Exceptions.

Versioning

The version numbers of the libusb and our LibusbJava are intertwined. The following figures shows all necessary details.

implementation/start.1436015471.txt.gz · Last modified: 2016/02/25 13:33 (external edit)