1 /* 2 * Copyright 2016-2022 The OSHI Project Contributors 3 * SPDX-License-Identifier: MIT 4 */ 5 package oshi.hardware; 6 7 import java.util.List; 8 9 import oshi.annotation.concurrent.Immutable; 10 11 /** 12 * A USB device is a device connected via a USB port, possibly internally/permanently. Hubs may contain ports to which 13 * other devices connect in a recursive fashion. 14 */ 15 @Immutable 16 public interface UsbDevice extends Comparable<UsbDevice> { 17 /** 18 * Name of the USB device 19 * 20 * @return The device name 21 */ 22 String getName(); 23 24 /** 25 * Vendor that manufactured the USB device 26 * 27 * @return The vendor name 28 */ 29 String getVendor(); 30 31 /** 32 * ID of the vendor that manufactured the USB device 33 * 34 * @return The vendor ID, a 4-digit hex string 35 */ 36 String getVendorId(); 37 38 /** 39 * Product ID of the USB device 40 * 41 * @return The product ID, a 4-digit hex string 42 */ 43 String getProductId(); 44 45 /** 46 * Serial number of the USB device 47 * 48 * @return The serial number, if known 49 */ 50 String getSerialNumber(); 51 52 /** 53 * A Unique Device ID of the USB device, such as the PnPDeviceID (Windows), Device Node Path (Linux), Registry Entry 54 * ID (macOS), or Device Node number (Unix) 55 * 56 * @return The Unique Device ID 57 */ 58 String getUniqueDeviceId(); 59 60 /** 61 * Other devices connected to this hub 62 * 63 * @return An {@code UnmodifiableList} of other devices connected to this hub, if any, or an empty list if none 64 */ 65 List<UsbDevice> getConnectedDevices(); 66 }