ControlTransferInfo constructor

ControlTransferInfo({
  1. required Direction direction,
  2. required Recipient recipient,
  3. required RequestType requestType,
  4. required int request,
  5. required int value,
  6. required int index,
  7. int? length,
  8. ByteBuffer? data,
  9. int? timeout,
})

Implementation

ControlTransferInfo({
  /// The transfer direction (`"in"` or `"out"`).
  required Direction direction,

  /// The transfer target. The target given by `index` must be
  /// claimed if `"interface"` or `"endpoint"`.
  required Recipient recipient,

  /// The request type.
  required RequestType requestType,

  /// The `bRequest` field, see <i>Universal Serial Bus
  /// Specification Revision 1.1</i> &sect; 9.3.
  required int request,

  /// The `wValue` field, see <i>Ibid</i>.
  required int value,

  /// The `wIndex` field, see <i>Ibid</i>.
  required int index,

  /// The maximum number of bytes to receive (required only by input
  /// transfers).
  int? length,

  /// The data to transmit (required only by output transfers).
  ByteBuffer? data,

  /// Request timeout (in milliseconds). The default value `0`
  /// indicates no timeout.
  int? timeout,
}) : _wrapped = $js.ControlTransferInfo(
        direction: direction.toJS,
        recipient: recipient.toJS,
        requestType: requestType.toJS,
        request: request,
        value: value,
        index: index,
        length: length,
        data: data?.toJS,
        timeout: timeout,
      );