javax.usb.examples
Class ShowTopology

java.lang.Object
  extended by javax.usb.examples.ShowTopology

public class ShowTopology
extends Object

Show the topology tree.

This class shows how to enumerate all USB-connected devices. This class should not be used except by other example code.

Author:
Dan Streetman

Field Summary
static String PREFIX
           
 
Constructor Summary
ShowTopology()
           
 
Method Summary
static UsbHub getVirtualRootUsbHub()
          Get the virtual root UsbHub.
static void main(String[] argv)
           
static void processUsingGetAttachedUsbDevices(UsbDevice usbDevice, String prefix)
          Process all devices in the system using getAttachedUsbDevices().
static void processUsingGetUsbPorts(UsbDevice usbDevice, String prefix)
          Process all devices in the system using getUsbPorts().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREFIX

public static final String PREFIX
See Also:
Constant Field Values
Constructor Detail

ShowTopology

public ShowTopology()
Method Detail

main

public static void main(String[] argv)

getVirtualRootUsbHub

public static UsbHub getVirtualRootUsbHub()
Get the virtual root UsbHub.

Returns:
The virtual root UsbHub.

processUsingGetAttachedUsbDevices

public static void processUsingGetAttachedUsbDevices(UsbDevice usbDevice,
                                                     String prefix)
Process all devices in the system using getAttachedUsbDevices(). Note that this accepts a UsbDevice, not a UsbHub, since UsbHubs are UsbDevices.


processUsingGetUsbPorts

public static void processUsingGetUsbPorts(UsbDevice usbDevice,
                                           String prefix)
Process all devices in the system using getUsbPorts(). Notice that this looks the same as using getAttachedUsbDevices() except this also displays UsbPorts that do not have a connected device.



Copyright © 2012 LSST. All Rights Reserved.