Contents

createMatchingDictionaryWithVendorID:productID:bcdDevice:deviceClass:deviceSubclass:deviceProtocol:speed:productIDArray:

Creates a matching dictionary to find a USB device.

Declaration

+ (CFMutableDictionaryRef) createMatchingDictionaryWithVendorID:(NSNumber *) vendorID productID:(NSNumber *) productID bcdDevice:(NSNumber *) bcdDevice deviceClass:(NSNumber *) deviceClass deviceSubclass:(NSNumber *) deviceSubclass deviceProtocol:(NSNumber *) deviceProtocol speed:(NSNumber *) speed productIDArray:(NSArray *) productIDArray;

Parameters

  • vendorID:

    The vendor ID for the device you’re searching for.

  • productID:

    The product ID for the device you’re searching for.

  • bcdDevice:

    The release number of the device you’re searching for.

  • deviceClass:

    The class of the device you’re searching for.

  • deviceSubclass:

    The subclass of the device you’re searching for.

  • deviceProtocol:

    The protocol of the device you’re searching for.

  • speed:

    The enumeration speed of the device you’re searching for. Add the speed to any of the keys in the table below.

  • productIDArray:

    An array of product IDs to match against. Don’t use this parameter with the productID parameter.

Return Value

A dictionary to pass to IOKit matching methods, such as IOServiceGetMatchingService(_:_:). The caller must release this object when done.

Discussion

The table below shows the keys you can use to make a successful matching dictionary. A plus sign (+) separates the keys to emphasize the requirement that all of the specified keys combine.

The table presents the keys in order of specificity. The first key defines the most specific search, and the last key defines the broadest search.

Keys

Notes

1425819 Idvendor + 1426145 Idproduct + 1425514 Bcddevice

None.

1425819 Idvendor + 1426145 Idproduct

None.

1425819 Idvendor + 1425757 Bdevicesubclass + 1425787 Bdeviceprotocol

Use these keys only if the device’s 1425902 Bdeviceclass is set to 0xFF.

1425819 Idvendor + 1425757 Bdevicesubclass

Use these keys only if the device’s 1425902 Bdeviceclass is set to 0xFF.

1425902 Bdeviceclass + 1425757 Bdevicesubclass + 1425787 Bdeviceprotocol

Use these keys only if the device’s 1425902 Bdeviceclass is not set to 0xFF.

1425902 Bdeviceclass + 1425757 Bdevicesubclass

Use these keys only if the device’s 1425902 Bdeviceclass is not set to 0xFF.

Topics

Properties

See Also

Related Documentation