Interface ISerialPort
Interface to wrap any Serial Port implementation.
Inherited Members
System.IDisposable.Dispose()
Namespace: Unosquare.Sparkfun.FingerprintModule.SerialPort
Syntax
public interface ISerialPort : IDisposable
Properties
BytesToRead
Gets the bytes to read.
Declaration
int BytesToRead { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The bytes to read. |
IsOpen
Gets a value indicating whether this instance is open.
Declaration
bool IsOpen { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
PortName
Gets the name of the port.
Declaration
string PortName { get; }
Property Value
Type | Description |
---|---|
System.String | The name of the port. |
Methods
Close()
Closes this instance.
Declaration
void Close()
FlushAsync(CancellationToken)
Flushes the asynchronous.
Declaration
Task FlushAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task representing the flush action. |
Open()
Opens this instance.
Declaration
void Open()
ReadAsync(Byte[], Int32, Int32, CancellationToken)
Reads the asynchronous.
Declaration
Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | The buffer. |
System.Int32 | offset | The offset. |
System.Int32 | count | The count. |
System.Threading.CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int32> | A task representing the count of bytes from the read. |
WriteAsync(Byte[], Int32, Int32, CancellationToken)
Writes the asynchronous.
Declaration
Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | The buffer. |
System.Int32 | offset | The offset. |
System.Int32 | count | The count. |
System.Threading.CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task representing the write action. |
See Also
System.IDisposable