- descriptors extended from Usb_Descriptor
- toString() - javadoc added - interface changes (Strings, dll) git-svn-id: https://svn.code.sf.net/p/libusbjava/code/trunk@147 94ad28fe-ef68-46b1-9651-e7ae4fcf1c4c
This commit is contained in:
@@ -1,29 +1,57 @@
|
||||
package ch.ntb.usb;
|
||||
|
||||
/**
|
||||
* Represents an USB device.<br>
|
||||
* An USB device has one device descriptor and it may have multiple
|
||||
* configuration descriptors.
|
||||
*
|
||||
* @author schlaepfer
|
||||
*
|
||||
*/
|
||||
public class Usb_Device {
|
||||
|
||||
/**
|
||||
* Pointers to the next and previous device
|
||||
*/
|
||||
public Usb_Device next, prev;
|
||||
|
||||
/**
|
||||
* Systems String representation
|
||||
*/
|
||||
public String filename;
|
||||
|
||||
/**
|
||||
* Reference to the bus to which this device is connected
|
||||
*/
|
||||
public Usb_Bus bus;
|
||||
|
||||
/**
|
||||
* USB device descriptor
|
||||
*/
|
||||
public Usb_Device_Descriptor descriptor;
|
||||
|
||||
/**
|
||||
* USB config descriptors
|
||||
*/
|
||||
public Usb_Config_Descriptor[] config;
|
||||
|
||||
/**
|
||||
* Number assigned to this device
|
||||
*/
|
||||
public byte devnum;
|
||||
|
||||
/**
|
||||
* Number of children of this device
|
||||
*/
|
||||
public byte num_children;
|
||||
|
||||
/**
|
||||
* Reference to the first child
|
||||
*/
|
||||
public Usb_Device children;
|
||||
|
||||
public String toString() {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append("** Usb_Device **\n");
|
||||
sb.append("\tfilename: " + filename + "\n");
|
||||
sb.append("\tdevnum: " + devnum + "\n");
|
||||
sb.append("\tnum_children: " + num_children + "\n");
|
||||
return sb.toString();
|
||||
return "Usb_Device " + filename;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user