本文整理汇总了Java中org.usb4java.DeviceDescriptor.bDeviceSubClass方法的典型用法代码示例。如果您正苦于以下问题:Java DeviceDescriptor.bDeviceSubClass方法的具体用法?Java DeviceDescriptor.bDeviceSubClass怎么用?Java DeviceDescriptor.bDeviceSubClass使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.usb4java.DeviceDescriptor
的用法示例。
在下文中一共展示了DeviceDescriptor.bDeviceSubClass方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SimpleUsbDeviceDescriptor
import org.usb4java.DeviceDescriptor; //导入方法依赖的package包/类
/**
* Construct from a libusb4java device descriptor.
*
* @param descriptor
* The descriptor from which to copy the data.
*/
public SimpleUsbDeviceDescriptor(final DeviceDescriptor descriptor)
{
this(descriptor.bLength(),
descriptor.bDescriptorType(),
descriptor.bcdUSB(),
descriptor.bDeviceClass(),
descriptor.bDeviceSubClass(),
descriptor.bDeviceProtocol(),
descriptor.bMaxPacketSize0(),
descriptor.idVendor(),
descriptor.idProduct(),
descriptor.bcdDevice(),
descriptor.iManufacturer(),
descriptor.iProduct(),
descriptor.iSerialNumber(),
descriptor.bNumConfigurations());
}
示例2: dumpDaplugWinUSB
import org.usb4java.DeviceDescriptor; //导入方法依赖的package包/类
/**
* Get All informations and print it to screen form a specific Device
* @param device Device
* @return String
* @author yassir
*/
public static String dumpDaplugWinUSB(Device device) {
DeviceDescriptor des = new DeviceDescriptor();
LibUsb.getDeviceDescriptor(device, des);
String res = " vid : " + des.idVendor()
+ "\n pid : " + des.idProduct()
+ "\n Manufacturer : " + des.iManufacturer()
+ "\n bcdevice : " + des.bcdDevice()
+ "\n bcdUSB : " + des.bcdUSB()
+ "\n serial : " + des.iSerialNumber()
+ "\n bDescriptorType : " + des.bDescriptorType()
+ "\n bDeviceClass : " + des.bDeviceClass()
+ "\n bDeviceProtocol : " + des.bDeviceProtocol()
+ "\n bDeviceSubClass : " + des.bDeviceSubClass()
+ "\n bLength : " + des.bLength()
+ "\n bMaxPacketSize0 : " + des.bMaxPacketSize0()
+ "\n bNumConfigurations : " + des.bNumConfigurations()
+ "\n getBuffer : " + des.getBuffer()
+ "\n getPointer : " + device.getPointer()
+ "\n hashCode : " + des.hashCode();
return res;
}