public class FindUsbDevice extends Object
This finds a specific UsbDevice based on some of the device's properties. This class should not be used except by other example code.
| Constructor and Description |
|---|
FindUsbDevice() |
| Modifier and Type | Method and Description |
|---|---|
static List |
getAllUsbDevices(UsbDevice usbDevice)
This forms an inclusive list of all UsbDevices connected to this UsbDevice.
|
static byte |
getDeviceClass()
Get a device class.
|
static String |
getManufacturerString()
Get a manufacturer string.
|
static short |
getProductId()
Get a product ID.
|
static List |
getUsbDevicesWithDeviceClass(UsbDevice usbDevice,
byte deviceClass)
Get a List of all devices that match the specified device class.
|
static List |
getUsbDevicesWithId(UsbDevice usbDevice,
short vendorId,
short productId)
Get a List of all devices that match the specified vendor and product id.
|
static List |
getUsbDevicesWithManufacturerString(UsbDevice usbDevice,
String manufacturerString)
Get a List of all devices that match the specified manufacturer string.
|
static short |
getVendorId()
Get a vendor ID.
|
static void |
main(String[] argv) |
static void |
parseArgv(String[] argv)
Parse the parameters.
|
public static void main(String[] argv)
public static List getAllUsbDevices(UsbDevice usbDevice)
The list includes the provided device. If the device is also a hub, the list will include all devices connected to it, recursively.
usbDevice - The UsbDevice to use.public static List getUsbDevicesWithId(UsbDevice usbDevice, short vendorId, short productId)
usbDevice - The UsbDevice to check.vendorId - The vendor id to match.productId - The product id to match.A - List of any matching UsbDevice(s).public static List getUsbDevicesWithDeviceClass(UsbDevice usbDevice, byte deviceClass)
usbDevice - The UsbDevice to check.deviceClass - The device class to match.public static List getUsbDevicesWithManufacturerString(UsbDevice usbDevice, String manufacturerString)
usbDevice - The UsbDevice to check.manufacturerString - The manufacturer string to match.public static short getVendorId()
public static short getProductId()
public static byte getDeviceClass()
public static String getManufacturerString()
public static void parseArgv(String[] argv)
argv - The command-line parameters.Copyright © 2014 LSST. All Rights Reserved.