Class FreeBsdUsbDevice
java.lang.Object
oshi.hardware.common.AbstractUsbDevice
oshi.hardware.platform.unix.freebsd.FreeBsdUsbDevice
- All Implemented Interfaces:
Comparable<UsbDevice>,UsbDevice
FreeBsd Usb Device
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidaddDevicesToList(List<UsbDevice> deviceList, List<UsbDevice> list) private static FreeBsdUsbDevicegetDeviceAndChildren(String devPath, String vid, String pid, Map<String, String> nameMap, Map<String, String> vendorMap, Map<String, String> vendorIdMap, Map<String, String> productIdMap, Map<String, String> serialMap, Map<String, List<String>> hubMap) Recursively creates FreeBsdUsbDevices by fetching information from maps to populate fieldsgetUsbDevices(boolean tree) Instantiates a list ofUsbDeviceobjects, 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
-
Constructor Details
-
FreeBsdUsbDevice
-
-
Method Details
-
getUsbDevices
Instantiates a list ofUsbDeviceobjects, representing devices connected via a usb port (including internal devices).If the value of
treeis 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 oftreeis 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
UsbDeviceobjects.
-
getUsbDevices
-
addDevicesToList
-
getDeviceAndChildren
private static FreeBsdUsbDevice getDeviceAndChildren(String devPath, String vid, String pid, Map<String, String> nameMap, Map<String, String> vendorMap, Map<String, String> vendorIdMap, Map<String, String> productIdMap, Map<String, String> serialMap, Map<String, List<String>> hubMap) Recursively creates FreeBsdUsbDevices 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 namesvendorMap- the map of vendorsvendorIdMap- the map of vendorIdsproductIdMap- the map of productIdsserialMap- the map of serial numbershubMap- the map of hubs- Returns:
- A SolarisUsbDevice corresponding to this device
-