C# Class LibUsbDotNet.LudnMonoLibUsb.Internal.MonoUsbTransferContext

Inheritance: LibUsbDotNet.Main.UsbTransfer, IDisposable
Afficher le fichier Open project: arvydas/BlinkStickDotNet Class Usage Examples

Méthodes publiques

Méthode 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

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

Method Details

Dispose() public méthode

public Dispose ( ) : void
Résultat void

Fill() public méthode

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.
Résultat void

Fill() public méthode

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.
Résultat void

MonoUsbTransferContext() public méthode

public MonoUsbTransferContext ( UsbEndpointBase endpointBase ) : System
endpointBase LibUsbDotNet.Main.UsbEndpointBase
Résultat System

Submit() public méthode

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

Wait() public méthode

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.
Résultat ErrorCode