Class MacUsbDevice

java.lang.Object
oshi.hardware.common.AbstractUsbDevice
oshi.hardware.platform.mac.MacUsbDevice
All Implemented Interfaces:
Comparable<UsbDevice>, UsbDevice
Direct Known Subclasses:
MacUsbDeviceJNA

@Immutable public class MacUsbDevice extends AbstractUsbDevice
Mac USB device base class.
  • Constructor Details

    • MacUsbDevice

      protected MacUsbDevice(String name, String vendor, String vendorId, String productId, String serialNumber, String uniqueDeviceId, List<UsbDevice> connectedDevices)
    • MacUsbDevice

      protected MacUsbDevice()
      No-arg constructor required so that MacUsbDeviceJNA and MacUsbDeviceFFM, 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 ID
      pid - The default (parent) product ID
      nameMap - the map of names
      vendorMap - the map of vendors
      vendorIdMap - the map of vendorIds
      productIdMap - the map of productIds
      serialMap - the map of serial numbers
      hubMap - the map of hubs
      Returns:
      A MacUsbDevice corresponding to this device