Bitwig Studio Control Surface API  5.0.11
UsbDeviceMatcher Class Reference
+ Inheritance diagram for UsbDeviceMatcher:

Public Member Functions

 UsbDeviceMatcher (final String name, final String expression, final UsbConfigurationMatcher configurationMatcher)
 
 UsbDeviceMatcher (final String name, final String expression, final UsbInterfaceMatcher... interfaceMatchers)
 
String getExpression ()
 
UsbConfigurationMatcher getConfigurationMatcher ()
 
- Public Member Functions inherited from HardwareDeviceMatcher
String getName ()
 

Additional Inherited Members

- Protected Member Functions inherited from HardwareDeviceMatcher
 HardwareDeviceMatcher (final String name)
 

Detailed Description

Defines information needed to identify suitable USB devices for use by an extension.

Since
API version 7

Constructor & Destructor Documentation

◆ UsbDeviceMatcher() [1/2]

UsbDeviceMatcher ( final String  name,
final String  expression,
final UsbConfigurationMatcher  configurationMatcher 
)

Creates a UsbDeviceMatcher that matches a USB device that matches the supplied expression and has a configuration matching the supplied UsbConfigurationMatcher.

Parameters
nameA human friendly name that describes the kind of devices this matcher tries to match.
expressionAn 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 && idProduct == 0x20"

Parameters
configurationMatcherObject that tries to match a configuration on the device that it can use.
See also
https://beyondlogic.org/usbnutshell/usb5.shtml for more information about USB device descriptors.

◆ UsbDeviceMatcher() [2/2]

UsbDeviceMatcher ( final String  name,
final String  expression,
final UsbInterfaceMatcher...  interfaceMatchers 
)

Creates a UsbDeviceMatcher that matches a USB device that matches the supplied expression and has a configuration matching the supplied UsbInterfaceMatchers.

Parameters
nameA human friendly name that describes the kind of devices this matcher tries to match.
expressionAn 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 && idProduct == 0x20"

Parameters
interfaceMatchersUsbInterfaceMatchers that define the USB interface descriptors that a configuration of the device needs to have.
See also
https://beyondlogic.org/usbnutshell/usb5.shtml for more information about USB device descriptors.

Member Function Documentation

◆ getConfigurationMatcher()

UsbConfigurationMatcher getConfigurationMatcher ( )

Object that tries to match a configuration on the device that it can use.

◆ getExpression()

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 && idProduct == 0x20"


The documentation for this class was generated from the following file: