UsbControlBlock

class UsbControlBlock : Cloneable

control classnever reuse the instance when it closed

Functions

claimInterface
Link copied to clipboard
open fun claimInterface(intf: UsbInterface)
open specific interface
open fun claimInterface(intf: UsbInterface, force: Boolean)
clone
Link copied to clipboard
open fun clone(): USBMonitor.UsbControlBlock
duplicate by cloneneed permissionUSBMonitor never handle cloned UsbControlBlock, you should release it after using it.
close
Link copied to clipboard
open fun close()
Close deviceThis also close interfaces if they are opened in Java side
equals
Link copied to clipboard
open fun equals(o: Any): Boolean
getBusNum
Link copied to clipboard
open fun getBusNum(): Int
getConnection
Link copied to clipboard
open fun getConnection(): UsbDeviceConnection
get UsbDeviceConnection
getDevice
Link copied to clipboard
fun getDevice(): UsbDevice
getDeviceId
Link copied to clipboard
open fun getDeviceId(): Int
get device id
getDeviceKey
Link copied to clipboard
open fun getDeviceKey(): Int
get device key
open fun getDeviceKey(useNewAPI: Boolean): Int
get device key
getDeviceKeyName
Link copied to clipboard
open fun getDeviceKeyName(): String
get device key string
open fun getDeviceKeyName(useNewAPI: Boolean): String
get device key string
getDeviceKeyNameWithSerial
Link copied to clipboard
open fun getDeviceKeyNameWithSerial(): String
get device key stringif device has serial number, use it
getDeviceKeyWithSerial
Link copied to clipboard
open fun getDeviceKeyWithSerial(): Int
get device keyif device has serial number, use it
getDeviceName
Link copied to clipboard
open fun getDeviceName(): String
get device name
getDevNum
Link copied to clipboard
open fun getDevNum(): Int
getFileDescriptor
Link copied to clipboard
open fun getFileDescriptor(): Int
get file descriptor to access USB device
getInterface
Link copied to clipboard
open fun getInterface(interface_id: Int): UsbInterface
get interface
open fun getInterface(interface_id: Int, altsetting: Int): UsbInterface
get interface
getManufacture
Link copied to clipboard
open fun getManufacture(): String
get manufacture
getProductId
Link copied to clipboard
open fun getProductId(): Int
get product id
getProductName
Link copied to clipboard
open fun getProductName(): String
get product name
getRawDescriptors
Link copied to clipboard
open fun getRawDescriptors(): Array<Byte>
get raw descriptor for the USB device
getSerial
Link copied to clipboard
open fun getSerial(): String
get serial number
getUSBMonitor
Link copied to clipboard
open fun getUSBMonitor(): USBMonitor
getUsbVersion
Link copied to clipboard
open fun getUsbVersion(): String
get version string of USB
getVenderId
Link copied to clipboard
open fun getVenderId(): Int
get vendor id
getVersion
Link copied to clipboard
open fun getVersion(): String
get version
releaseInterface
Link copied to clipboard
open fun releaseInterface(intf: UsbInterface)
close interface