Bitwig Studio Control Surface API  4.0.1
UsbEndpointMatcher.java
1 package com.bitwig.extension.controller;
2 
5 
6 public class UsbEndpointMatcher extends UsbMatcher
7 {
8  public UsbEndpointMatcher(
9  final UsbTransferDirection direction,
10  final UsbTransferType transferType,
11  final String expression,
12  final int matchOccurrenceIndex)
13  {
14  super(expression, matchOccurrenceIndex);
15 
16  mDirection = direction;
17  mTransferType = transferType;
18  }
19 
20  public UsbEndpointMatcher(
21  final UsbTransferDirection direction,
22  final UsbTransferType transferType,
23  final String expression)
24  {
25  this(direction, transferType, expression, 1);
26  }
27 
28  public UsbEndpointMatcher(final UsbTransferType transferType, final byte bEndpointAddress)
29  {
30  this(UsbTransferDirection.getForEndpointAddress(bEndpointAddress), transferType, "bEndpointAddress == " + (bEndpointAddress & 0xff));
31  }
32 
33  public UsbTransferDirection getDirection()
34  {
35  return mDirection;
36  }
37 
38  public UsbTransferType getTransferType()
39  {
40  return mTransferType;
41  }
42 
43  private final UsbTransferDirection mDirection;
44 
45  private final UsbTransferType mTransferType;
46 }