Class SolarisUsbDevice
java.lang.Object
oshi.hardware.common.AbstractUsbDevice
oshi.hardware.platform.unix.solaris.SolarisUsbDevice
- All Implemented Interfaces:
Comparable<UsbDevice>
,UsbDevice
Solaris Usb Device
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
addDevicesToList
(List<UsbDevice> deviceList, List<UsbDevice> list) private static SolarisUsbDevice
getDeviceAndChildren
(String devPath, String vid, String pid, Map<String, String> nameMap, Map<String, String> vendorIdMap, Map<String, String> productIdMap, Map<String, List<String>> hubMap) Recursively creates SolarisUsbDevices by fetching information from maps to populate fieldsgetUsbDevices
(boolean tree) Instantiates a list ofUsbDevice
objects, representing devices connected via a usb port (including internal devices).Methods inherited from class oshi.hardware.common.AbstractUsbDevice
compareTo, getConnectedDevices, getName, getProductId, getSerialNumber, getUniqueDeviceId, getVendor, getVendorId, toString
-
Field Details
-
PCI_TYPE_USB
- See Also:
-
-
Constructor Details
-
SolarisUsbDevice
-
-
Method Details
-
getUsbDevices
Instantiates a list ofUsbDevice
objects, representing devices connected via a usb port (including internal devices).If the value of
tree
is true, the top level devices returned from this method are the USB Controllers; connected hubs and devices in its device tree share that controller's bandwidth. If the value oftree
is false, USB devices (not controllers) are listed in a single flat list.- Parameters:
tree
- If true, returns a list of controllers, which requires recursive iteration of connected devices. If false, returns a flat list of devices excluding controllers.- Returns:
- a list of
UsbDevice
objects.
-
getUsbDevices
-
addDevicesToList
-
getDeviceAndChildren
private static SolarisUsbDevice getDeviceAndChildren(String devPath, String vid, String pid, Map<String, String> nameMap, Map<String, String> vendorIdMap, Map<String, String> productIdMap, Map<String, List<String>> hubMap) Recursively creates SolarisUsbDevices by fetching information from maps to populate fields- Parameters:
devPath
- The device node path.vid
- The default (parent) vendor IDpid
- The default (parent) product IDnameMap
- the map of namesvendorIdMap
- the map of vendorIdsproductIdMap
- the map of productIdshubMap
- the map of hubs- Returns:
- A SolarisUsbDevice corresponding to this device
-