Class UsbDeviceMatcher

java.lang.Object
com.bitwig.extension.controller.HardwareDeviceMatcher
com.bitwig.extension.controller.UsbDeviceMatcher

public class UsbDeviceMatcher extends HardwareDeviceMatcher
Defines information needed to identify suitable USB devices for use by an extension.
Since:
API version 7
  • Constructor Details

    • UsbDeviceMatcher

      public UsbDeviceMatcher(String name, String expression, UsbConfigurationMatcher configurationMatcher)
      Creates a UsbDeviceMatcher that matches a USB device that matches the supplied expression and has a configuration matching the supplied UsbConfigurationMatcher.
      Parameters:
      name - A human friendly name that describes the kind of devices this matcher tries to match.
      expression - An expression that can be used on the USB device descriptor to decide if the device matches. Variables in the expression can refer to the following fields of the device descriptor: - bDeviceClass - bDeviceSubClass - bDeviceProtocol - idVendor - idProduct For example to match a device that has vendor id 0x10 product id 0x20 the expression would be: "idVendor == 0x10 invalid input: '&'invalid input: '&' idProduct == 0x20"
      configurationMatcher - Object that tries to match a configuration on the device that it can use.
    • UsbDeviceMatcher

      public UsbDeviceMatcher(String name, String expression, UsbInterfaceMatcher... interfaceMatchers)
      Creates a UsbDeviceMatcher that matches a USB device that matches the supplied expression and has a configuration matching the supplied UsbInterfaceMatchers.
      Parameters:
      name - A human friendly name that describes the kind of devices this matcher tries to match.
      expression - An expression that can be used on the USB device descriptor to decide if the device matches. Variables in the expression can refer to the following fields of the device descriptor: - bDeviceClass - bDeviceSubClass - bDeviceProtocol - idVendor - idProduct For example to match a device that has vendor id 0x10 product id 0x20 the expression would be: "idVendor == 0x10 invalid input: '&'invalid input: '&' idProduct == 0x20"
      interfaceMatchers - UsbInterfaceMatchers that define the USB interface descriptors that a configuration of the device needs to have.
  • Method Details

    • getExpression

      public String getExpression()
      An expression that can be used on the USB device descriptor to decide if the device matches. Variables in the expression can refer to the following fields of the device descriptor: - bDeviceClass - bDeviceSubClass - bDeviceProtocol - idVendor - idProduct For example to match a device that has vendor id 0x10 product id 0x20 the expression would be: "idVendor == 0x10 invalid input: '&'invalid input: '&' idProduct == 0x20"
    • getConfigurationMatcher

      public UsbConfigurationMatcher getConfigurationMatcher()
      Object that tries to match a configuration on the device that it can use.