C# Class LibUsbDotNet.LudnMonoLibUsb.Internal.MonoUsbTransferContext

Inheritance: LibUsbDotNet.Main.UsbTransfer, IDisposable
ファイルを表示 Open project: arvydas/BlinkStickDotNet Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void
Fill ( IntPtr buffer, int offset, int count, int timeout ) : void

Fills the transfer with the data to UsbTransfer.Submit.

Fill ( IntPtr buffer, int offset, int count, int timeout, int isoPacketSize ) : void

Fills the transfer with the data to UsbTransfer.Submit an isochronous transfer.

MonoUsbTransferContext ( UsbEndpointBase endpointBase ) : System
Submit ( ) : ErrorCode

Submits the transfer.

This functions submits the USB transfer and return immediately.

Wait ( int &transferredCount, bool cancel ) : ErrorCode

Wait for the transfer to complete, timeout, or get cancelled.

Private Methods

Method Description
TransferCallback ( MonoUsbTransfer pTransfer ) : void
allocTransfer ( UsbEndpointBase endpointBase, bool ownsTransfer, int isoPacketSize, int count ) : void
freeTransfer ( ) : void

Method Details

Dispose() public method

public Dispose ( ) : void
return void

Fill() public method

Fills the transfer with the data to UsbTransfer.Submit.
public Fill ( IntPtr buffer, int offset, int count, int timeout ) : void
buffer System.IntPtr The buffer.
offset int The offset on the buffer where the transfer should read/write.
count int The number of bytes to transfer.
timeout int Time (milliseconds) to wait before the transfer times out.
return void

Fill() public method

Fills the transfer with the data to UsbTransfer.Submit an isochronous transfer.
public Fill ( IntPtr buffer, int offset, int count, int timeout, int isoPacketSize ) : void
buffer System.IntPtr The buffer.
offset int The offset on the buffer where the transfer should read/write.
count int The number of bytes to transfer.
timeout int Time (milliseconds) to wait before the transfer times out.
isoPacketSize int Size of each isochronous packet.
return void

MonoUsbTransferContext() public method

public MonoUsbTransferContext ( UsbEndpointBase endpointBase ) : System
endpointBase LibUsbDotNet.Main.UsbEndpointBase
return System

Submit() public method

Submits the transfer.
This functions submits the USB transfer and return immediately.
public Submit ( ) : ErrorCode
return ErrorCode

Wait() public method

Wait for the transfer to complete, timeout, or get cancelled.
public Wait ( int &transferredCount, bool cancel ) : ErrorCode
transferredCount int The number of bytes transferred on .
cancel bool Not used for libusb-1.0. Transfers are always cancelled on timeout or error.
return ErrorCode