Show / Hide Table of Contents

Interface ISerialConnection

Represents a generic serial connection.

Inherited Members
IDisposable.Dispose()
Namespace: RGB.NET.Devices.WS281X
Assembly: RGB.NET.Devices.WS281X.dll
Syntax
public interface ISerialConnection : IDisposable

Properties

| Edit this page View Source

BaudRate

Gets the baud-rate used by the serial connection.

Declaration
int BaudRate { get; }
Property Value
Type Description
int
| Edit this page View Source

IsOpen

Gets the connection-status of the serial connection. true if connected; otherwise false.

Declaration
bool IsOpen { get; }
Property Value
Type Description
bool
| Edit this page View Source

Port

Gets the COM-port used by the serial connection.

Declaration
string Port { get; }
Property Value
Type Description
string

Methods

| Edit this page View Source

DiscardInBuffer()

Discards the in-buffer of the serial connection.

Declaration
void DiscardInBuffer()
| Edit this page View Source

Open()

Opens the serial connection.

Declaration
void Open()
| Edit this page View Source

ReadByte()

Reads a single byte from the serial connection

Declaration
byte ReadByte()
Returns
Type Description
byte

The byte read.

| Edit this page View Source

ReadTo(char)

Blocks till the provided char is received from the serial connection.

Declaration
void ReadTo(char target)
Parameters
Type Name Description
char target

The target-character to read to.

| Edit this page View Source

Write(byte[], int, int)

Writes the provided data to the serial connection.

Declaration
void Write(byte[] buffer, int offset, int length)
Parameters
Type Name Description
byte[] buffer

The buffer containing the data to write.

int offset

The offset of the data in the buffer.

int length

The amount of data to write.

| Edit this page View Source

WriteLine(string)

Write the provided text to the serial connection followed by a line break.

Declaration
void WriteLine(string line)
Parameters
Type Name Description
string line

The text to write.

  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX