Class ArtemisDevice
Represents an RGB device usable by Artemis, provided by a DeviceProvider
Namespace: Artemis.Core
Assembly: Artemis.Core.dll
Syntax
public class ArtemisDevice : CorePropertyChanged
Properties
BlueScale
Gets or sets the scale of the blue color component used for calibration
Declaration
public float BlueScale { get; set; }
Property Value
Type | Description |
---|---|
float |
Categories
Gets a list containing the categories of this device
Declaration
public HashSet<DeviceCategory> Categories { get; }
Property Value
Type | Description |
---|---|
HashSet<DeviceCategory> |
CustomLayoutPath
Gets or sets the path of the custom layout to load when calling ApplyBestDeviceLayout(ArtemisDevice) for this device
Declaration
public string? CustomLayoutPath { get; set; }
Property Value
Type | Description |
---|---|
string |
DeviceProvider
Gets the device provider that provided this device
Declaration
public DeviceProvider DeviceProvider { get; }
Property Value
Type | Description |
---|---|
DeviceProvider |
DeviceType
Gets the device type of the ArtemisDevice
Declaration
public RGBDeviceType DeviceType { get; }
Property Value
Type | Description |
---|---|
RGBDeviceType |
DisableDefaultLayout
Gets or sets a boolean indicating whether falling back to default layouts is enabled or not
Declaration
public bool DisableDefaultLayout { get; set; }
Property Value
Type | Description |
---|---|
bool |
GreenScale
Gets or sets the scale of the green color component used for calibration
Declaration
public float GreenScale { get; set; }
Property Value
Type | Description |
---|---|
float |
Identifier
Gets the (hopefully unique and persistent) ID of this device
Declaration
public string Identifier { get; }
Property Value
Type | Description |
---|---|
string |
InputIdentifiers
Gets a list of input identifiers associated with this device
Declaration
public List<ArtemisDeviceInputIdentifier> InputIdentifiers { get; }
Property Value
Type | Description |
---|---|
List<ArtemisDeviceInputIdentifier> |
InputMappings
Gets a list of input mappings configured on the device
Declaration
public Dictionary<ArtemisLed, ArtemisLed> InputMappings { get; }
Property Value
Type | Description |
---|---|
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 IRgbService
Declaration
public bool IsEnabled { get; }
Property Value
Type | Description |
---|---|
bool |
Layout
Gets the layout of the device expanded with Artemis-specific data
Declaration
public ArtemisLayout? Layout { get; }
Property Value
Type | Description |
---|---|
ArtemisLayout |
LedIds
Gets a dictionary containing all the LEDs of this device with their corresponding RGB.NET RGB.NET.Core.LedId as key
Declaration
public ReadOnlyDictionary<LedId, ArtemisLed> LedIds { get; }
Property Value
Type | Description |
---|---|
ReadOnlyDictionary<LedId, ArtemisLed> |
Leds
Gets a read only collection containing the LEDs of this device
Declaration
public ReadOnlyCollection<ArtemisLed> Leds { get; }
Property Value
Type | Description |
---|---|
ReadOnlyCollection<ArtemisLed> |
LogicalLayout
Gets or sets the logical layout of the device e.g. DE, UK or US.
Only applicable to keyboards
Declaration
public string? LogicalLayout { get; set; }
Property Value
Type | Description |
---|---|
string |
Path
Gets the path surrounding the device
Declaration
public SKPath? Path { get; }
Property Value
Type | Description |
---|---|
SKPath |
PhysicalLayout
Gets or sets the physical layout of the device e.g. ISO or ANSI.
Only applicable to keyboards
Declaration
public KeyboardLayoutType PhysicalLayout { get; set; }
Property Value
Type | Description |
---|---|
KeyboardLayoutType |
Rectangle
Gets the rectangle covering the device
Declaration
public SKRect Rectangle { get; }
Property Value
Type | Description |
---|---|
SKRect |
RedScale
Gets or sets the scale of the red color component used for calibration
Declaration
public float RedScale { get; set; }
Property Value
Type | Description |
---|---|
float |
RgbDevice
Gets the RGB.NET device backing this Artemis device
Declaration
public IRGBDevice RgbDevice { get; }
Property Value
Type | Description |
---|---|
IRGBDevice |
Rotation
Gets or sets the rotation of the device
Declaration
public float Rotation { get; set; }
Property Value
Type | Description |
---|---|
float |
Scale
Gets or sets the scale of the device
Declaration
public float Scale { get; set; }
Property Value
Type | Description |
---|---|
float |
X
Gets or sets the X-position of the device
Declaration
public float X { get; set; }
Property Value
Type | Description |
---|---|
float |
Y
Gets or sets the Y-position of the device
Declaration
public float Y { get; set; }
Property Value
Type | Description |
---|---|
float |
ZIndex
Gets or sets the Z-index of the device
Declaration
public int ZIndex { get; set; }
Property Value
Type | Description |
---|---|
int |
Methods
ApplyDefaultCategories()
Applies the default categories for this device to the Categories list
Declaration
public void ApplyDefaultCategories()
GetLed(Led, bool)
Attempts to retrieve the ArtemisLed that corresponds the provided RGB.NET RGB.NET.Core.Led
Declaration
public ArtemisLed? GetLed(Led led, bool applyInputMapping)
Parameters
Type | Name | Description |
---|---|---|
Led | led | The RGB.NET RGB.NET.Core.Led to find the corresponding ArtemisLed for |
bool | applyInputMapping | If true, LEDs mapped to different LEDs InputMappings are taken into consideration |
Returns
Type | Description |
---|---|
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
Declaration
public ArtemisLed? GetLed(LedId ledId, bool applyInputMapping)
Parameters
Type | Name | Description |
---|---|---|
LedId | ledId | The RGB.NET RGB.NET.Core.LedId to find the corresponding ArtemisLed for |
bool | applyInputMapping | If true, LEDs mapped to different LEDs InputMappings are taken into consideration |
Returns
Type | Description |
---|---|
ArtemisLed | If found, the corresponding ArtemisLed; otherwise null. |
OnDeviceUpdated()
Invokes the DeviceUpdated event
Declaration
protected virtual void OnDeviceUpdated()
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |
Overrides
Events
DeviceUpdated
Occurs when the underlying RGB.NET device was updated
Declaration
public event EventHandler? DeviceUpdated
Event Type
Type | Description |
---|---|
EventHandler |