Show / Hide Table of Contents

Class AbstractRGBDevice<TDeviceInfo>

Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.

Inheritance
object
AbstractBindable
Placeable
AbstractRGBDevice<TDeviceInfo>
AsusRGBDevice<TDeviceInfo>
CoolerMasterRGBDevice<TDeviceInfo>
CorsairRGBDevice<TDeviceInfo>
CorsairRGBDevice<TDeviceInfo>
E131Device
DebugRGBDevice
LogitechRGBDevice<TDeviceInfo>
MsiRGBDevice<TDeviceInfo>
NovationRGBDevice<TDeviceInfo>
AbstractOpenRGBDevice<TDeviceInfo>
PicoPiRGBDevice
RazerRGBDevice
SteelSeriesRGBDevice
ArduinoWS2812USBDevice
BitwizardWS2812USBDevice
NodeMCUWS2812USBDevice
WootingRGBDevice<TDeviceInfo>
Implements
IRGBDevice<TDeviceInfo>
IRGBDevice
IEnumerable<Led>
IEnumerable
IPlaceable
IBindable
INotifyPropertyChanged
IDisposable
Inherited Members
Placeable.Parent
Placeable.Location
Placeable.Size
Placeable.Scale
Placeable.Rotation
Placeable.ActualLocation
Placeable.ActualSize
Placeable.Boundary
Placeable.LocationChanged
Placeable.SizeChanged
Placeable.ScaleChanged
Placeable.RotationChanged
Placeable.ActualLocationChanged
Placeable.ActualSizeChanged
Placeable.BoundaryChanged
Placeable.UpdateActualPlaceableData()
Placeable.OnLocationChanged()
Placeable.OnSizeChanged()
Placeable.OnScaleChanged()
Placeable.OnRotationChanged()
Placeable.OnActualLocationChanged()
Placeable.OnActualSizeChanged()
Placeable.OnBoundaryChanged()
AbstractBindable.PropertyChanged
AbstractBindable.RequiresUpdate<T>(ref T, T)
AbstractBindable.SetProperty<T>(ref T, T, string)
AbstractBindable.OnPropertyChanged(string)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: RGB.NET.Core
Assembly: RGB.NET.Core.dll
Syntax
public abstract class AbstractRGBDevice<TDeviceInfo> : Placeable, IRGBDevice<TDeviceInfo>, IRGBDevice, IEnumerable<Led>, IEnumerable, IPlaceable, IBindable, INotifyPropertyChanged, IDisposable where TDeviceInfo : class, IRGBDeviceInfo
Type Parameters
Name Description
TDeviceInfo

Constructors

| Edit this page View Source

AbstractRGBDevice(TDeviceInfo, IUpdateQueue)

Initializes a new instance of the AbstractRGBDevice<TDeviceInfo> class.

Declaration
protected AbstractRGBDevice(TDeviceInfo deviceInfo, IUpdateQueue updateQueue)
Parameters
Type Name Description
TDeviceInfo deviceInfo

The device info of this device.

IUpdateQueue updateQueue

The queue used to update this device.

Properties

| Edit this page View Source

ColorCorrections

Gets a list of color corrections applied to this device.

Declaration
public IList<IColorCorrection> ColorCorrections { get; }
Property Value
Type Description
IList<IColorCorrection>
| Edit this page View Source

DeviceInfo

Gets generic information about the IRGBDevice.

Declaration
public TDeviceInfo DeviceInfo { get; }
Property Value
Type Description
TDeviceInfo
| Edit this page View Source

LedMapping

Gets a dictionary containing all Led of the IRGBDevice.

Declaration
protected Dictionary<LedId, Led> LedMapping { get; }
Property Value
Type Description
Dictionary<LedId, Led>
| Edit this page View Source

RequiresFlush

Gets or sets if the device needs to be flushed on every update.

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

UpdateQueue

Gets the update queue used to update this device.

Declaration
protected IUpdateQueue UpdateQueue { get; }
Property Value
Type Description
IUpdateQueue

Methods

| Edit this page View Source

AddLed(LedId, in Point, in Size, object?)

Adds a led to the device.

Declaration
public virtual Led? AddLed(LedId ledId, in Point location, in Size size, object? customData = null)
Parameters
Type Name Description
LedId ledId

The id of the led.

Point location

The location of the led on the device.

Size size

The size of the led.

object customData

Custom data saved on the led.

Returns
Type Description
Led

The newly added led or null if a led with this id is already added.

| Edit this page View Source

DeviceUpdate()

Performs device specific updates.

Declaration
protected virtual void DeviceUpdate()
| Edit this page View Source

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public virtual void Dispose()
| Edit this page View Source

GetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration
public IEnumerator<Led> GetEnumerator()
Returns
Type Description
IEnumerator<Led>

An enumerator that can be used to iterate through the collection.

| Edit this page View Source

GetLedCustomData(LedId)

Gets the custom data associated with the specified LED.

Declaration
protected virtual object? GetLedCustomData(LedId ledId)
Parameters
Type Name Description
LedId ledId

The id of the led.

Returns
Type Description
object

The custom data for the specified LED.

| Edit this page View Source

GetLedsToUpdate(bool)

Gets an enumerable of LEDs that are changed and requires an update.

Declaration
protected virtual IEnumerable<Led> GetLedsToUpdate(bool flushLeds)
Parameters
Type Name Description
bool flushLeds

Forces all LEDs to be treated as dirty.

Returns
Type Description
IEnumerable<Led>

The collection LEDs to update.

| Edit this page View Source

GetUpdateData(Led)

Gets an enumerable of a custom data and color tuple for the specified leds.

Declaration
protected (object key, Color color) GetUpdateData(Led led)
Parameters
Type Name Description
Led led
Returns
Type Description
(object key, Color color)

The enumerable of custom data and color tuples for the specified leds.

Remarks

Applies all ColorCorrections. if no CustomData ist specified the Id is used.

| Edit this page View Source

OnAttached()

Called when the device is attached to a surface.

Declaration
protected virtual void OnAttached()
Remarks

When overriden base should be called to validate boundries.

| Edit this page View Source

OnDetached()

Called when the device is detached from a surface.

Declaration
protected virtual void OnDetached()
| Edit this page View Source

RemoveLed(LedId)

Removes the led with the specified id from the device.

Declaration
public virtual Led? RemoveLed(LedId ledId)
Parameters
Type Name Description
LedId ledId

The id of the led to remove.

Returns
Type Description
Led

The removed led or null if there was no led with the specified id.

| Edit this page View Source

Update(bool)

Perform an update for all dirty Led, or all Led if flushLeds is set to true.

Declaration
public virtual void Update(bool flushLeds = false)
Parameters
Type Name Description
bool flushLeds

Specifies whether all Led (including clean ones) should be updated.

| Edit this page View Source

UpdateLeds(IEnumerable<Led>)

Sends all the updated Led to the device.

Declaration
protected virtual void UpdateLeds(IEnumerable<Led> ledsToUpdate)
Parameters
Type Name Description
IEnumerable<Led> ledsToUpdate

Implements

IRGBDevice<TDeviceInfo>
IRGBDevice
IEnumerable<T>
IEnumerable
IPlaceable
IBindable
INotifyPropertyChanged
IDisposable
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX