Table of Contents

Class DeviceProvider

Namespace
Artemis.Core.DeviceProviders
Assembly
Artemis.Core.dll

Represents an feature of a certain type provided by a plugin

public abstract class DeviceProvider : PluginFeature, IDisposable
Inheritance
DeviceProvider
Implements
Inherited Members

Properties

CanDetectLogicalLayout

A boolean indicating whether this device provider detects the logical layout of connected keyboards

Note: GetLogicalLayout(IKeyboard) is only called when this or CanDetectPhysicalLayout is true.

public bool CanDetectLogicalLayout { get; protected set; }

Property Value

bool

CanDetectPhysicalLayout

A boolean indicating whether this device provider detects the physical layout of connected keyboards.

Note: GetLogicalLayout(IKeyboard) is only called when this or CanDetectLogicalLayout is true.

public bool CanDetectPhysicalLayout { get; protected set; }

Property Value

bool

CreateMissingLedsSupported

Gets or sets a boolean indicating whether adding missing LEDs defined in a layout but missing on the device is supported

Note: Defaults to true.

public bool CreateMissingLedsSupported { get; protected set; }

Property Value

bool

RemoveExcessiveLedsSupported

Gets or sets a boolean indicating whether removing excess LEDs present in the device but missing in the layout is supported

Note: Defaults to true.

public bool RemoveExcessiveLedsSupported { get; protected set; }

Property Value

bool

RgbDeviceProvider

The RGB.NET device provider backing this Artemis device provider

public abstract IRGBDeviceProvider RgbDeviceProvider { get; }

Property Value

IRGBDeviceProvider

Methods

GetDeviceLayoutName(ArtemisDevice)

Called when determining which file name to use when loading the layout of the specified device.

public virtual string GetDeviceLayoutName(ArtemisDevice device)

Parameters

device ArtemisDevice

The device to determine the layout file name for.

Returns

string

A file name, including an extension

GetLogicalLayout(IKeyboard)

Called when a specific RGB device's logical and physical layout must be detected

Note: Only called when CanDetectLogicalLayout is true.

public virtual string GetLogicalLayout(IKeyboard keyboard)

Parameters

keyboard IKeyboard

The device to detect the layout for, always a keyboard

Returns

string

LoadLayout(ArtemisDevice)

Loads a layout for the specified device and wraps it in an ArtemisLayout

public virtual ArtemisLayout LoadLayout(ArtemisDevice device)

Parameters

device ArtemisDevice

The device to load the layout for

Returns

ArtemisLayout

The resulting Artemis layout

LoadUserLayout(ArtemisDevice)

Loads a layout from the user layout folder for the specified device and wraps it in an ArtemisLayout

public virtual ArtemisLayout LoadUserLayout(ArtemisDevice device)

Parameters

device ArtemisDevice

The device to load the layout for

Returns

ArtemisLayout

The resulting Artemis layout