Table of Contents

Class ArtemisDevice

Namespace
Artemis.Core
Assembly
Artemis.Core.dll

Represents an RGB device usable by Artemis, provided by a DeviceProvider

public class ArtemisDevice : CorePropertyChanged
Inheritance
object
CorePropertyChanged
ArtemisDevice

Properties

BlueScale

Gets or sets the scale of the blue color component used for calibration

public float BlueScale { get; set; }

Property Value

float

Categories

Gets a list containing the categories of this device

public HashSet<DeviceCategory> Categories { get; }

Property Value

HashSet<DeviceCategory>

DeviceProvider

Gets the device provider that provided this device

public DeviceProvider DeviceProvider { get; }

Property Value

DeviceProvider

DeviceType

Gets the device type of the ArtemisDevice

public RGBDeviceType DeviceType { get; }

Property Value

RGBDeviceType

GreenScale

Gets or sets the scale of the green color component used for calibration

public float GreenScale { get; set; }

Property Value

float

Identifier

Gets the (hopefully unique and persistent) ID of this device

public string Identifier { get; }

Property Value

string

InputIdentifiers

Gets a list of input identifiers associated with this device

public List<ArtemisDeviceInputIdentifier> InputIdentifiers { get; }

Property Value

List<ArtemisDeviceInputIdentifier>

InputMappings

Gets a list of input mappings configured on the device

public Dictionary<ArtemisLed, ArtemisLed> InputMappings { get; }

Property Value

Dictionary<ArtemisLed, ArtemisLed>

IsEnabled

Gets a boolean indicating whether this devices is enabled or not

Note: To enable/disable a device use the methods provided by IDeviceService

public bool IsEnabled { get; }

Property Value

bool

Layout

Gets the layout of the device expanded with Artemis-specific data

public ArtemisLayout? Layout { get; }

Property Value

ArtemisLayout

LayoutSelection

Gets the layout selection applied to this device

public LayoutSelection LayoutSelection { get; }

Property Value

LayoutSelection

LedIds

Gets a dictionary containing all the LEDs of this device with their corresponding RGB.NET RGB.NET.Core.LedId as key

public ReadOnlyDictionary<LedId, ArtemisLed> LedIds { get; }

Property Value

ReadOnlyDictionary<LedId, ArtemisLed>

Leds

Gets a read only collection containing the LEDs of this device

public ReadOnlyCollection<ArtemisLed> Leds { get; }

Property Value

ReadOnlyCollection<ArtemisLed>

LogicalLayout

Gets or sets the logical layout of the device e.g. DE, UK or US.

Only applicable to keyboards

public string? LogicalLayout { get; set; }

Property Value

string

Path

Gets the path surrounding the device

public SKPath? Path { get; }

Property Value

SKPath

PhysicalLayout

Gets or sets the physical layout of the device e.g. ISO or ANSI.

Only applicable to keyboards

public KeyboardLayoutType PhysicalLayout { get; set; }

Property Value

KeyboardLayoutType

Rectangle

Gets the rectangle covering the device

public SKRect Rectangle { get; }

Property Value

SKRect

RedScale

Gets or sets the scale of the red color component used for calibration

public float RedScale { get; set; }

Property Value

float

RgbDevice

Gets the RGB.NET device backing this Artemis device

public IRGBDevice RgbDevice { get; }

Property Value

IRGBDevice

Rotation

Gets or sets the rotation of the device

public float Rotation { get; set; }

Property Value

float

Scale

Gets or sets the scale of the device

public float Scale { get; set; }

Property Value

float

X

Gets or sets the X-position of the device

public float X { get; set; }

Property Value

float

Y

Gets or sets the Y-position of the device

public float Y { get; set; }

Property Value

float

ZIndex

Gets or sets the Z-index of the device

public int ZIndex { get; set; }

Property Value

int

Methods

ApplyDefaultCategories()

Applies the default categories for this device to the Categories list

public void ApplyDefaultCategories()

ApplyLayout(ArtemisLayout?, bool, bool)

Applies the provided layout to the device

public void ApplyLayout(ArtemisLayout? layout, bool createMissingLeds, bool removeExcessiveLeds)

Parameters

layout ArtemisLayout

The layout to apply

createMissingLeds bool

A boolean indicating whether to add missing LEDs defined in the layout but missing on the device

removeExcessiveLeds bool

A boolean indicating whether to remove excess LEDs present in the device but missing in the layout

GetLed(Led, bool)

Attempts to retrieve the ArtemisLed that corresponds the provided RGB.NET RGB.NET.Core.Led

public ArtemisLed? GetLed(Led led, bool applyInputMapping)

Parameters

led Led

The RGB.NET RGB.NET.Core.Led to find the corresponding ArtemisLed for

applyInputMapping bool

If true, LEDs mapped to different LEDs InputMappings are taken into consideration

Returns

ArtemisLed

If found, the corresponding ArtemisLed; otherwise null.

GetLed(LedId, bool)

Attempts to retrieve the ArtemisLed that corresponds the provided RGB.NET RGB.NET.Core.LedId

public ArtemisLed? GetLed(LedId ledId, bool applyInputMapping)

Parameters

ledId LedId

The RGB.NET RGB.NET.Core.LedId to find the corresponding ArtemisLed for

applyInputMapping bool

If true, LEDs mapped to different LEDs InputMappings are taken into consideration

Returns

ArtemisLed

If found, the corresponding ArtemisLed; otherwise null.

OnDeviceUpdated()

Invokes the DeviceUpdated event

protected virtual void OnDeviceUpdated()

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Events

DeviceUpdated

Occurs when the underlying RGB.NET device was updated

public event EventHandler? DeviceUpdated

Event Type

EventHandler