C# Class HidSharp.HidStream

Inheritance: Stream
Show file Open project: arvydas/BlinkStickDotNet Class Usage Examples

Public Methods

Method Description
BeginRead ( byte buffer, int offset, int count, AsyncCallback callback, object state ) : IAsyncResult
BeginWrite ( byte buffer, int offset, int count, AsyncCallback callback, object state ) : IAsyncResult
EndRead ( IAsyncResult asyncResult ) : int
EndWrite ( IAsyncResult asyncResult ) : void
Flush ( ) : void
GetFeature ( byte buffer ) : void

Sends a Get Feature setup request.

GetFeature ( byte buffer, int offset, int count ) : void

Sends a Get Feature setup request.

Read ( ) : byte[]

Reads HID Input Reports.

Read ( byte buffer ) : int

Reads HID Input Reports.

Seek ( long offset, SeekOrigin origin ) : long
SetFeature ( byte buffer ) : void

Sends a Set Feature setup request.

SetFeature ( byte buffer, int offset, int count ) : void

Sends a Set Feature setup request.

SetLength ( long value ) : void
Write ( byte buffer ) : void

Writes an HID Output Report to the device.

Private Methods

Method Description
CommonRead ( byte buffer, int offset, int count, Queue queue ) : int
CommonWrite ( byte buffer, int offset, int count, Queue queue, bool feature, int maxOutputReportLength ) : void
GetTimeout ( int startTime, int timeout ) : int
HandleAcquire ( ) : bool
HandleAcquireIfOpenOrFail ( ) : void
HandleClose ( ) : bool
HandleFree ( ) : void
HandleInitAndOpen ( ) : void
HandleRelease ( ) : void
HidStream ( ) : System

Method Details

BeginRead() public method

public BeginRead ( byte buffer, int offset, int count, AsyncCallback callback, object state ) : IAsyncResult
buffer byte
offset int
count int
callback AsyncCallback
state object
return IAsyncResult

BeginWrite() public method

public BeginWrite ( byte buffer, int offset, int count, AsyncCallback callback, object state ) : IAsyncResult
buffer byte
offset int
count int
callback AsyncCallback
state object
return IAsyncResult

EndRead() public method

public EndRead ( IAsyncResult asyncResult ) : int
asyncResult IAsyncResult
return int

EndWrite() public method

public EndWrite ( IAsyncResult asyncResult ) : void
asyncResult IAsyncResult
return void

Flush() public method

public Flush ( ) : void
return void

GetFeature() public method

Sends a Get Feature setup request.
public GetFeature ( byte buffer ) : void
buffer byte The buffer to fill. Place the Report ID in the first byte.
return void

GetFeature() public abstract method

Sends a Get Feature setup request.
public abstract GetFeature ( byte buffer, int offset, int count ) : void
buffer byte The buffer to fill. Place the Report ID in the byte at index .
offset int The index in the buffer to begin filling with data.
count int The number of bytes in the feature request.
return void

Read() public method

Reads HID Input Reports.
public Read ( ) : byte[]
return byte[]

Read() public method

Reads HID Input Reports.
public Read ( byte buffer ) : int
buffer byte The buffer to place the reports into.
return int

Seek() public method

public Seek ( long offset, SeekOrigin origin ) : long
offset long
origin SeekOrigin
return long

SetFeature() public method

Sends a Set Feature setup request.
public SetFeature ( byte buffer ) : void
buffer byte The buffer of data to send. Place the Report ID in the first byte.
return void

SetFeature() public abstract method

Sends a Set Feature setup request.
public abstract SetFeature ( byte buffer, int offset, int count ) : void
buffer byte The buffer of data to send. Place the Report ID in the byte at index .
offset int The index in the buffer to start the write from.
count int The number of bytes in the feature request.
return void

SetLength() public method

public SetLength ( long value ) : void
value long
return void

Write() public method

Writes an HID Output Report to the device.
public Write ( byte buffer ) : void
buffer byte The buffer containing the report. Place the Report ID in the first byte.
return void