Class ArduinoWS2812USBUpdateQueue
Represents a generic UpdateQueue<TIdentifier, TData> using an object as the key and a color as the value.
Inheritance
ArduinoWS2812USBUpdateQueue
Inherited Members
Namespace: RGB.NET.Devices.WS281X.Arduino
Assembly: RGB.NET.Devices.WS281X.dll
Syntax
public sealed class ArduinoWS2812USBUpdateQueue : SerialConnectionUpdateQueue<byte[]>, IUpdateQueue, IUpdateQueue<object, Color>, IReferenceCounting, IDisposable
Constructors
| Edit this page View SourceArduinoWS2812USBUpdateQueue(IDeviceUpdateTrigger, ISerialConnection)
Initializes a new instance of the ArduinoWS2812USBUpdateQueue class.
Declaration
public ArduinoWS2812USBUpdateQueue(IDeviceUpdateTrigger updateTrigger, ISerialConnection serialConnection)
Parameters
Type | Name | Description |
---|---|---|
IDeviceUpdateTrigger | updateTrigger | The update trigger used by this queue. |
ISerialConnection | serialConnection | The serial connection used to access the device. |
Methods
| Edit this page View SourceGetCommands(IList<(object key, Color color)>)
Gets the commands that need to be sent to the device to update the requested colors.
Declaration
protected override IEnumerable<byte[]> 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<byte[]> | The commands to be sent. |
Overrides
| Edit this page View SourceOnStartup(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
| Edit this page View SourceSendCommand(byte[])
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 override void SendCommand(byte[] command)
Parameters
Type | Name | Description |
---|---|---|
byte[] | command | The command to be sent. |