USB ports belong to a USB hub. In this API, they represent downstream ports. Upstream and (non-declared) internal ports are not represented in this API. Internal ports that are reported as downstream ports by the USB hub (in the USB hub descriptor) are represented.
See the USB 1.1 specification sec 11.16.
| Modifier and Type | Method and Description |
|---|---|
| public byte | |
| public UsbDevice | |
| public UsbHub | |
| public boolean | Returns: If a device is attached to this port.If a device is attached to this port. |
| getPortNumber | back to summary |
|---|---|
| public byte getPortNumber() Get the number of this port. Port numbers are 1-based, not 0-based; see the USB 1.1 specification table 11.8 offset 7. Since the number is 1-based, the first port on a hub has port number 1. There is a maximum of 255 ports on a single hub (so the maximum port number is 255).
This is actually an
| |
| getUsbDevice | back to summary |
|---|---|
| public UsbDevice getUsbDevice() Get the UsbDevice attached to this UsbPort. If no UsbDevice is attached, this returns null.
| |
| getUsbHub | back to summary |
|---|---|
| public UsbHub getUsbHub() Get the parent UsbHub.
| |
| isUsbDeviceAttached | back to summary |
|---|---|
| public boolean isUsbDeviceAttached() If a device is attached to this port.
| |