public class WindowsHubOsImp extends UsbDeviceImp implements UsbHub
UsbHubImp.CREATE_SHORT_PACKET_EXCEPTION_POLICY_KEY, createShortPacketException, DCP_QUEUE_POLICY_KEY, disconnected, listTable, queueManager, queueSubmissions, submissionCount| Constructor and Description |
|---|
WindowsHubOsImp(usb_device device) |
| Modifier and Type | Method and Description |
|---|---|
void |
asyncSubmit(List list)
Submit a List of UsbControlIrps asynchronously to the Default Control Pipe.
|
void |
asyncSubmit(UsbControlIrpImp irp)
Asynchronously submit a control request.
|
void |
asyncSubmit(UsbIrpImp irp)
Asynchronously submit a UsbControlIrpImp.
|
List |
getAttachedUsbDevices()
Get all attached UsbDevices.
|
usb_device |
getDevice() |
byte |
getNumberOfPorts()
Get the number of (downstream) ports this hub has.
|
String |
getString(byte index)
Get the String from the specified string descriptor.
|
UsbDeviceOsImp |
getUsbDeviceOsImp() |
UsbPort |
getUsbPort(byte number)
Get a specific UsbPort by port number.
|
List |
getUsbPorts()
Get all the ports this hub has.
|
boolean |
isRootUsbHub()
If this is the
virtual root hub. |
void |
syncSubmit(List list)
Submit a List of UsbControlIrps synchronously to the Default Control Pipe.
|
void |
syncSubmit(UsbControlIrpImp irp)
Synchronously submit a control request.
|
void |
syncSubmit(UsbIrpImp irp)
Synchronously submit a UsbIrpImp.
|
addRunnable, addUsbConfigurationImp, addUsbDeviceListener, asyncSubmit, connect, containsUsbConfiguration, createUsbControlIrp, disconnect, fireEvent, getActiveUsbConfiguration, getActiveUsbConfigurationImp, getActiveUsbConfigurationNumber, getCachedUsbStringDescriptor, getLangId, getManufacturerString, getParentUsbPort, getParentUsbPortImp, getProductString, getSerialNumberString, getSpeed, getUsbConfiguration, getUsbConfigurationImp, getUsbConfigurations, getUsbDeviceDescriptor, getUsbStringDescriptor, isConfigured, isUsbHub, queueList, queueUsbControlIrpImp, removeUsbDeviceListener, requestUsbStringDescriptor, setActiveUsbConfigurationNumber, setCachedUsbStringDescriptor, setParentUsbPortImp, setPolicies, setSpeed, setupUsbControlIrpImp, setUsbDeviceDescriptor, setUsbDeviceOsImp, submitUsbControlIrpImpFromQueue, syncSubmit, usbControlIrpListToUsbControlIrpImpList, usbControlIrpToUsbControlIrpImp, usbIrpImpCompleteclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddUsbDeviceListener, asyncSubmit, asyncSubmit, containsUsbConfiguration, createUsbControlIrp, getActiveUsbConfiguration, getActiveUsbConfigurationNumber, getManufacturerString, getParentUsbPort, getProductString, getSerialNumberString, getSpeed, getString, getUsbConfiguration, getUsbConfigurations, getUsbDeviceDescriptor, getUsbStringDescriptor, isConfigured, isUsbHub, removeUsbDeviceListener, syncSubmit, syncSubmitpublic WindowsHubOsImp(usb_device device)
public byte getNumberOfPorts()
UsbHubThis is only the number of ports on the hub, not all ports are necessarily enabled, available, usable, or in some cases physically present. This only represents the number of downstream ports the hub claims to have. Note that all hubs have exactly one upstream port, which allows it to connect to the system (or another upstream hub). There is also a internal port which is generally only used by the hub itself. See the USB 1.1 specification sec 11.4 for details on the internal port, sec 11.5 for details on the downstream ports, and sec 11.6 for details on the upstream port.
getNumberOfPorts in interface UsbHubpublic List getUsbPorts()
UsbHubThe port numbering is 1-based.
The List will be unmodifiable.
getUsbPorts in interface UsbHubUsbHub.getUsbPort( byte number )public UsbPort getUsbPort(byte number)
UsbHubThis gets the UsbPort with the specified number. The port numbering is 1-based (not 0-based), and the max port number is 255. See the USB 1.1 specification table 11.8 offset 7.
If the specified port does not exist, this returns null.
getUsbPort in interface UsbHubnumber - The number (1-based) of the port to get.public List getAttachedUsbDevices()
UsbHubThe List will be unmodifiable.
getAttachedUsbDevices in interface UsbHubpublic boolean isRootUsbHub()
UsbHubvirtual root hub.isRootUsbHub in interface UsbHubpublic void asyncSubmit(UsbIrpImp irp) throws UsbException
UsbExceptionUsbDeviceOsImp.syncSubmit(com.ibm.jusb.UsbControlIrpImp)public void asyncSubmit(UsbControlIrpImp irp) throws UsbException
asyncSubmit in interface UsbDeviceOsImpirp - The UsbControlIrpImp.UsbException - If the submission was not accepted by the implementation.UsbDeviceOsImp.syncSubmit(com.ibm.jusb.UsbControlIrpImp)public void syncSubmit(UsbControlIrpImp irp) throws UsbException
syncSubmit in interface UsbDeviceOsImpirp - The UsbControlIrpImp.UsbException - If the submission is unsuccessful.UsbDeviceOsImp.syncSubmit(com.ibm.jusb.UsbControlIrpImp)public void syncSubmit(UsbIrpImp irp) throws UsbException
UsbExceptionUsbDeviceOsImp.syncSubmit(com.ibm.jusb.UsbControlIrpImp)public void asyncSubmit(List list) throws UsbException, IllegalArgumentException, UsbDisconnectedException
UsbDeviceImpAll UsbControlIrps are guaranteed to be atomically (with respect to other clients of this API) submitted to the Default Control Pipe. Atomicity on a native level is implementation-dependent.
asyncSubmit in interface UsbDeviceOsImpasyncSubmit in interface UsbDeviceasyncSubmit in class UsbDeviceImplist - The List of UsbControlIrps.UsbException - If an error occurrs.IllegalArgumentException - If one of the UsbControlIrps is invalid.UsbDisconnectedException - If the device has been disconnected.public void syncSubmit(List list) throws UsbException, IllegalArgumentException, UsbDisconnectedException
UsbDeviceImpAll UsbControlIrps are guaranteed to be atomically (with respect to other clients of this API) submitted to the Default Control Pipe. Atomicity on a native level is implementation-dependent.
syncSubmit in interface UsbDeviceOsImpsyncSubmit in interface UsbDevicesyncSubmit in class UsbDeviceImplist - The List of UsbControlIrps.UsbException - If an error occurrs.IllegalArgumentException - If one of the UsbControlIrps is invalid.UsbDisconnectedException - If the device has been disconnected.public UsbDeviceOsImp getUsbDeviceOsImp()
getUsbDeviceOsImp in class UsbDeviceImppublic usb_device getDevice()
public String getString(byte index) throws UsbException, UsbEncodingException, UsbDisconnectedException
UsbDevice
This is a convienence method, which uses
getUsbStringDescriptor().
getString().
getString in interface UsbDevicegetString in class UsbDeviceImpindex - The index of the string to get.UsbException - if an error occurrs while getting the UsbStringDescriptor.UsbEncodingException - If the string encoding is not supported.UsbDisconnectedException - If the device has been disconnected.Copyright © 2014 LSST. All Rights Reserved.