Show / Hide Table of Contents

Class SerialConnectionUpdateQueue<TData>

Represents a generic UpdateQueue<TIdentifier, TData> using an object as the key and a color as the value.

Inheritance
object
AbstractReferenceCounting
UpdateQueue<object, Color>
UpdateQueue
SerialConnectionUpdateQueue<TData>
ArduinoWS2812USBUpdateQueue
BitwizardWS2812USBUpdateQueue
Implements
IUpdateQueue
IUpdateQueue<object, Color>
IReferenceCounting
IDisposable
Inherited Members
UpdateQueue<object, Color>.RequiresFlush
UpdateQueue<object, Color>.OnUpdate(object, CustomUpdateData)
UpdateQueue<object, Color>.OnStartup(object, CustomUpdateData)
UpdateQueue<object, Color>.Update(in ReadOnlySpan<(object key, Color color)>)
UpdateQueue<object, Color>.SetData(ReadOnlySpan<(object, Color)>)
UpdateQueue<object, Color>.Reset()
UpdateQueue<object, Color>.Dispose()
AbstractReferenceCounting.ActiveReferenceCount
AbstractReferenceCounting.AddReferencingObject(object)
AbstractReferenceCounting.RemoveReferencingObject(object)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: RGB.NET.Devices.WS281X
Assembly: RGB.NET.Devices.WS281X.dll
Syntax
public abstract class SerialConnectionUpdateQueue<TData> : UpdateQueue, IUpdateQueue, IUpdateQueue<object, Color>, IReferenceCounting, IDisposable
Type Parameters
Name Description
TData

The type of data sent through the serial connection.

Properties

| Edit this page View Source

Prompt

Gets or sets the prompt to wait for between sending commands.

Declaration
protected char Prompt { get; set; }
Property Value
Type Description
char
| Edit this page View Source

SerialConnection

Gets the serial port used by this queue.

Declaration
protected ISerialConnection SerialConnection { get; }
Property Value
Type Description
ISerialConnection

Methods

| Edit this page View Source

GetCommands(IList<(object key, Color color)>)

Gets the commands that need to be sent to the device to update the requested colors.

Declaration
protected abstract IEnumerable<TData> GetCommands(IList<(object key, Color color)> dataSet)
Parameters
Type Name Description
IList<(object key, Color color)> dataSet

The set of data that needs to be updated.

Returns
Type Description
IEnumerable<TData>

The commands to be sent.

| Edit this page View Source

OnStartup(object?, CustomUpdateData)

Event handler for the Starting-event.

Declaration
protected override void OnStartup(object? sender, CustomUpdateData customData)
Parameters
Type Name Description
object sender

The starting IUpdateTrigger.

CustomUpdateData customData

CustomUpdateData provided by the trigger.

Overrides
UpdateQueue<object, Color>.OnStartup(object, CustomUpdateData)
| Edit this page View Source

SendCommand(TData)

Sends a command as a string followed by a line-break to the device. This most likely needs to be overwritten if the data-type isn't string.

Declaration
protected virtual void SendCommand(TData command)
Parameters
Type Name Description
TData command

The command to be sent.

| Edit this page View Source

Update(in ReadOnlySpan<(object key, Color color)>)

Performs the update this queue is responsible for.

Declaration
protected override bool Update(in ReadOnlySpan<(object key, Color color)> dataSet)
Parameters
Type Name Description
ReadOnlySpan<(object key, Color color)> dataSet

The set of data that needs to be updated.

Returns
Type Description
bool
Overrides
UpdateQueue<object, Color>.Update(in ReadOnlySpan<(object key, Color color)>)

Implements

IUpdateQueue
IUpdateQueue<TIdentifier, TData>
IReferenceCounting
IDisposable
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX