Class ArtemisDevice
Represents an RGB device usable by Artemis, provided by a DeviceProvider
public class ArtemisDevice : CorePropertyChanged
- Inheritance
-
objectCorePropertyChangedArtemisDevice
Properties
BlueScale
Gets or sets the scale of the blue color component used for calibration
public float BlueScale { get; set; }
Property Value
Categories
Gets a list containing the categories of this device
public HashSet<DeviceCategory> Categories { get; }
Property Value
DeviceProvider
Gets the device provider that provided this device
public DeviceProvider DeviceProvider { get; }
Property Value
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
Identifier
Gets the (hopefully unique and persistent) ID of this device
public string Identifier { get; }
Property Value
InputIdentifiers
Gets a list of input identifiers associated with this device
public List<ArtemisDeviceInputIdentifier> InputIdentifiers { get; }
Property Value
InputMappings
Gets a list of input mappings configured on the device
public Dictionary<ArtemisLed, ArtemisLed> InputMappings { get; }
Property Value
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
Layout
Gets the layout of the device expanded with Artemis-specific data
public ArtemisLayout? Layout { get; }
Property Value
LayoutSelection
Gets the layout selection applied to this device
public LayoutSelection LayoutSelection { get; }
Property Value
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
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
Path
Gets the path surrounding the device
public SKPath? Path { get; }
Property Value
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
Rectangle
Gets the rectangle covering the device
public SKRect Rectangle { get; }
Property Value
RedScale
Gets or sets the scale of the red color component used for calibration
public float RedScale { get; set; }
Property Value
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
Scale
Gets or sets the scale of the device
public float Scale { get; set; }
Property Value
X
Gets or sets the X-position of the device
public float X { get; set; }
Property Value
Y
Gets or sets the Y-position of the device
public float Y { get; set; }
Property Value
ZIndex
Gets or sets the Z-index of the device
public int ZIndex { get; set; }
Property Value
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
layoutArtemisLayoutThe layout to apply
createMissingLedsboolA boolean indicating whether to add missing LEDs defined in the layout but missing on the device
removeExcessiveLedsboolA 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
ledLedThe RGB.NET RGB.NET.Core.Led to find the corresponding ArtemisLed for
applyInputMappingboolIf 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
ledIdLedIdThe RGB.NET RGB.NET.Core.LedId to find the corresponding ArtemisLed for
applyInputMappingboolIf 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