|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UsbPort
Interface for a USB port.
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.
Method Summary | |
---|---|
byte |
getPortNumber()
Get the number of this port. |
UsbDevice |
getUsbDevice()
Get the UsbDevice attached to this UsbPort. |
UsbHub |
getUsbHub()
Get the parent UsbHub. |
boolean |
isUsbDeviceAttached()
If a device is attached to this port. |
Method Detail |
---|
byte getPortNumber()
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 unsigned byte
.
UsbHub getUsbHub()
UsbDevice getUsbDevice()
If no UsbDevice is attached, this returns null.
boolean isUsbDeviceAttached()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |