Package oshi.hardware
Interface UsbDevice
- All Superinterfaces:
java.lang.Comparable<UsbDevice>
- All Known Implementing Classes:
AbstractUsbDevice
,FreeBsdUsbDevice
,LinuxUsbDevice
,MacUsbDevice
,SolarisUsbDevice
,WindowsUsbDevice
@Immutable public interface UsbDevice extends java.lang.Comparable<UsbDevice>
A USB device is a device connected via a USB port, possibly
internally/permanently. Hubs may contain ports to which other devices connect
in a recursive fashion.
-
Method Summary
Modifier and Type Method Description UsbDevice[]
getConnectedDevices()
Other devices connected to this hubjava.lang.String
getName()
Name of the USB devicejava.lang.String
getProductId()
Product ID of the USB devicejava.lang.String
getSerialNumber()
Serial number of the USB devicejava.lang.String
getUniqueDeviceId()
A Unique Device ID of the USB device, such as the PnPDeviceID (Windows), Device Node Path (Linux), Registry Entry ID (macOS), or Device Node number (Unix)java.lang.String
getVendor()
Vendor that manufactured the USB devicejava.lang.String
getVendorId()
ID of the vendor that manufactured the USB device
-
Method Details
-
getName
java.lang.String getName()Name of the USB device- Returns:
- The device name
-
getVendor
java.lang.String getVendor()Vendor that manufactured the USB device- Returns:
- The vendor name
-
getVendorId
java.lang.String getVendorId()ID of the vendor that manufactured the USB device- Returns:
- The vendor ID, a 4-digit hex string
-
getProductId
java.lang.String getProductId()Product ID of the USB device- Returns:
- The product ID, a 4-digit hex string
-
getSerialNumber
java.lang.String getSerialNumber()Serial number of the USB device- Returns:
- The serial number, if known
-
getUniqueDeviceId
java.lang.String getUniqueDeviceId()A Unique Device ID of the USB device, such as the PnPDeviceID (Windows), Device Node Path (Linux), Registry Entry ID (macOS), or Device Node number (Unix)- Returns:
- The Unique Device ID
-
getConnectedDevices
UsbDevice[] getConnectedDevices()Other devices connected to this hub- Returns:
- An array of other devices connected to this hub, if any, or an empty array if none
-