C# Class LibUsbDotNet.Main.UsbTransferQueue

Helper class for maintaining a user defined number of outstanding aync transfers on an endpoint.
Afficher le fichier Open project: arvydas/BlinkStickDotNet Class Usage Examples

Méthodes publiques

Свойство Type Description
BufferSize int
EndpointBase UsbEndpointBase
IsoPacketSize int
MaxOutstandingIO int
Timeout int

Méthodes publiques

Méthode Description
Free ( ) : void

Cancels and frees all oustanding transfers.

Transfer ( Handle &handle ) : ErrorCode

Submits transfers until MaxOutstandingIO is reached then waits for the oldest transfer to complete.

UsbTransferQueue ( UsbEndpointBase endpointBase, int maxOutstandingIO, int bufferSize, int timeout, int isoPacketSize ) : System

Creates a new transfer queue instance.

this ( int index ) : byte[]

Gets the transfer data buffer at the specified index.

Private Methods

Méthode Description
IncWithRoll ( int &incField, int rollOverValue ) : void
free ( UsbTransferQueue transferParam ) : void
transfer ( UsbTransferQueue transferParam, Handle &handle ) : ErrorCode

Method Details

Free() public méthode

Cancels and frees all oustanding transfers.
public Free ( ) : void
Résultat void

Transfer() public méthode

Submits transfers until MaxOutstandingIO is reached then waits for the oldest transfer to complete.
public Transfer ( Handle &handle ) : ErrorCode
handle Handle The queue handle to the that completed.
Résultat ErrorCode

UsbTransferQueue() public méthode

Creates a new transfer queue instance.
public UsbTransferQueue ( UsbEndpointBase endpointBase, int maxOutstandingIO, int bufferSize, int timeout, int isoPacketSize ) : System
endpointBase UsbEndpointBase The endpoint to transfer data to/from.
maxOutstandingIO int The number of transfers to before waiting for a completion.
bufferSize int The size of each data buffer.
timeout int The maximum time to wait for each transfer.
isoPacketSize int For isochronous use only. The iso packet size. If 0, the endpoints max packet size is used.
Résultat System

this() public méthode

Gets the transfer data buffer at the specified index.
public this ( int index ) : byte[]
index int The index of the buffer to retrieve.
Résultat byte[]

Property Details

BufferSize public_oe property

Size (in bytes) of each data buffer in this transfer queue.
public int BufferSize
Résultat int

EndpointBase public_oe property

Endpoint for I/O operations.
public UsbEndpointBase,LibUsbDotNet.Main EndpointBase
Résultat UsbEndpointBase

IsoPacketSize public_oe property

For isochronous use only. The iso packet size.
public int IsoPacketSize
Résultat int

MaxOutstandingIO public_oe property

Maximum outstanding I/O operations before waiting for a completion. This is also the number of data buffers allocated for this transfer queue.
public int MaxOutstandingIO
Résultat int

Timeout public_oe property

Time (in milliseconds) to wait for a transfer to complete before returning ErrorCode.IoTimedOut.
public int Timeout
Résultat int