Class DeviceProvider
Allows you to implement and register your own device provider
Implements
Inherited Members
Namespace: Artemis.Core.DeviceProviders
Assembly: Artemis.Core.dll
Syntax
public abstract class DeviceProvider : PluginFeature, INotifyPropertyChanged, IDisposable
Constructors
| Improve this Doc View SourceDeviceProvider(IRGBDeviceProvider)
Creates a new instance of the DeviceProvider class
Declaration
protected DeviceProvider(IRGBDeviceProvider rgbDeviceProvider)
Parameters
Type | Name | Description |
---|---|---|
IRGBDeviceProvider | rgbDeviceProvider |
Properties
| Improve this Doc View SourceCanDetectLogicalLayout
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.
Declaration
public bool CanDetectLogicalLayout { get; protected set; }
Property Value
Type | Description |
---|---|
System.Boolean |
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.
Declaration
public bool CanDetectPhysicalLayout { get; protected set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Logger
TODO: Make internal while still injecting. A logger used by the device provider internally, ignore this
Declaration
[Inject]
public ILogger Logger { get; set; }
Property Value
Type | Description |
---|---|
Serilog.ILogger |
RgbDeviceProvider
The RGB.NET device provider backing this Artemis device provider
Declaration
public IRGBDeviceProvider RgbDeviceProvider { get; }
Property Value
Type | Description |
---|---|
IRGBDeviceProvider |
Methods
| Improve this Doc View SourceDisable()
Called when the feature is deactivated or when Artemis shuts down
Declaration
public override void Disable()
Overrides
| Improve this Doc View SourceGetLogicalLayout(IKeyboard)
Called when a specific RGB device's logical and physical layout must be detected
Note: Only called when CanDetectLogicalLayout is true.
Declaration
public virtual string GetLogicalLayout(IKeyboard keyboard)
Parameters
Type | Name | Description |
---|---|---|
IKeyboard | keyboard | The device to detect the layout for, always a keyboard |
Returns
Type | Description |
---|---|
System.String |
LoadLayout(ArtemisDevice)
Loads a layout for the specified device and wraps it in an ArtemisLayout
Declaration
public virtual ArtemisLayout LoadLayout(ArtemisDevice device)
Parameters
Type | Name | Description |
---|---|---|
ArtemisDevice | device | The device to load the layout for |
Returns
Type | Description |
---|---|
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
Declaration
public virtual ArtemisLayout LoadUserLayout(ArtemisDevice device)
Parameters
Type | Name | Description |
---|---|---|
ArtemisDevice | device | The device to load the layout for |
Returns
Type | Description |
---|---|
ArtemisLayout | The resulting Artemis layout |