Class HidDevice
Inheritance
System.Object
HidDevice
Implements
System.IDisposable
Inherited Members
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()
Assembly: Hid.Net.dll
Syntax
public sealed class HidDevice : DeviceBase, IHidDevice, IDevice, IDisposable
Constructors
Declaration
public HidDevice(IHidDeviceHandler hidDeviceHandler, ILoggerFactory loggerFactory = null, Func<Report, TransferResult> readReportTransform = null, WriteReportTransform writeReportTransform = null)
Parameters
Properties
ConnectedDeviceDefinition
Declaration
public ConnectedDeviceDefinition ConnectedDeviceDefinition { get; }
Property Value
IsInitialized
Declaration
public bool IsInitialized { get; }
Property Value
Type |
Description |
System.Boolean |
|
IsReadOnly
Declaration
public bool? IsReadOnly { get; }
Property Value
Type |
Description |
System.Nullable<System.Boolean> |
|
ReadBufferSize
Declaration
public ushort ReadBufferSize { get; }
Property Value
Type |
Description |
System.UInt16 |
|
WriteBufferSize
Declaration
public ushort WriteBufferSize { get; }
Property Value
Type |
Description |
System.UInt16 |
|
Methods
Close()
Declaration
Dispose()
Declaration
public sealed override void Dispose()
Overrides
InitializeAsync(CancellationToken)
Declaration
public async Task InitializeAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type |
Name |
Description |
System.Threading.CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
ReadAsync(CancellationToken)
Declaration
public override async Task<TransferResult> ReadAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type |
Name |
Description |
System.Threading.CancellationToken |
cancellationToken |
|
Returns
Overrides
ReadReportAsync(CancellationToken)
Declaration
public async Task<Report> ReadReportAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type |
Name |
Description |
System.Threading.CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<Report> |
|
WriteAsync(Byte[], CancellationToken)
Write a report. The report Id comes from DefaultReportId, or the first byte in the array if the DefaultReportId is null
Declaration
public override 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> |
|
Overrides
WriteReportAsync(Byte[], Byte, CancellationToken)
Declaration
public async Task<uint> WriteReportAsync(byte[] data, byte reportId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type |
Name |
Description |
System.Byte[] |
data |
|
System.Byte |
reportId |
|
System.Threading.CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.UInt32> |
|
Implements
System.IDisposable