C# Class LibUsbDotNet.Main.UsbEndpointBase

Endpoint members common to Read, Write, Bulk, and Interrupt T:LibUsbDotNet.Main.EndpointType.
Inheritance: IDisposable
Afficher le fichier Open project: arvydas/BlinkStickDotNet Class Usage Examples

Méthodes publiques

Свойство Type Description
MaxReadWrite int

Private Properties

Свойство Type Description
CreateTransferContext UsbTransfer
DisposeAndRemoveFromList void
ReadPipe int
UsbEndpointBase System
WritePipe int

Méthodes publiques

Méthode Description
Abort ( ) : bool

Aborts pending IO operation on this enpoint of one exists.

Dispose ( ) : void

Frees resources associated with the endpoint. Once disposed this UsbEndpointBase cannot be used.

Flush ( ) : bool

Discards any data that is cached in this endpoint.

LookupEndpointInfo ( UsbConfigInfo currentConfigInfo, byte endpointAddress, UsbInterfaceInfo &usbInterfaceInfo, UsbEndpointInfo &usbEndpointInfo ) : bool

Looks up endpoint/interface information in a configuration.

NewAsyncTransfer ( ) : UsbTransfer

Creates a UsbTransfer context for asynchronous transfers.

This method returns a new, empty transfer context. Unlike SubmitAsyncTransfer, this context is not filled and submitted.

This is a non-blocking asynchronous transfer function. This function returns immediately after the context created.
Reset ( ) : bool

Resets the data toggle and clears the stall condition on an enpoint.

SubmitAsyncTransfer ( IntPtr buffer, int offset, int length, int timeout, UsbTransfer &transferContext ) : ErrorCode

Creates, fills and submits an asynchronous UsbTransfer context.

This is a non-blocking asynchronous transfer function. This function returns immediately after the context is created and submitted.

SubmitAsyncTransfer ( object buffer, int offset, int length, int timeout, UsbTransfer &transferContext ) : ErrorCode

Creates, fills and submits an asynchronous UsbTransfer context.

This is a non-blocking asynchronous transfer function. This function returns immediately after the context is created and submitted.

Transfer ( IntPtr buffer, int offset, int length, int timeout, int &transferLength ) : ErrorCode

Synchronous bulk/interrupt transfer function.

Transfer ( object buffer, int offset, int length, int timeout, int &transferLength ) : ErrorCode

Synchronous bulk/interrupt transfer function.

Private Methods

Méthode Description
CreateTransferContext ( ) : UsbTransfer
DisposeAndRemoveFromList ( ) : void
ReadPipe ( IntPtr pBuffer, int bufferLength, int &lengthTransferred, int isoPacketSize, IntPtr pOverlapped ) : int
UsbEndpointBase ( UsbDevice usbDevice, byte epNum, EndpointType endpointType ) : System
WritePipe ( IntPtr pBuffer, int bufferLength, int &lengthTransferred, int isoPacketSize, IntPtr pOverlapped ) : int

Method Details

Abort() public méthode

Aborts pending IO operation on this enpoint of one exists.
public Abort ( ) : bool
Résultat bool

Dispose() public méthode

Frees resources associated with the endpoint. Once disposed this UsbEndpointBase cannot be used.
public Dispose ( ) : void
Résultat void

Flush() public méthode

Discards any data that is cached in this endpoint.
public Flush ( ) : bool
Résultat bool

LookupEndpointInfo() public static méthode

Looks up endpoint/interface information in a configuration.
public static LookupEndpointInfo ( UsbConfigInfo currentConfigInfo, byte endpointAddress, UsbInterfaceInfo &usbInterfaceInfo, UsbEndpointInfo &usbEndpointInfo ) : bool
currentConfigInfo LibUsbDotNet.Info.UsbConfigInfo The config to seach.
endpointAddress byte The endpoint address to look for.
usbInterfaceInfo LibUsbDotNet.Info.UsbInterfaceInfo On success, the class for this endpoint.
usbEndpointInfo LibUsbDotNet.Info.UsbEndpointInfo On success, the class for this endpoint.
Résultat bool

NewAsyncTransfer() public méthode

Creates a UsbTransfer context for asynchronous transfers.

This method returns a new, empty transfer context. Unlike SubmitAsyncTransfer, this context is not filled and submitted.

This is a non-blocking asynchronous transfer function. This function returns immediately after the context created.
public NewAsyncTransfer ( ) : UsbTransfer
Résultat UsbTransfer

Reset() public méthode

Resets the data toggle and clears the stall condition on an enpoint.
public Reset ( ) : bool
Résultat bool

SubmitAsyncTransfer() public méthode

Creates, fills and submits an asynchronous UsbTransfer context.
This is a non-blocking asynchronous transfer function. This function returns immediately after the context is created and submitted.
public SubmitAsyncTransfer ( IntPtr buffer, int offset, int length, int timeout, UsbTransfer &transferContext ) : ErrorCode
buffer System.IntPtr A caller-allocated buffer for the data that is transferred.
offset int Position in buffer that transferring begins.
length int Number of bytes, starting from thr offset parameter to transfer.
timeout int Maximum time to wait for the transfer to complete.
transferContext UsbTransfer On , a new transfer context.
Résultat ErrorCode

SubmitAsyncTransfer() public méthode

Creates, fills and submits an asynchronous UsbTransfer context.
This is a non-blocking asynchronous transfer function. This function returns immediately after the context is created and submitted.
public SubmitAsyncTransfer ( object buffer, int offset, int length, int timeout, UsbTransfer &transferContext ) : ErrorCode
buffer object A caller-allocated buffer for the data that is transferred.
offset int Position in buffer that transferring begins.
length int Number of bytes, starting from thr offset parameter to transfer.
timeout int Maximum time to wait for the transfer to complete.
transferContext UsbTransfer On , a new transfer context.
Résultat ErrorCode

Transfer() public méthode

Synchronous bulk/interrupt transfer function.
public Transfer ( IntPtr buffer, int offset, int length, int timeout, int &transferLength ) : ErrorCode
buffer System.IntPtr An to a caller-allocated buffer.
offset int Position in buffer that transferring begins.
length int Number of bytes, starting from thr offset parameter to transfer.
timeout int Maximum time to wait for the transfer to complete.
transferLength int Number of bytes actually transferred.
Résultat ErrorCode

Transfer() public méthode

Synchronous bulk/interrupt transfer function.
public Transfer ( object buffer, int offset, int length, int timeout, int &transferLength ) : ErrorCode
buffer object A caller-allocated buffer for the transfer data. This object is pinned using .
offset int Position in buffer that transferring begins.
length int Number of bytes, starting from thr offset parameter to transfer.
timeout int Maximum time to wait for the transfer to complete.
transferLength int Number of bytes actually transferred.
Résultat ErrorCode

Property Details

MaxReadWrite public_oe static_oe property

The maximum transfer payload size for all usb endpoints.
Transfers greater than this amount are automatically split into multiple transfers. This applies to all endpoint transfer methods (reads and writes). The default is 4megs (4,194,304 bytes)
public static int MaxReadWrite
Résultat int