Code example for UsbDevice

Methods: getProductId, getVendorId

0
	/** 
	 * @return String Returns the title/description of the device 
	 */ 
	public String getDeviceTitle() {
		if(device != null) {
			return "LibUSB Device Demo (VID = 0x" + Integer.toHexString(device.getVendorId()) + 
				" PID = 0x" + Integer.toHexString(device.getProductId()) + ")";
		} 
		 
		return null; 
	} 
	 
	/** 
	 * Requests that the attached USB device toggle its LEDs. 
	 */ 
	public void toggleLEDs() { 
		/* We need to synchronize to the toggleLEDCount object to make sure that the 
		 * running thread and this request aren't changing the variable at the same 
		 * time.   
		 */ 
		synchronized(toggleLEDCount) {