|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.codeminders.hidapi.HIDManager
public class HIDManager
HIDManager.java High-level interface to enumerate, find , open HID devices and get connect/disconnect notifications.
Field Summary | |
---|---|
protected long |
peer
|
Method Summary | |
---|---|
protected void |
finalize()
Release HID manager. |
static HIDManager |
getInstance()
|
HIDDeviceInfo[] |
listDevices()
Get list of all the HID devices attached to the system. |
HIDDevice |
openById(int vendor_id,
int product_id,
java.lang.String serial_number)
Convenience method to open a HID device using a Vendor ID (VID), Product ID (PID) and optionally a serial number. |
HIDDevice |
openByPath(java.lang.String path)
Convenience method to find and open device by path |
void |
release()
Release underlying HID layer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected long peer
Method Detail |
---|
public HIDDeviceInfo[] listDevices() throws java.io.IOException
java.io.IOException
public void release()
HIDManager object is no longer needed. Failure to
do so could cause memory leaks or unterminated threads. It is
safe to call this method multiple times.
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public HIDDevice openByPath(java.lang.String path) throws java.io.IOException, HIDDeviceNotFoundException
path
- USB device path
HIDDevice object
- Throws:
java.io.IOException
- in case of internal error
HIDDeviceNotFoundException
- if devive was not found
public HIDDevice openById(int vendor_id, int product_id, java.lang.String serial_number) throws java.io.IOException, HIDDeviceNotFoundException
vendor_id
- USB vendor IDproduct_id
- USB product IDserial_number
- USB device serial number (could be null)
- Returns:
- open device
- Throws:
java.io.IOException
- in case of internal error
HIDDeviceNotFoundException
- if devive was not found
public static HIDManager getInstance() throws java.io.IOException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |