Interface IDeviceService
A service that allows you manage an ArtemisDevice
public interface IDeviceService
Properties
Devices
Gets a read-only collection containing all registered devices
IReadOnlyCollection<ArtemisDevice> Devices { get; }
Property Value
EnabledDevices
Gets a read-only collection containing all enabled devices
IReadOnlyCollection<ArtemisDevice> EnabledDevices { get; }
Property Value
SuspendedDeviceProviders
Gets a read-only collection containing all enabled but suspended device providers
IReadOnlyCollection<DeviceProvider> SuspendedDeviceProviders { get; }
Property Value
Methods
AddDeviceProvider(DeviceProvider)
Adds the given device provider and its devices.
void AddDeviceProvider(DeviceProvider deviceProvider)
Parameters
deviceProviderDeviceProvider
AutoArrangeDevices(bool)
Applies auto-arranging logic to the surface
void AutoArrangeDevices(bool leftHanded)
Parameters
leftHandedbool
DisableDevice(ArtemisDevice)
Disables the provided device
void DisableDevice(ArtemisDevice device)
Parameters
deviceArtemisDeviceThe device to disable
EnableDevice(ArtemisDevice)
Enables the provided device
void EnableDevice(ArtemisDevice device)
Parameters
deviceArtemisDeviceThe device to enable
IdentifyDevice(ArtemisDevice)
Identifies the device by making it blink white 5 times
void IdentifyDevice(ArtemisDevice device)
Parameters
deviceArtemisDevice
LoadDeviceLayout(ArtemisDevice)
Apples the best available to the provided ArtemisDevice
void LoadDeviceLayout(ArtemisDevice device)
Parameters
deviceArtemisDevice
RemoveDeviceProvider(DeviceProvider)
Removes the given device provider and its devices.
void RemoveDeviceProvider(DeviceProvider deviceProvider)
Parameters
deviceProviderDeviceProvider
ResumeDeviceProviders()
Resumes all previously active device providers
void ResumeDeviceProviders()
SaveDevice(ArtemisDevice)
Saves the configuration of the provided device to persistent storage
void SaveDevice(ArtemisDevice artemisDevice)
Parameters
artemisDeviceArtemisDevice
SaveDevices()
Saves the configuration of all current devices to persistent storage
void SaveDevices()
SuspendDeviceProviders()
Suspends all active device providers
void SuspendDeviceProviders()
Events
DeviceAdded
Occurs when a single device was added.
event EventHandler<DeviceEventArgs> DeviceAdded
Event Type
DeviceDisabled
Occurs when a single device was disabled.
event EventHandler<DeviceEventArgs> DeviceDisabled
Event Type
DeviceEnabled
Occurs when a single device was disabled
event EventHandler<DeviceEventArgs> DeviceEnabled
Event Type
DeviceProviderAdded
Occurs when a device provider was added.
event EventHandler<DeviceProviderEventArgs> DeviceProviderAdded
Event Type
DeviceProviderRemoved
Occurs when a device provider was removed.
event EventHandler<DeviceProviderEventArgs> DeviceProviderRemoved
Event Type
DeviceRemoved
Occurs when a single device was removed.
event EventHandler<DeviceEventArgs> DeviceRemoved
Event Type
LedsChanged
Occurs when the surface has had modifications to its LED collection
event EventHandler LedsChanged