Class MacUsbDevice
java.lang.Object
oshi.hardware.common.AbstractUsbDevice
oshi.hardware.platform.mac.MacUsbDevice
- All Implemented Interfaces:
Comparable<UsbDevice>, UsbDevice
- Direct Known Subclasses:
MacUsbDeviceJNA
Mac USB device base class.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNo-arg constructor required so thatMacUsbDeviceJNAandMacUsbDeviceFFM, which extend this class solely to inherit its static helper methods, can compile without an explicit constructor.protectedMacUsbDevice(String name, String vendor, String vendorId, String productId, String serialNumber, String uniqueDeviceId, List<UsbDevice> connectedDevices) -
Method Summary
Modifier and TypeMethodDescriptionprotected static MacUsbDevicegetDeviceAndChildren(Long registryEntryId, String vid, String pid, Map<Long, String> nameMap, Map<Long, String> vendorMap, Map<Long, String> vendorIdMap, Map<Long, String> productIdMap, Map<Long, String> serialMap, Map<Long, List<Long>> hubMap) Recursively creates MacUsbDevices by fetching information from maps to populate fieldsMethods inherited from class AbstractUsbDevice
addDevicesToList, compareTo, getConnectedDevices, getName, getProductId, getSerialNumber, getUniqueDeviceId, getVendor, getVendorId, toString
-
Constructor Details
-
MacUsbDevice
-
MacUsbDevice
protected MacUsbDevice()No-arg constructor required so thatMacUsbDeviceJNAandMacUsbDeviceFFM, which extend this class solely to inherit its static helper methods, can compile without an explicit constructor. Neither subclass is ever instantiated; only this class is, via the full constructor.
-
-
Method Details
-
getDeviceAndChildren
protected static MacUsbDevice getDeviceAndChildren(Long registryEntryId, String vid, String pid, Map<Long, String> nameMap, Map<Long, String> vendorMap, Map<Long, String> vendorIdMap, Map<Long, String> productIdMap, Map<Long, String> serialMap, Map<Long, List<Long>> hubMap) Recursively creates MacUsbDevices by fetching information from maps to populate fields- Parameters:
registryEntryId- The device unique registry id.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 MacUsbDevice corresponding to this device
-