public final class DeviceDescriptor extends Object
Constructor and Description |
---|
DeviceDescriptor()
Constructs a new device descriptor which can be passed to the
LibUsb.getDeviceDescriptor(Device, DeviceDescriptor) method. |
Modifier and Type | Method and Description |
---|---|
short |
bcdDevice()
Returns the device release number in binary-coded decimal.
|
short |
bcdUSB()
Returns the USB specification release number in binary-coded decimal.
|
byte |
bDescriptorType()
Returns the descriptor type.
|
byte |
bDeviceClass()
Returns the USB-IF class code for the device.
|
byte |
bDeviceProtocol()
Returns the USB-IF protocol code for the device, qualified by the
bDeviceClass and bDeviceSubClass values.
|
byte |
bDeviceSubClass()
Returns the USB-IF subclass code for the device, qualified by the
bDeviceClass value.
|
byte |
bLength()
Returns the size of this descriptor (in bytes).
|
byte |
bMaxPacketSize0()
Returns the maximum packet size for endpoint 0.
|
byte |
bNumConfigurations()
Returns the number of possible configurations.
|
String |
dump()
Returns a dump of this descriptor.
|
String |
dump(DeviceHandle handle)
Returns a dump of this descriptor.
|
boolean |
equals(Object obj) |
ByteBuffer |
getBuffer()
Returns the Java byte buffer which contains the descriptor structure.
|
long |
getPointer()
Returns the native pointer.
|
int |
hashCode() |
short |
idProduct()
Returns the USB-IF product ID.
|
short |
idVendor()
Returns the USB-IF vendor ID.
|
byte |
iManufacturer()
Returns the index of the string descriptor describing manufacturer.
|
byte |
iProduct()
Returns the index of the string descriptor describing product.
|
byte |
iSerialNumber()
Returns the index of the string descriptor containing device serial
number.
|
String |
toString() |
public DeviceDescriptor()
LibUsb.getDeviceDescriptor(Device, DeviceDescriptor)
method.public long getPointer()
public ByteBuffer getBuffer()
public byte bLength()
public byte bDescriptorType()
LibUsb.DT_DEVICE
in this context.public short bcdUSB()
public byte bDeviceClass()
public byte bDeviceSubClass()
public byte bDeviceProtocol()
public byte bMaxPacketSize0()
public short idVendor()
public short idProduct()
public short bcdDevice()
public byte iManufacturer()
public byte iProduct()
public byte iSerialNumber()
public byte bNumConfigurations()
public String dump()
public String dump(DeviceHandle handle)
handle
- The USB device handle for resolving string descriptors. If
null then no strings are resolved.Copyright © 2011–2018 usb4java Team. All rights reserved.