C# 클래스 LibUsbDotNet.Main.UsbEndpointBase

Endpoint members common to Read, Write, Bulk, and Interrupt T:LibUsbDotNet.Main.EndpointType.
상속: IDisposable
파일 보기 프로젝트 열기: arvydas/BlinkStickDotNet 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
MaxReadWrite int

Private Properties

프로퍼티 타입 설명
CreateTransferContext UsbTransfer
DisposeAndRemoveFromList void
ReadPipe int
UsbEndpointBase System
WritePipe int

공개 메소드들

메소드 설명
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.

비공개 메소드들

메소드 설명
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

메소드 상세

Abort() 공개 메소드

Aborts pending IO operation on this enpoint of one exists.
public Abort ( ) : bool
리턴 bool

Dispose() 공개 메소드

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

Flush() 공개 메소드

Discards any data that is cached in this endpoint.
public Flush ( ) : bool
리턴 bool

LookupEndpointInfo() 공개 정적인 메소드

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.
리턴 bool

NewAsyncTransfer() 공개 메소드

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
리턴 UsbTransfer

Reset() 공개 메소드

Resets the data toggle and clears the stall condition on an enpoint.
public Reset ( ) : bool
리턴 bool

SubmitAsyncTransfer() 공개 메소드

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.
리턴 ErrorCode

SubmitAsyncTransfer() 공개 메소드

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.
리턴 ErrorCode

Transfer() 공개 메소드

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.
리턴 ErrorCode

Transfer() 공개 메소드

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.
리턴 ErrorCode

프로퍼티 상세

MaxReadWrite 공개적으로 정적으로 프로퍼티

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
리턴 int