| Constructor and Description |
|---|
UsbPortImp(UsbHubImp hub,
byte number)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
attachUsbDeviceImp(UsbDeviceImp device)
Attaches the UsbDeviceImp to this port.
|
void |
detachUsbDeviceImp(UsbDeviceImp device)
Detaches the attached UsbDeviceImp from this port.
|
byte |
getPortNumber()
Return the number of this port.
|
UsbDevice |
getUsbDevice()
Get the UsbDevice attached to this UsbPort.
|
UsbDeviceImp |
getUsbDeviceImp() |
UsbHub |
getUsbHub()
Get the parent UsbHub.
|
UsbHubImp |
getUsbHubImp() |
boolean |
isUsbDeviceAttached()
If a device is attached to this port.
|
public UsbPortImp(UsbHubImp hub, byte number)
hub - The parent UsbHubImp.number - The (1-based) port number.public byte getPortNumber()
The port number is 1-based.
getPortNumber in interface UsbPortpublic UsbHub getUsbHub()
UsbPortpublic UsbHubImp getUsbHubImp()
public boolean isUsbDeviceAttached()
UsbPortisUsbDeviceAttached in interface UsbPortpublic UsbDevice getUsbDevice()
UsbPortIf no UsbDevice is attached, this returns null.
getUsbDevice in interface UsbPortpublic UsbDeviceImp getUsbDeviceImp()
public void attachUsbDeviceImp(UsbDeviceImp device) throws IllegalArgumentException
device - The UsbDeviceImp to attach.IllegalArgumentException - If there is already a device attached.public void detachUsbDeviceImp(UsbDeviceImp device) throws IllegalArgumentException
device - the UsbDeviceImp to detach.IllegalArgumentException - If the UsbDeviceImp is not already attached.Copyright © 2014 LSST. All Rights Reserved.