Show / Hide Table of Contents

Class WindowsUsbInterface

Inheritance
System.Object
UsbInterfaceBase
WindowsUsbInterface
Implements
IUsbInterface
System.IDisposable
Inherited Members
UsbInterfaceBase.Logger
UsbInterfaceBase.ReadBufferSize
UsbInterfaceBase.WriteBufferSize
UsbInterfaceBase.UsbInterfaceEndpoints
UsbInterfaceBase.ReadEndpoint
UsbInterfaceBase.WriteEndpoint
UsbInterfaceBase.InterruptWriteEndpoint
UsbInterfaceBase.InterruptReadEndpoint
UsbInterfaceBase.RegisterDefaultEndpoints()
UsbInterfaceBase.ClaimInterface()
UsbInterfaceBase.PerformControlTransferAsync(SetupPacket, Byte[], CancellationToken)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Usb.Net.Windows
Assembly: Usb.Net.dll
Syntax
public class WindowsUsbInterface : UsbInterfaceBase, IUsbInterface, IDisposable

Constructors

WindowsUsbInterface(SafeFileHandle, Byte, ILogger, Nullable<UInt16>, Nullable<UInt16>, Func<SafeFileHandle, SetupPacket, Byte[], CancellationToken, Task<TransferResult>>)

Declaration
public WindowsUsbInterface(SafeFileHandle handle, byte interfaceNumber, ILogger logger = null, ushort? readBufferSize = null, ushort? writeBufferSzie = null, Func<SafeFileHandle, SetupPacket, byte[], CancellationToken, Task<TransferResult>> performControlTransferAsync = null)
Parameters
Type Name Description
Microsoft.Win32.SafeHandles.SafeFileHandle handle
System.Byte interfaceNumber
Microsoft.Extensions.Logging.ILogger logger
System.Nullable<System.UInt16> readBufferSize
System.Nullable<System.UInt16> writeBufferSzie
System.Func<Microsoft.Win32.SafeHandles.SafeFileHandle, SetupPacket, System.Byte[], System.Threading.CancellationToken, System.Threading.Tasks.Task<TransferResult>> performControlTransferAsync

Properties

InterfaceNumber

TODO: Make private?

Declaration
public override byte InterfaceNumber { get; }
Property Value
Type Description
System.Byte
Overrides
UsbInterfaceBase.InterfaceNumber

Methods

Dispose()

Declaration
public void Dispose()

ReadAsync(UInt32, CancellationToken)

Declaration
public Task<TransferResult> ReadAsync(uint bufferLength, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.UInt32 bufferLength
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task<TransferResult>

WriteAsync(Byte[], CancellationToken)

Declaration
public Task<uint> WriteAsync(byte[] data, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.Byte[] data
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task<System.UInt32>

Implements

IUsbInterface
System.IDisposable
In This Article
Back to top Generated by DocFX