UsbDeviceConnection.BulkTransfer Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
BulkTransfer(UsbEndpoint, Byte[], Int32, Int32) |
Performs a bulk transaction on the given endpoint. |
BulkTransfer(UsbEndpoint, Byte[], Int32, Int32, Int32) |
Performs a bulk transaction on the given endpoint. |
BulkTransfer(UsbEndpoint, Byte[], Int32, Int32)
Performs a bulk transaction on the given endpoint.
[Android.Runtime.Register("bulkTransfer", "(Landroid/hardware/usb/UsbEndpoint;[BII)I", "GetBulkTransfer_Landroid_hardware_usb_UsbEndpoint_arrayBIIHandler")]
public virtual int BulkTransfer (Android.Hardware.Usb.UsbEndpoint? endpoint, byte[]? buffer, int length, int timeout);
[<Android.Runtime.Register("bulkTransfer", "(Landroid/hardware/usb/UsbEndpoint;[BII)I", "GetBulkTransfer_Landroid_hardware_usb_UsbEndpoint_arrayBIIHandler")>]
abstract member BulkTransfer : Android.Hardware.Usb.UsbEndpoint * byte[] * int * int -> int
override this.BulkTransfer : Android.Hardware.Usb.UsbEndpoint * byte[] * int * int -> int
Parameters
- endpoint
- UsbEndpoint
the endpoint for this transaction
- buffer
- Byte[]
buffer for data to send or receive; can be null
to wait for next
transaction without reading data
- length
- Int32
the length of the data to send or receive. Before
Build.VERSION_CODES#P
, a value larger than 16384 bytes
would be truncated down to 16384. In API Build.VERSION_CODES#P
and after, any value of length is valid.
- timeout
- Int32
in milliseconds, 0 is infinite
Returns
length of data transferred (or zero) for success, or negative value for failure
- Attributes
Remarks
Performs a bulk transaction on the given endpoint. The direction of the transfer is determined by the direction of the endpoint.
This method transfers data starting from index 0 in the buffer. To specify a different offset, use #bulkTransfer(UsbEndpoint, byte[], int, int, int)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
BulkTransfer(UsbEndpoint, Byte[], Int32, Int32, Int32)
Performs a bulk transaction on the given endpoint.
[Android.Runtime.Register("bulkTransfer", "(Landroid/hardware/usb/UsbEndpoint;[BIII)I", "GetBulkTransfer_Landroid_hardware_usb_UsbEndpoint_arrayBIIIHandler")]
public virtual int BulkTransfer (Android.Hardware.Usb.UsbEndpoint? endpoint, byte[]? buffer, int offset, int length, int timeout);
[<Android.Runtime.Register("bulkTransfer", "(Landroid/hardware/usb/UsbEndpoint;[BIII)I", "GetBulkTransfer_Landroid_hardware_usb_UsbEndpoint_arrayBIIIHandler")>]
abstract member BulkTransfer : Android.Hardware.Usb.UsbEndpoint * byte[] * int * int * int -> int
override this.BulkTransfer : Android.Hardware.Usb.UsbEndpoint * byte[] * int * int * int -> int
Parameters
- endpoint
- UsbEndpoint
the endpoint for this transaction
- buffer
- Byte[]
buffer for data to send or receive
- offset
- Int32
the index of the first byte in the buffer to send or receive
- length
- Int32
the length of the data to send or receive. Before
Build.VERSION_CODES#P
, a value larger than 16384 bytes
would be truncated down to 16384. In API Build.VERSION_CODES#P
and after, any value of length is valid.
- timeout
- Int32
in milliseconds, 0 is infinite
Returns
length of data transferred (or zero) for success, or negative value for failure
- Attributes
Remarks
Performs a bulk transaction on the given endpoint. The direction of the transfer is determined by the direction of the endpoint.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.