-
- All Implemented Interfaces:
-
java.lang.Cloneable
public final class USBMonitor.UsbControlBlock implements Cloneable
control classnever reuse the instance when it closed
-
-
Method Summary
Modifier and Type Method Description USBMonitor.UsbControlBlockclone()duplicate by cloneneed permissionUSBMonitor never handle cloned UsbControlBlock, you should release it after using it. USBMonitorgetUSBMonitor()final UsbDevicegetDevice()StringgetDeviceName()get device name intgetDeviceId()get device id StringgetDeviceKeyName()get device key string StringgetDeviceKeyName(boolean useNewAPI)get device key string intgetDeviceKey()get device key intgetDeviceKey(boolean useNewAPI)get device key StringgetDeviceKeyNameWithSerial()get device key stringif device has serial number, use it intgetDeviceKeyWithSerial()get device keyif device has serial number, use it synchronized UsbDeviceConnectiongetConnection()get UsbDeviceConnection synchronized intgetFileDescriptor()get file descriptor to access USB device synchronized Array<byte>getRawDescriptors()get raw descriptor for the USB device intgetVenderId()get vendor id intgetProductId()get product id StringgetUsbVersion()get version string of USB StringgetManufacture()get manufacture StringgetProductName()get product name StringgetVersion()get version StringgetSerial()get serial number intgetBusNum()intgetDevNum()synchronized UsbInterfacegetInterface(int interface_id)get interface synchronized UsbInterfacegetInterface(int interface_id, int altsetting)get interface synchronized voidclaimInterface(UsbInterface intf)open specific interface synchronized voidclaimInterface(UsbInterface intf, boolean force)synchronized voidreleaseInterface(UsbInterface intf)close interface synchronized voidclose()Close deviceThis also close interfaces if they are opened in Java side booleanequals(Object o)-
-
Method Detail
-
clone
USBMonitor.UsbControlBlock clone()
duplicate by cloneneed permissionUSBMonitor never handle cloned UsbControlBlock, you should release it after using it.
-
getUSBMonitor
USBMonitor getUSBMonitor()
-
getDeviceName
String getDeviceName()
get device name
-
getDeviceId
int getDeviceId()
get device id
-
getDeviceKeyName
String getDeviceKeyName()
get device key string
-
getDeviceKeyName
String getDeviceKeyName(boolean useNewAPI)
get device key string
- Parameters:
useNewAPI- if true, try to use serial number
-
getDeviceKey
int getDeviceKey()
get device key
-
getDeviceKey
int getDeviceKey(boolean useNewAPI)
get device key
- Parameters:
useNewAPI- if true, try to use serial number
-
getDeviceKeyNameWithSerial
String getDeviceKeyNameWithSerial()
get device key stringif device has serial number, use it
-
getDeviceKeyWithSerial
int getDeviceKeyWithSerial()
get device keyif device has serial number, use it
-
getConnection
synchronized UsbDeviceConnection getConnection()
get UsbDeviceConnection
-
getFileDescriptor
synchronized int getFileDescriptor()
get file descriptor to access USB device
-
getRawDescriptors
synchronized Array<byte> getRawDescriptors()
get raw descriptor for the USB device
-
getVenderId
int getVenderId()
get vendor id
-
getProductId
int getProductId()
get product id
-
getUsbVersion
String getUsbVersion()
get version string of USB
-
getManufacture
String getManufacture()
get manufacture
-
getProductName
String getProductName()
get product name
-
getVersion
String getVersion()
get version
-
getBusNum
int getBusNum()
-
getDevNum
int getDevNum()
-
getInterface
synchronized UsbInterface getInterface(int interface_id)
get interface
-
getInterface
synchronized UsbInterface getInterface(int interface_id, int altsetting)
get interface
-
claimInterface
synchronized void claimInterface(UsbInterface intf)
open specific interface
-
claimInterface
synchronized void claimInterface(UsbInterface intf, boolean force)
-
releaseInterface
synchronized void releaseInterface(UsbInterface intf)
close interface
-
close
synchronized void close()
Close deviceThis also close interfaces if they are opened in Java side
-
-
-
-