diff --git a/RGB.NET.Devices.Asus/Dram/AsusDramRGBDevice.cs b/RGB.NET.Devices.Asus/Dram/AsusDramRGBDevice.cs index ef1b046..8b6cb75 100644 --- a/RGB.NET.Devices.Asus/Dram/AsusDramRGBDevice.cs +++ b/RGB.NET.Devices.Asus/Dram/AsusDramRGBDevice.cs @@ -15,6 +15,7 @@ namespace RGB.NET.Devices.Asus /// Initializes a new instance of the class. /// /// The specific information provided by Asus for the DRAM. + /// The update trigger used to update this device. internal AsusDramRGBDevice(AsusRGBDeviceInfo info, IDeviceUpdateTrigger updateTrigger) : base(info, updateTrigger) { diff --git a/RGB.NET.Devices.Asus/Generic/AsusRGBDevice.cs b/RGB.NET.Devices.Asus/Generic/AsusRGBDevice.cs index f80056a..e4ce12f 100644 --- a/RGB.NET.Devices.Asus/Generic/AsusRGBDevice.cs +++ b/RGB.NET.Devices.Asus/Generic/AsusRGBDevice.cs @@ -15,6 +15,7 @@ namespace RGB.NET.Devices.Asus /// Initializes a new instance of the class. /// /// The generic information provided by Asus for the device. + /// The update trigger used to update this device. protected AsusRGBDevice(TDeviceInfo info, IDeviceUpdateTrigger updateTrigger) : base(info, new AsusUpdateQueue(updateTrigger, info.Device)) { } diff --git a/RGB.NET.Devices.Asus/Generic/AsusRGBDeviceInfo.cs b/RGB.NET.Devices.Asus/Generic/AsusRGBDeviceInfo.cs index 1d1b1dd..edd9983 100644 --- a/RGB.NET.Devices.Asus/Generic/AsusRGBDeviceInfo.cs +++ b/RGB.NET.Devices.Asus/Generic/AsusRGBDeviceInfo.cs @@ -23,8 +23,12 @@ namespace RGB.NET.Devices.Asus /// public string Model { get; } + /// public object? LayoutMetadata { get; set; } + /// + /// Gets the SDK-aura-device this device represents. + /// public IAuraSyncDevice Device { get; } #endregion diff --git a/RGB.NET.Devices.Asus/Generic/AsusUnspecifiedRGBDevice.cs b/RGB.NET.Devices.Asus/Generic/AsusUnspecifiedRGBDevice.cs index e0abfa5..76a6a62 100644 --- a/RGB.NET.Devices.Asus/Generic/AsusUnspecifiedRGBDevice.cs +++ b/RGB.NET.Devices.Asus/Generic/AsusUnspecifiedRGBDevice.cs @@ -21,6 +21,8 @@ namespace RGB.NET.Devices.Asus /// Initializes a new instance of the class. /// /// The specific information provided by Asus for the headset. + /// The ledId of the first led of this device. All other leds are created by incrementing this base-id by 1. + /// The update trigger used to update this device. internal AsusUnspecifiedRGBDevice(AsusRGBDeviceInfo info, LedId baseLedId, IDeviceUpdateTrigger updateTrigger) : base(info, updateTrigger) { diff --git a/RGB.NET.Devices.Asus/Generic/AsusUpdateQueue.cs b/RGB.NET.Devices.Asus/Generic/AsusUpdateQueue.cs index 77d4540..c4ce671 100644 --- a/RGB.NET.Devices.Asus/Generic/AsusUpdateQueue.cs +++ b/RGB.NET.Devices.Asus/Generic/AsusUpdateQueue.cs @@ -25,6 +25,7 @@ namespace RGB.NET.Devices.Asus /// Initializes a new instance of the class. /// /// The update trigger used by this queue. + /// The SDK-aura-device this device represents. public AsusUpdateQueue(IDeviceUpdateTrigger updateTrigger, IAuraSyncDevice device) : base(updateTrigger) { diff --git a/RGB.NET.Devices.Asus/GraphicsCard/AsusGraphicsCardRGBDevice.cs b/RGB.NET.Devices.Asus/GraphicsCard/AsusGraphicsCardRGBDevice.cs index 698b2c3..5953240 100644 --- a/RGB.NET.Devices.Asus/GraphicsCard/AsusGraphicsCardRGBDevice.cs +++ b/RGB.NET.Devices.Asus/GraphicsCard/AsusGraphicsCardRGBDevice.cs @@ -15,6 +15,7 @@ namespace RGB.NET.Devices.Asus /// Initializes a new instance of the class. /// /// The specific information provided by Asus for the graphics card. + /// The update trigger used to update this device. internal AsusGraphicsCardRGBDevice(AsusRGBDeviceInfo info, IDeviceUpdateTrigger updateTrigger) : base(info, updateTrigger) { diff --git a/RGB.NET.Devices.Asus/Headset/AsusHeadsetRGBDevice.cs b/RGB.NET.Devices.Asus/Headset/AsusHeadsetRGBDevice.cs index 22d14d9..936eef5 100644 --- a/RGB.NET.Devices.Asus/Headset/AsusHeadsetRGBDevice.cs +++ b/RGB.NET.Devices.Asus/Headset/AsusHeadsetRGBDevice.cs @@ -15,6 +15,7 @@ namespace RGB.NET.Devices.Asus /// Initializes a new instance of the class. /// /// The specific information provided by Asus for the headset. + /// The update trigger used to update this device. internal AsusHeadsetRGBDevice(AsusRGBDeviceInfo info, IDeviceUpdateTrigger updateTrigger) : base(info, updateTrigger) { diff --git a/RGB.NET.Devices.Asus/Keyboard/AsusKeyboardRGBDevice.cs b/RGB.NET.Devices.Asus/Keyboard/AsusKeyboardRGBDevice.cs index 9ac6f69..4b2ae42 100644 --- a/RGB.NET.Devices.Asus/Keyboard/AsusKeyboardRGBDevice.cs +++ b/RGB.NET.Devices.Asus/Keyboard/AsusKeyboardRGBDevice.cs @@ -31,9 +31,10 @@ namespace RGB.NET.Devices.Asus IKeyboardDeviceInfo IKeyboard.DeviceInfo => DeviceInfo; /// - /// Gets or sets a list of extra LED mappings to apply to modes that match the provided regex - /// Note: These LED mappings should be based on light indexes + /// Gets or sets a list of extra LED mappings to apply to modes that match the provided regex. + /// Note: These LED mappings should be based on light indexes. /// + // ReSharper disable once InconsistentNaming public static readonly List ExtraLedMappings = new() { new AsusKeyboardExtraMapping(new Regex("(ROG Zephyrus Duo 15).*?"), LedMappings.ROGZephyrusDuo15) @@ -48,6 +49,8 @@ namespace RGB.NET.Devices.Asus /// Initializes a new instance of the class. /// /// The specific information provided by Asus for the keyboard. + /// A mapping of leds this device is initialized with. + /// The update trigger used to update this device. internal AsusKeyboardRGBDevice(AsusKeyboardRGBDeviceInfo info, LedMapping? ledMapping, IDeviceUpdateTrigger updateTrigger) : base(info, updateTrigger) { diff --git a/RGB.NET.Devices.Asus/Mainboard/AsusMainboardRGBDevice.cs b/RGB.NET.Devices.Asus/Mainboard/AsusMainboardRGBDevice.cs index bde9f1b..f4ba9c4 100644 --- a/RGB.NET.Devices.Asus/Mainboard/AsusMainboardRGBDevice.cs +++ b/RGB.NET.Devices.Asus/Mainboard/AsusMainboardRGBDevice.cs @@ -15,6 +15,7 @@ namespace RGB.NET.Devices.Asus /// Initializes a new instance of the class. /// /// The specific information provided by Asus for the mainboard. + /// The update trigger used to update this device. internal AsusMainboardRGBDevice(AsusRGBDeviceInfo info, IDeviceUpdateTrigger updateTrigger) : base(info, updateTrigger) { diff --git a/RGB.NET.Devices.Asus/Mouse/AsusMouseRGBDevice.cs b/RGB.NET.Devices.Asus/Mouse/AsusMouseRGBDevice.cs index fdbd204..86dfe29 100644 --- a/RGB.NET.Devices.Asus/Mouse/AsusMouseRGBDevice.cs +++ b/RGB.NET.Devices.Asus/Mouse/AsusMouseRGBDevice.cs @@ -15,6 +15,7 @@ namespace RGB.NET.Devices.Asus /// Initializes a new instance of the class. /// /// The specific information provided by Asus for the mouse. + /// The update trigger used to update this device. internal AsusMouseRGBDevice(AsusRGBDeviceInfo info, IDeviceUpdateTrigger updateTrigger) : base(info, updateTrigger) { diff --git a/RGB.NET.Devices.CoolerMaster/CoolerMasterDeviceProvider.cs b/RGB.NET.Devices.CoolerMaster/CoolerMasterDeviceProvider.cs index f0fdcbf..4c60422 100644 --- a/RGB.NET.Devices.CoolerMaster/CoolerMasterDeviceProvider.cs +++ b/RGB.NET.Devices.CoolerMaster/CoolerMasterDeviceProvider.cs @@ -53,12 +53,14 @@ namespace RGB.NET.Devices.CoolerMaster #region Methods + /// protected override void InitializeSDK() { _CoolerMasterSDK.Reload(); if (_CoolerMasterSDK.GetSDKVersion() <= 0) Throw(new RGBDeviceException("Failed to initialize CoolerMaster-SDK"), true); } + /// protected override IEnumerable LoadDevices() { foreach (CoolerMasterDevicesIndexes index in Enum.GetValues(typeof(CoolerMasterDevicesIndexes))) diff --git a/RGB.NET.Devices.CoolerMaster/Generic/CoolerMasterRGBDevice.cs b/RGB.NET.Devices.CoolerMaster/Generic/CoolerMasterRGBDevice.cs index fdeaf39..9dfaf6b 100644 --- a/RGB.NET.Devices.CoolerMaster/Generic/CoolerMasterRGBDevice.cs +++ b/RGB.NET.Devices.CoolerMaster/Generic/CoolerMasterRGBDevice.cs @@ -17,6 +17,7 @@ namespace RGB.NET.Devices.CoolerMaster /// Initializes a new instance of the class. /// /// The generic information provided by CoolerMaster for the device. + /// The update trigger used to update this device. protected CoolerMasterRGBDevice(TDeviceInfo info, IDeviceUpdateTrigger updateTrigger) : base(info, new CoolerMasterUpdateQueue(updateTrigger, info.DeviceIndex)) { } diff --git a/RGB.NET.Devices.CoolerMaster/Keyboard/CoolerMasterKeyboardRGBDevice.cs b/RGB.NET.Devices.CoolerMaster/Keyboard/CoolerMasterKeyboardRGBDevice.cs index 9007148..b1350a7 100644 --- a/RGB.NET.Devices.CoolerMaster/Keyboard/CoolerMasterKeyboardRGBDevice.cs +++ b/RGB.NET.Devices.CoolerMaster/Keyboard/CoolerMasterKeyboardRGBDevice.cs @@ -22,6 +22,7 @@ namespace RGB.NET.Devices.CoolerMaster /// Initializes a new instance of the class. /// /// The specific information provided by CoolerMaster for the keyboard + /// The update trigger used to update this device. internal CoolerMasterKeyboardRGBDevice(CoolerMasterKeyboardRGBDeviceInfo info, IDeviceUpdateTrigger updateTrigger) : base(info, updateTrigger) { diff --git a/RGB.NET.Devices.Corsair/CorsairDeviceProvider.cs b/RGB.NET.Devices.Corsair/CorsairDeviceProvider.cs index 33fcd75..9392be0 100644 --- a/RGB.NET.Devices.Corsair/CorsairDeviceProvider.cs +++ b/RGB.NET.Devices.Corsair/CorsairDeviceProvider.cs @@ -63,6 +63,7 @@ namespace RGB.NET.Devices.Corsair #region Methods + /// protected override void InitializeSDK() { _CUESDK.Reload(); @@ -193,6 +194,7 @@ namespace RGB.NET.Devices.Corsair }; } + /// protected override void Reset() { ProtocolDetails = null; diff --git a/RGB.NET.Devices.Corsair/Custom/CorsairCustomRGBDeviceInfo.cs b/RGB.NET.Devices.Corsair/Custom/CorsairCustomRGBDeviceInfo.cs index c89423c..5216ebf 100644 --- a/RGB.NET.Devices.Corsair/Custom/CorsairCustomRGBDeviceInfo.cs +++ b/RGB.NET.Devices.Corsair/Custom/CorsairCustomRGBDeviceInfo.cs @@ -17,8 +17,19 @@ namespace RGB.NET.Devices.Corsair { #region Properties & Fields + /// + /// Gets the corsair-id of the first LED of this device. + /// public CorsairLedId ReferenceCorsairLed { get; } + + /// + /// Gets the amount of LEDs this device contains. + /// public int LedCount { get; } + + /// + /// Gets the offset used to access the LEDs of this device. + /// internal int LedOffset { get; } #endregion @@ -33,7 +44,8 @@ namespace RGB.NET.Devices.Corsair /// The index of the . /// The native -struct /// The native representing this device. - /// The id of the first led of this device. + /// The id of the first LED of this device. + /// The offset used to find the LEDs of this device. internal CorsairCustomRGBDeviceInfo(int deviceIndex, _CorsairDeviceInfo nativeInfo, _CorsairChannelDeviceInfo channelDeviceInfo, CorsairLedId referenceCorsairLed, int ledOffset) : base(deviceIndex, GetDeviceType(channelDeviceInfo.type), nativeInfo, GetModelName(nativeInfo.model == IntPtr.Zero ? string.Empty : Regex.Replace(Marshal.PtrToStringAnsi(nativeInfo.model) ?? string.Empty, " ?DEMO", string.Empty, RegexOptions.IgnoreCase), channelDeviceInfo)) diff --git a/RGB.NET.Devices.Corsair/Generic/CorsairRGBDevice.cs b/RGB.NET.Devices.Corsair/Generic/CorsairRGBDevice.cs index 22792fc..f192bbc 100644 --- a/RGB.NET.Devices.Corsair/Generic/CorsairRGBDevice.cs +++ b/RGB.NET.Devices.Corsair/Generic/CorsairRGBDevice.cs @@ -14,6 +14,9 @@ namespace RGB.NET.Devices.Corsair { #region Properties & Fields + /// + /// Gets the mapping of to used to update the LEDs of this device. + /// protected LedMapping Mapping { get; } #endregion @@ -24,6 +27,8 @@ namespace RGB.NET.Devices.Corsair /// Initializes a new instance of the class. /// /// The generic information provided by CUE for the device. + /// The mapping to used to update the LEDs of this device. + /// The queue used to update this device. protected CorsairRGBDevice(TDeviceInfo info, LedMapping mapping, CorsairDeviceUpdateQueue updateQueue) : base(info, updateQueue) { @@ -35,7 +40,10 @@ namespace RGB.NET.Devices.Corsair #region Methods void ICorsairRGBDevice.Initialize() => InitializeLayout(); - + + /// + /// Initializes the LEDs of the device based on the data provided by the SDK. + /// protected virtual void InitializeLayout() { _CorsairLedPositions? nativeLedPositions = (_CorsairLedPositions?)Marshal.PtrToStructure(_CUESDK.CorsairGetLedPositionsByDeviceIndex(DeviceInfo.CorsairDeviceIndex), typeof(_CorsairLedPositions)); diff --git a/RGB.NET.Devices.Corsair/Keyboard/CorsairKeyboardRGBDevice.cs b/RGB.NET.Devices.Corsair/Keyboard/CorsairKeyboardRGBDevice.cs index b5f3144..a82c1b1 100644 --- a/RGB.NET.Devices.Corsair/Keyboard/CorsairKeyboardRGBDevice.cs +++ b/RGB.NET.Devices.Corsair/Keyboard/CorsairKeyboardRGBDevice.cs @@ -23,7 +23,7 @@ namespace RGB.NET.Devices.Corsair /// /// Initializes a new instance of the class. /// - /// The specific information provided by CUE for the keyboard + /// The specific information provided by CUE for the keyboard. /// The queue used to update this device. internal CorsairKeyboardRGBDevice(CorsairKeyboardRGBDeviceInfo info, CorsairDeviceUpdateQueue updateQueue) : base(info, LedMappings.Keyboard, updateQueue) diff --git a/RGB.NET.Devices.DMX/DMXDeviceProvider.cs b/RGB.NET.Devices.DMX/DMXDeviceProvider.cs index cda8583..05c8afb 100644 --- a/RGB.NET.Devices.DMX/DMXDeviceProvider.cs +++ b/RGB.NET.Devices.DMX/DMXDeviceProvider.cs @@ -51,8 +51,10 @@ namespace RGB.NET.Devices.DMX /// The to add. public void AddDeviceDefinition(IDMXDeviceDefinition deviceDefinition) => DeviceDefinitions.Add(deviceDefinition); + /// protected override void InitializeSDK() { } + /// protected override IEnumerable LoadDevices() { foreach (IDMXDeviceDefinition dmxDeviceDefinition in DeviceDefinitions) diff --git a/RGB.NET.Devices.DMX/E131/E131DeviceInfo.cs b/RGB.NET.Devices.DMX/E131/E131DeviceInfo.cs index 602acd5..a7606af 100644 --- a/RGB.NET.Devices.DMX/E131/E131DeviceInfo.cs +++ b/RGB.NET.Devices.DMX/E131/E131DeviceInfo.cs @@ -33,6 +33,7 @@ namespace RGB.NET.Devices.DMX.E131 /// public string Model { get; } + /// public object? LayoutMetadata { get; set; } /// diff --git a/RGB.NET.Devices.Debug/DebugDeviceProvider.cs b/RGB.NET.Devices.Debug/DebugDeviceProvider.cs index 5e9ab8b..ac9befa 100644 --- a/RGB.NET.Devices.Debug/DebugDeviceProvider.cs +++ b/RGB.NET.Devices.Debug/DebugDeviceProvider.cs @@ -55,8 +55,10 @@ namespace RGB.NET.Devices.Debug /// public void ClearFakeDeviceDefinitions() => _fakeDeviceDefinitions.Clear(); + /// protected override void InitializeSDK() { } + /// protected override IEnumerable LoadDevices() { foreach ((IDeviceLayout layout, Action>? updateLedsAction) in _fakeDeviceDefinitions) diff --git a/RGB.NET.Devices.Debug/DebugRGBDevice.cs b/RGB.NET.Devices.Debug/DebugRGBDevice.cs index fa11042..7a5181e 100644 --- a/RGB.NET.Devices.Debug/DebugRGBDevice.cs +++ b/RGB.NET.Devices.Debug/DebugRGBDevice.cs @@ -13,6 +13,9 @@ namespace RGB.NET.Devices.Debug { #region Properties & Fields + /// + /// Gets the layour used to describe this debug device. + /// public IDeviceLayout Layout { get; } private Action>? _updateLedsAction; diff --git a/RGB.NET.Devices.Debug/DebugRGBDeviceInfo.cs b/RGB.NET.Devices.Debug/DebugRGBDeviceInfo.cs index c2a5cc7..889cc5d 100644 --- a/RGB.NET.Devices.Debug/DebugRGBDeviceInfo.cs +++ b/RGB.NET.Devices.Debug/DebugRGBDeviceInfo.cs @@ -22,6 +22,7 @@ namespace RGB.NET.Devices.Debug /// public string Model { get; } + /// public object? LayoutMetadata { get; set; } #endregion @@ -34,6 +35,7 @@ namespace RGB.NET.Devices.Debug /// The of the device. /// The manufacturer of the device. /// The model of the device. + /// Some custom data for this device provided by the layout. internal DebugRGBDeviceInfo(RGBDeviceType deviceType, string manufacturer, string model, object? customData) { this.DeviceType = deviceType; diff --git a/RGB.NET.Devices.Logitech/Enum/LogitechDeviceType.cs b/RGB.NET.Devices.Logitech/Enum/LogitechDeviceType.cs index 181e5a9..941c6a8 100644 --- a/RGB.NET.Devices.Logitech/Enum/LogitechDeviceType.cs +++ b/RGB.NET.Devices.Logitech/Enum/LogitechDeviceType.cs @@ -1,4 +1,6 @@ -namespace RGB.NET.Devices.Logitech +#pragma warning disable 1591 + +namespace RGB.NET.Devices.Logitech { /// /// Contains list of available logitech device types. diff --git a/RGB.NET.Devices.Logitech/Generic/LogitechRGBDevice.cs b/RGB.NET.Devices.Logitech/Generic/LogitechRGBDevice.cs index f217795..6cd417d 100644 --- a/RGB.NET.Devices.Logitech/Generic/LogitechRGBDevice.cs +++ b/RGB.NET.Devices.Logitech/Generic/LogitechRGBDevice.cs @@ -15,6 +15,7 @@ namespace RGB.NET.Devices.Logitech /// Initializes a new instance of the class. /// /// The generic information provided by Logitech for the device. + /// The queue used to update this device. protected LogitechRGBDevice(TDeviceInfo info, IUpdateQueue updateQueue) : base(info, updateQueue) { } diff --git a/RGB.NET.Devices.Logitech/Generic/LogitechRGBDeviceInfo.cs b/RGB.NET.Devices.Logitech/Generic/LogitechRGBDeviceInfo.cs index dbddaaf..0f59afa 100644 --- a/RGB.NET.Devices.Logitech/Generic/LogitechRGBDeviceInfo.cs +++ b/RGB.NET.Devices.Logitech/Generic/LogitechRGBDeviceInfo.cs @@ -22,6 +22,7 @@ namespace RGB.NET.Devices.Logitech /// public string Model { get; } + /// public object? LayoutMetadata { get; set; } /// @@ -45,8 +46,6 @@ namespace RGB.NET.Devices.Logitech /// The represented device model. /// The lighting-capabilities of the device. /// The amount of zones the device is able to control. - /// The layout used to decide which images to load. - /// The path/name of the layout-file. internal LogitechRGBDeviceInfo(RGBDeviceType deviceType, string model, LogitechDeviceCaps deviceCaps, int zones) { this.DeviceType = deviceType; diff --git a/RGB.NET.Devices.Logitech/LogitechDeviceProvider.cs b/RGB.NET.Devices.Logitech/LogitechDeviceProvider.cs index 661dd83..480f723 100644 --- a/RGB.NET.Devices.Logitech/LogitechDeviceProvider.cs +++ b/RGB.NET.Devices.Logitech/LogitechDeviceProvider.cs @@ -42,6 +42,9 @@ namespace RGB.NET.Devices.Logitech private const int VENDOR_ID = 0x046D; + /// + /// Gets the HID-definitions for per-key-devices. + /// public static HIDLoader PerKeyDeviceDefinitions { get; } = new(VENDOR_ID) { { 0xC32B, RGBDeviceType.Keyboard, "G910", LedMappings.PerKey, 0 }, @@ -60,6 +63,9 @@ namespace RGB.NET.Devices.Logitech { 0xC545, RGBDeviceType.Keyboard, "Lightspeed Keyboard Dongle", LedMappings.PerKey, 0 }, }; + /// + /// Gets the HID-definitions for per-zone-devices. + /// public static HIDLoader PerZoneDeviceDefinitions { get; } = new(VENDOR_ID) { { 0xC336, RGBDeviceType.Keyboard, "G213", LedMappings.ZoneKeyboard, (LogitechDeviceType.Keyboard, 2) }, @@ -83,6 +89,9 @@ namespace RGB.NET.Devices.Logitech { 0xAB5, RGBDeviceType.Speaker, "G733", LedMappings.ZoneSpeaker, (LogitechDeviceType.Speaker, 2) }, }; + /// + /// Gets the HID-definitions for per-device-devices. + /// public static HIDLoader PerDeviceDeviceDefinitions { get; } = new(VENDOR_ID) { { 0xC228, RGBDeviceType.Keyboard, "G19", LedMappings.Device, 0 }, @@ -117,6 +126,7 @@ namespace RGB.NET.Devices.Logitech #region Methods + /// protected override void InitializeSDK() { _perDeviceUpdateQueue = new LogitechPerDeviceUpdateQueue(GetUpdateTrigger()); @@ -128,6 +138,7 @@ namespace RGB.NET.Devices.Logitech _LogitechGSDK.LogiLedSaveCurrentLighting(); } + /// protected override IEnumerable GetLoadedDevices(RGBDeviceType loadFilter) { PerKeyDeviceDefinitions.LoadFilter = loadFilter; @@ -136,8 +147,8 @@ namespace RGB.NET.Devices.Logitech return base.GetLoadedDevices(loadFilter); } - - //TODO DarthAffe 04.03.2021: Rework device selection and configuration for HID-based providers + + /// protected override IEnumerable LoadDevices() { (HIDDeviceDefinition definition, HidDevice device) perKeyDevice = PerKeyDeviceDefinitions.GetConnectedDevices().FirstOrDefault(); diff --git a/RGB.NET.Devices.Msi/Generic/MsiRGBDevice.cs b/RGB.NET.Devices.Msi/Generic/MsiRGBDevice.cs index 888155b..0622ee7 100644 --- a/RGB.NET.Devices.Msi/Generic/MsiRGBDevice.cs +++ b/RGB.NET.Devices.Msi/Generic/MsiRGBDevice.cs @@ -15,6 +15,7 @@ namespace RGB.NET.Devices.Msi /// Initializes a new instance of the class. /// /// The generic information provided by MSI for the device. + /// The update trigger used to update this device. protected MsiRGBDevice(TDeviceInfo info, IDeviceUpdateTrigger updateTrigger) : base(info, new MsiDeviceUpdateQueue(updateTrigger, info.MsiDeviceType)) { } diff --git a/RGB.NET.Devices.Msi/GraphicsCard/MsiGraphicsCardRGBDevice.cs b/RGB.NET.Devices.Msi/GraphicsCard/MsiGraphicsCardRGBDevice.cs index 629212c..1fe06b0 100644 --- a/RGB.NET.Devices.Msi/GraphicsCard/MsiGraphicsCardRGBDevice.cs +++ b/RGB.NET.Devices.Msi/GraphicsCard/MsiGraphicsCardRGBDevice.cs @@ -16,6 +16,8 @@ namespace RGB.NET.Devices.Msi /// Initializes a new instance of the class. /// /// The specific information provided by MSI for graphics cards. + /// The amount of leds on this device. + /// The update trigger used to update this device. internal MsiGraphicsCardRGBDevice(MsiRGBDeviceInfo info, int ledCount, IDeviceUpdateTrigger updateTrigger) : base(info, updateTrigger) { diff --git a/RGB.NET.Devices.Msi/Mainboard/MsiMainboardRGBDevice.cs b/RGB.NET.Devices.Msi/Mainboard/MsiMainboardRGBDevice.cs index 01f25ad..ad99030 100644 --- a/RGB.NET.Devices.Msi/Mainboard/MsiMainboardRGBDevice.cs +++ b/RGB.NET.Devices.Msi/Mainboard/MsiMainboardRGBDevice.cs @@ -16,6 +16,8 @@ namespace RGB.NET.Devices.Msi /// Initializes a new instance of the class. /// /// The specific information provided by MSI for the mainboard. + /// The amount of leds on this device. + /// The update trigger used to update this device. internal MsiMainboardRGBDevice(MsiRGBDeviceInfo info, int ledCount, IDeviceUpdateTrigger updateTrigger) : base(info, updateTrigger) { diff --git a/RGB.NET.Devices.Msi/Mouse/MsiMouseRGBDevice.cs b/RGB.NET.Devices.Msi/Mouse/MsiMouseRGBDevice.cs index 79ad777..584660b 100644 --- a/RGB.NET.Devices.Msi/Mouse/MsiMouseRGBDevice.cs +++ b/RGB.NET.Devices.Msi/Mouse/MsiMouseRGBDevice.cs @@ -16,6 +16,8 @@ namespace RGB.NET.Devices.Msi /// Initializes a new instance of the class. /// /// The specific information provided by MSI for the mouse. + /// The amount of leds on this device. + /// The update trigger used to update this device. internal MsiMouseRGBDevice(MsiRGBDeviceInfo info, int ledCount, IDeviceUpdateTrigger updateTrigger) : base(info, updateTrigger) { diff --git a/RGB.NET.Devices.Msi/MsiDeviceProvider.cs b/RGB.NET.Devices.Msi/MsiDeviceProvider.cs index 1be843d..a3e8c82 100644 --- a/RGB.NET.Devices.Msi/MsiDeviceProvider.cs +++ b/RGB.NET.Devices.Msi/MsiDeviceProvider.cs @@ -53,6 +53,7 @@ namespace RGB.NET.Devices.Msi #region Methods + /// protected override void InitializeSDK() { _MsiSDK.Reload(); @@ -62,6 +63,7 @@ namespace RGB.NET.Devices.Msi ThrowMsiError(errorCode, true); } + /// protected override IEnumerable LoadDevices() { int errorCode; diff --git a/RGB.NET.Devices.Novation/Generic/MidiUpdateQueue.cs b/RGB.NET.Devices.Novation/Generic/MidiUpdateQueue.cs index aa040be..46f85d1 100644 --- a/RGB.NET.Devices.Novation/Generic/MidiUpdateQueue.cs +++ b/RGB.NET.Devices.Novation/Generic/MidiUpdateQueue.cs @@ -51,11 +51,11 @@ namespace RGB.NET.Devices.Novation _outputDevice.SendShort(message.Message); } - /// /// Creates a update-message out of a specified data set. /// - /// The data set to create the message from. + /// The key used to identify the LED to update. + /// The color to send. /// The message created out of the data set. protected abstract ShortMessage? CreateMessage(object key, in Color color); diff --git a/RGB.NET.Devices.Novation/Launchpad/NovationLaunchpadRGBDevice.cs b/RGB.NET.Devices.Novation/Launchpad/NovationLaunchpadRGBDevice.cs index 1b9f073..20a6c59 100644 --- a/RGB.NET.Devices.Novation/Launchpad/NovationLaunchpadRGBDevice.cs +++ b/RGB.NET.Devices.Novation/Launchpad/NovationLaunchpadRGBDevice.cs @@ -17,6 +17,7 @@ namespace RGB.NET.Devices.Novation /// Initializes a new instance of the class. /// /// The specific information provided by Novation for the launchpad + /// The update trigger used to update this device. internal NovationLaunchpadRGBDevice(NovationLaunchpadRGBDeviceInfo info, IDeviceUpdateTrigger updateTrigger) : base(info, updateTrigger) { @@ -44,8 +45,13 @@ namespace RGB.NET.Devices.Novation protected override object GetLedCustomData(LedId ledId) => GetDeviceMapping().TryGetValue(ledId, out (byte mode, byte id, int _, int __) data) ? (data.mode, data.id) : ((byte)0x00, (byte)0x00); // ReSharper restore RedundantCast + /// + /// Gets the mapping used to access the LEDs of the device based on . + /// + /// The mapping of the device. + /// Thrown if the value of is not known. protected virtual Dictionary GetDeviceMapping() - => DeviceInfo.LedIdMapping switch + => DeviceInfo.LedMapping switch { LedIdMappings.Current => LaunchpadIdMapping.CURRENT, LedIdMappings.Legacy => LaunchpadIdMapping.LEGACY, diff --git a/RGB.NET.Devices.Novation/Launchpad/NovationLaunchpadRGBDeviceInfo.cs b/RGB.NET.Devices.Novation/Launchpad/NovationLaunchpadRGBDeviceInfo.cs index ce86e05..f1d73d1 100644 --- a/RGB.NET.Devices.Novation/Launchpad/NovationLaunchpadRGBDeviceInfo.cs +++ b/RGB.NET.Devices.Novation/Launchpad/NovationLaunchpadRGBDeviceInfo.cs @@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Novation { #region Properties & Fields - internal LedIdMappings LedIdMapping { get; } + internal LedIdMappings LedMapping { get; } #endregion @@ -23,11 +23,11 @@ namespace RGB.NET.Devices.Novation /// The represented device model. /// /// The of the . - internal NovationLaunchpadRGBDeviceInfo(string model, int deviceId, NovationColorCapabilities colorCapabilities, - LedIdMappings ledIdMapping) + /// A mapping of leds this device is initialized with. + internal NovationLaunchpadRGBDeviceInfo(string model, int deviceId, NovationColorCapabilities colorCapabilities, LedIdMappings ledMapping) : base(RGBDeviceType.LedMatrix, model, deviceId, colorCapabilities) { - this.LedIdMapping = ledIdMapping; + this.LedMapping = ledMapping; } #endregion diff --git a/RGB.NET.Devices.Novation/NovationDeviceProvider.cs b/RGB.NET.Devices.Novation/NovationDeviceProvider.cs index e0af6f2..1827616 100644 --- a/RGB.NET.Devices.Novation/NovationDeviceProvider.cs +++ b/RGB.NET.Devices.Novation/NovationDeviceProvider.cs @@ -41,8 +41,10 @@ namespace RGB.NET.Devices.Novation #region Methods + /// protected override void InitializeSDK() { } + /// protected override IEnumerable LoadDevices() { for (int index = 0; index < OutputDeviceBase.DeviceCount; index++) diff --git a/RGB.NET.Devices.PicoPi/Enum/UpdateMode.cs b/RGB.NET.Devices.PicoPi/Enum/UpdateMode.cs index 99b0ff0..5fc78f6 100644 --- a/RGB.NET.Devices.PicoPi/Enum/UpdateMode.cs +++ b/RGB.NET.Devices.PicoPi/Enum/UpdateMode.cs @@ -1,7 +1,11 @@ // ReSharper disable InconsistentNaming +#pragma warning disable 1591 namespace RGB.NET.Devices.PicoPi.Enum { + /// + /// Contains a list of possible ways of communication with the device. + /// public enum UpdateMode { Auto = 0x00, diff --git a/RGB.NET.Devices.PicoPi/PicoPi/PicoPiBulkUpdateQueue.cs b/RGB.NET.Devices.PicoPi/PicoPi/PicoPiBulkUpdateQueue.cs index a92b191..c7b7de0 100644 --- a/RGB.NET.Devices.PicoPi/PicoPi/PicoPiBulkUpdateQueue.cs +++ b/RGB.NET.Devices.PicoPi/PicoPi/PicoPiBulkUpdateQueue.cs @@ -3,6 +3,13 @@ using RGB.NET.Core; namespace RGB.NET.Devices.PicoPi { + /// + /// + /// Represents the update-queue performing updates for Pico-Pi bulk-devices. + /// + /// + /// Using this requires the libusb driver to be installed! + /// public class PicoPiBulkUpdateQueue : UpdateQueue { #region Properties & Fields @@ -16,6 +23,13 @@ namespace RGB.NET.Devices.PicoPi #region Constructors + /// + /// Initializes a new instance of the class. + /// + /// The update trigger used by this queue. + /// The sdk used to access the device. + /// The channel to update. + /// The maximum amount of leds to update. public PicoPiBulkUpdateQueue(IDeviceUpdateTrigger updateTrigger, PicoPiSDK sdk, int channel, int ledCount) : base(updateTrigger) { @@ -29,6 +43,7 @@ namespace RGB.NET.Devices.PicoPi #region Methods + /// protected override void Update(in ReadOnlySpan<(object key, Color color)> dataSet) { Span buffer = _dataBuffer; diff --git a/RGB.NET.Devices.PicoPi/PicoPi/PicoPiHIDUpdateQueue.cs b/RGB.NET.Devices.PicoPi/PicoPi/PicoPiHIDUpdateQueue.cs index 1ac89ed..1a888ec 100644 --- a/RGB.NET.Devices.PicoPi/PicoPi/PicoPiHIDUpdateQueue.cs +++ b/RGB.NET.Devices.PicoPi/PicoPi/PicoPiHIDUpdateQueue.cs @@ -3,6 +3,10 @@ using RGB.NET.Core; namespace RGB.NET.Devices.PicoPi { + /// + /// + /// Represents the update-queue performing updates for Pico-Pi HID-devices. + /// public class PicoPiHIDUpdateQueue : UpdateQueue { #region Constants @@ -22,6 +26,13 @@ namespace RGB.NET.Devices.PicoPi #region Constructors + /// + /// Initializes a new instance of the class. + /// + /// The update trigger used by this queue. + /// The sdk used to access the device. + /// The channel to update. + /// The maximum amount of leds to update. public PicoPiHIDUpdateQueue(IDeviceUpdateTrigger updateTrigger, PicoPiSDK sdk, int channel, int ledCount) : base(updateTrigger) { @@ -35,6 +46,7 @@ namespace RGB.NET.Devices.PicoPi #region Methods + /// protected override void Update(in ReadOnlySpan<(object key, Color color)> dataSet) { Span buffer = _dataBuffer; diff --git a/RGB.NET.Devices.PicoPi/PicoPi/PicoPiRGBDevice.cs b/RGB.NET.Devices.PicoPi/PicoPi/PicoPiRGBDevice.cs index d10e03d..88e7eea 100644 --- a/RGB.NET.Devices.PicoPi/PicoPi/PicoPiRGBDevice.cs +++ b/RGB.NET.Devices.PicoPi/PicoPi/PicoPiRGBDevice.cs @@ -2,6 +2,10 @@ namespace RGB.NET.Devices.PicoPi { + /// + /// + /// Represents a device based on an Raspberry Pi Pico. + /// public class PicoPiRGBDevice : AbstractRGBDevice { #region Properties & Fields @@ -12,6 +16,13 @@ namespace RGB.NET.Devices.PicoPi #region Constructors + /// + /// + /// Initializes a new instance of the class. + /// + /// The device info of this device. + /// The queue used to update this device. + /// A mapping of leds this device is initialized with. public PicoPiRGBDevice(PicoPiRGBDeviceInfo deviceInfo, IUpdateQueue updateQueue, LedMapping ledMapping) : base(deviceInfo, updateQueue) { diff --git a/RGB.NET.Devices.PicoPi/PicoPi/PicoPiRGBDeviceInfo.cs b/RGB.NET.Devices.PicoPi/PicoPi/PicoPiRGBDeviceInfo.cs index 5cd1a8e..e7e5d7a 100644 --- a/RGB.NET.Devices.PicoPi/PicoPi/PicoPiRGBDeviceInfo.cs +++ b/RGB.NET.Devices.PicoPi/PicoPi/PicoPiRGBDeviceInfo.cs @@ -2,19 +2,46 @@ namespace RGB.NET.Devices.PicoPi { + /// + /// Represents a generic information for a . + /// public class PicoPiRGBDeviceInfo : IRGBDeviceInfo { #region Properties & Fields + /// public RGBDeviceType DeviceType { get; } + + /// public string DeviceName { get; } + + /// public string Manufacturer => "RGB.NET"; + + /// public string Model { get; } + + /// public object? LayoutMetadata { get; set; } + /// + /// Gets the Id of the device. + /// public string Id { get; } + + /// + /// Gets the version of the device firmware. + /// public int Version { get; } + + /// + /// Gets the channel this device is using. + /// public int Channel { get; } + + /// + /// Gets the amount of LEDs on this device. + /// public int LedCount { get; } #endregion diff --git a/RGB.NET.Devices.PicoPi/PicoPi/PicoPiSDK.cs b/RGB.NET.Devices.PicoPi/PicoPi/PicoPiSDK.cs index c2ad416..542730b 100644 --- a/RGB.NET.Devices.PicoPi/PicoPi/PicoPiSDK.cs +++ b/RGB.NET.Devices.PicoPi/PicoPi/PicoPiSDK.cs @@ -9,6 +9,9 @@ using RGB.NET.Core; namespace RGB.NET.Devices.PicoPi { + /// + /// Represents a SDK to access devices based on a Raspberry Pi Pico. + /// public class PicoPiSDK : IDisposable { #region Constants @@ -49,16 +52,34 @@ namespace RGB.NET.Devices.PicoPi private int _bulkTransferLength; + /// + /// Gets if updates via the Bulk-Enbpoint are possible. + /// public bool IsBulkSupported { get; private set; } + /// + /// Gets the Id of the device. + /// public string Id { get; } + + /// + /// Gets the version of the device firmware. + /// public int Version { get; } + + /// + /// Gets a collection of channels, led counts and pins that are available on this device. + /// public IReadOnlyList<(int channel, int ledCount, int pin)> Channels { get; } #endregion #region Constructors + /// + /// Initializes a new instance of the class. + /// + /// The underlying hid device. public PicoPiSDK(HidDevice device) { this._hidDevice = device; @@ -79,6 +100,11 @@ namespace RGB.NET.Devices.PicoPi #region Methods + /// + /// Configures the amount of leds to update on the specified channels. + /// + /// This is a configuration function. The value is persistent on the device. + /// The values to set on the device. public void SetLedCounts(params (int channel, int ledCount)[] ledCounts) { byte[] data = new byte[Channels.Count + 2]; @@ -92,6 +118,11 @@ namespace RGB.NET.Devices.PicoPi SendHID(data); } + /// + /// Configures the pins used by the specified channels. + /// + /// This is a configuration function. The value is persistent on the device. + /// T values to set on the device. public void SetPins(params (int channel, int pin)[] pins) { byte[] data = new byte[Channels.Count + 2]; @@ -173,6 +204,13 @@ namespace RGB.NET.Devices.PicoPi } } + /// + /// Sends a update to the device using the HID-endpoint. + /// + /// The data packet to send. + /// The channel to update. + /// The chunk id of the packet. (Required if packets are fragmented.) + /// A value indicating if the device should update directly after receiving this packet. (If packets are fragmented this should only be true for the last chunk.) public void SendHidUpdate(in Span data, int channel, int chunk, bool update) { if (data.Length == 0) return; @@ -186,6 +224,14 @@ namespace RGB.NET.Devices.PicoPi SendHID(_hidSendBuffer); } + /// + /// Sends a update to the device using the bulk-endpoint. + /// + /// + /// Silently fails if not bulk-updates are supported. (Check ) + /// + /// The data packet to send. + /// The channel to update. public void SendBulkUpdate(in Span data, int channel) { if ((data.Length == 0) || !IsBulkSupported) return; @@ -200,6 +246,9 @@ namespace RGB.NET.Devices.PicoPi _bulkTransferLength += payloadSize; } + /// + /// Flushing the bulk endpoint, causing the device to update. + /// public void FlushBulk() { if (_bulkTransferLength == 0) return; @@ -216,6 +265,7 @@ namespace RGB.NET.Devices.PicoPi private byte[] Read() => _hidStream.Read(); + /// public void Dispose() { _hidStream.Dispose(); diff --git a/RGB.NET.Devices.PicoPi/PicoPiDeviceProvider.cs b/RGB.NET.Devices.PicoPi/PicoPiDeviceProvider.cs index 3b7f861..b8ffd69 100644 --- a/RGB.NET.Devices.PicoPi/PicoPiDeviceProvider.cs +++ b/RGB.NET.Devices.PicoPi/PicoPiDeviceProvider.cs @@ -31,6 +31,9 @@ namespace RGB.NET.Devices.PicoPi /// public static PicoPiDeviceProvider Instance => _instance ?? new PicoPiDeviceProvider(); + /// + /// Gets the HID-definitions for PicoPi-devices. + /// public static HIDLoader DeviceDefinitions { get; } = new(PicoPiSDK.VENDOR_ID) { { PicoPiSDK.HID_BULK_CONTROLLER_PID, RGBDeviceType.LedStripe, "WS2812B-Controller", LedMappings.StripeMapping, 0 }, @@ -38,6 +41,10 @@ namespace RGB.NET.Devices.PicoPi private readonly List _sdks = new(); + /// + /// Gets or sets the endpoint used to update devices. (default ). + /// If auto is set it automatically is using bulk-updates for devies with more than 40 LEDs if supported. Else HID is used. + /// public UpdateMode UpdateMode { get; set; } = UpdateMode.Auto; #endregion @@ -58,6 +65,7 @@ namespace RGB.NET.Devices.PicoPi #region Methods + /// protected override void InitializeSDK() { } /// @@ -108,6 +116,7 @@ namespace RGB.NET.Devices.PicoPi } } + /// protected override void Reset() { base.Reset(); diff --git a/RGB.NET.Devices.Razer/ChromaLink/RazerChromaLinkRGBDevice.cs b/RGB.NET.Devices.Razer/ChromaLink/RazerChromaLinkRGBDevice.cs index 1fc51f9..579eadc 100644 --- a/RGB.NET.Devices.Razer/ChromaLink/RazerChromaLinkRGBDevice.cs +++ b/RGB.NET.Devices.Razer/ChromaLink/RazerChromaLinkRGBDevice.cs @@ -19,6 +19,7 @@ namespace RGB.NET.Devices.Razer /// Initializes a new instance of the class. /// /// The specific information provided by CUE for the chroma link. + /// The update trigger used to update this device. internal RazerChromaLinkRGBDevice(RazerRGBDeviceInfo info, IDeviceUpdateTrigger updateTrigger) : base(info, new RazerChromaLinkUpdateQueue(updateTrigger)) { diff --git a/RGB.NET.Devices.Razer/Headset/RazerHeadsetRGBDevice.cs b/RGB.NET.Devices.Razer/Headset/RazerHeadsetRGBDevice.cs index 16d4129..1d1e656 100644 --- a/RGB.NET.Devices.Razer/Headset/RazerHeadsetRGBDevice.cs +++ b/RGB.NET.Devices.Razer/Headset/RazerHeadsetRGBDevice.cs @@ -19,6 +19,7 @@ namespace RGB.NET.Devices.Razer /// Initializes a new instance of the class. /// /// The specific information provided by CUE for the headset. + /// The update trigger used to update this device. internal RazerHeadsetRGBDevice(RazerRGBDeviceInfo info, IDeviceUpdateTrigger updateTrigger) : base(info, new RazerHeadsetUpdateQueue(updateTrigger)) { diff --git a/RGB.NET.Devices.Razer/Keyboard/RazerKeyboardRGBDevice.cs b/RGB.NET.Devices.Razer/Keyboard/RazerKeyboardRGBDevice.cs index 2d17914..e4a7f01 100644 --- a/RGB.NET.Devices.Razer/Keyboard/RazerKeyboardRGBDevice.cs +++ b/RGB.NET.Devices.Razer/Keyboard/RazerKeyboardRGBDevice.cs @@ -27,6 +27,8 @@ namespace RGB.NET.Devices.Razer /// Initializes a new instance of the class. /// /// The specific information provided by CUE for the keyboard. + /// The update trigger used to update this device. + /// A mapping of leds this device is initialized with. internal RazerKeyboardRGBDevice(RazerKeyboardRGBDeviceInfo info, IDeviceUpdateTrigger updateTrigger, LedMapping ledMapping) : base(info, new RazerKeyboardUpdateQueue(updateTrigger)) { diff --git a/RGB.NET.Devices.Razer/Keypad/RazerKeypadRGBDevice.cs b/RGB.NET.Devices.Razer/Keypad/RazerKeypadRGBDevice.cs index f2a1987..915e8d8 100644 --- a/RGB.NET.Devices.Razer/Keypad/RazerKeypadRGBDevice.cs +++ b/RGB.NET.Devices.Razer/Keypad/RazerKeypadRGBDevice.cs @@ -19,6 +19,7 @@ namespace RGB.NET.Devices.Razer /// Initializes a new instance of the class. /// /// The specific information provided by CUE for the keypad. + /// The update trigger used to update this device. internal RazerKeypadRGBDevice(RazerRGBDeviceInfo info, IDeviceUpdateTrigger updateTrigger) : base(info, new RazerKeypadUpdateQueue(updateTrigger)) { diff --git a/RGB.NET.Devices.Razer/Mouse/RazerMouseRGBDevice.cs b/RGB.NET.Devices.Razer/Mouse/RazerMouseRGBDevice.cs index eec4dab..06015ad 100644 --- a/RGB.NET.Devices.Razer/Mouse/RazerMouseRGBDevice.cs +++ b/RGB.NET.Devices.Razer/Mouse/RazerMouseRGBDevice.cs @@ -25,6 +25,8 @@ namespace RGB.NET.Devices.Razer /// Initializes a new instance of the class. /// /// The specific information provided by CUE for the mouse. + /// The update trigger used to update this device. + /// A mapping of leds this device is initialized with. internal RazerMouseRGBDevice(RazerRGBDeviceInfo info, IDeviceUpdateTrigger updateTrigger, LedMapping ledMapping) : base(info, new RazerMouseUpdateQueue(updateTrigger)) { diff --git a/RGB.NET.Devices.Razer/Mousepad/RazerMousepadRGBDevice.cs b/RGB.NET.Devices.Razer/Mousepad/RazerMousepadRGBDevice.cs index 2c02bfa..f50c20f 100644 --- a/RGB.NET.Devices.Razer/Mousepad/RazerMousepadRGBDevice.cs +++ b/RGB.NET.Devices.Razer/Mousepad/RazerMousepadRGBDevice.cs @@ -19,6 +19,7 @@ namespace RGB.NET.Devices.Razer /// Initializes a new instance of the class. /// /// The specific information provided by CUE for the mousepad. + /// The update trigger used to update this device. internal RazerMousepadRGBDevice(RazerRGBDeviceInfo info, IDeviceUpdateTrigger updateTrigger) : base(info, new RazerMousepadUpdateQueue(updateTrigger)) { diff --git a/RGB.NET.Devices.Razer/RazerDeviceProvider.cs b/RGB.NET.Devices.Razer/RazerDeviceProvider.cs index 2048a5f..3d0927d 100644 --- a/RGB.NET.Devices.Razer/RazerDeviceProvider.cs +++ b/RGB.NET.Devices.Razer/RazerDeviceProvider.cs @@ -44,6 +44,9 @@ namespace RGB.NET.Devices.Razer private const int VENDOR_ID = 0x1532; + /// + /// Gets the HID-definitions for Razer-devices. + /// public static HIDLoader DeviceDefinitions { get; } = new(VENDOR_ID) { // Keyboards @@ -214,6 +217,7 @@ namespace RGB.NET.Devices.Razer #region Methods + /// protected override void InitializeSDK() { TryUnInit(); @@ -225,6 +229,7 @@ namespace RGB.NET.Devices.Razer ThrowRazerError(error, true); } + /// protected override IEnumerable GetLoadedDevices(RGBDeviceType loadFilter) { DeviceDefinitions.LoadFilter = loadFilter; @@ -250,6 +255,7 @@ namespace RGB.NET.Devices.Razer return devices; } + /// protected override IEnumerable LoadDevices() { // Only take the first device of each endpoint type, the Razer SDK doesn't allow separate control over multiple devices using the same endpoint diff --git a/RGB.NET.Devices.SteelSeries/Enum/SteelSeriesDeviceType.cs b/RGB.NET.Devices.SteelSeries/Enum/SteelSeriesDeviceType.cs index 3e68226..31bce28 100644 --- a/RGB.NET.Devices.SteelSeries/Enum/SteelSeriesDeviceType.cs +++ b/RGB.NET.Devices.SteelSeries/Enum/SteelSeriesDeviceType.cs @@ -1,4 +1,6 @@ -namespace RGB.NET.Devices.SteelSeries +#pragma warning disable 1591 + +namespace RGB.NET.Devices.SteelSeries { // DarthAffe 09.07.2020: Review the LISP-Handler in SteelSeriesSDK after adding new device-types! They need to be initialized. public enum SteelSeriesDeviceType diff --git a/RGB.NET.Devices.SteelSeries/Generic/SteelSeriesRGBDeviceInfo.cs b/RGB.NET.Devices.SteelSeries/Generic/SteelSeriesRGBDeviceInfo.cs index 1885db8..e907a07 100644 --- a/RGB.NET.Devices.SteelSeries/Generic/SteelSeriesRGBDeviceInfo.cs +++ b/RGB.NET.Devices.SteelSeries/Generic/SteelSeriesRGBDeviceInfo.cs @@ -25,6 +25,9 @@ namespace RGB.NET.Devices.SteelSeries /// public object? LayoutMetadata { get; set; } + /// + /// Gets the type of this device used in the SDK. + /// public SteelSeriesDeviceType SteelSeriesDeviceType { get; } #endregion @@ -36,9 +39,7 @@ namespace RGB.NET.Devices.SteelSeries /// /// The type of the . /// The represented device model. - /// The lighting-capabilities of the device. - /// The layout used to decide which images to load. - /// The path/name of the layout-file. + /// The type of this device used in the SDK. internal SteelSeriesRGBDeviceInfo(RGBDeviceType deviceType, string model, SteelSeriesDeviceType steelSeriesDeviceType) { this.DeviceType = deviceType; diff --git a/RGB.NET.Devices.SteelSeries/SteelSeriesDeviceProvider.cs b/RGB.NET.Devices.SteelSeries/SteelSeriesDeviceProvider.cs index 81ca9c5..244e0a3 100644 --- a/RGB.NET.Devices.SteelSeries/SteelSeriesDeviceProvider.cs +++ b/RGB.NET.Devices.SteelSeries/SteelSeriesDeviceProvider.cs @@ -8,7 +8,7 @@ namespace RGB.NET.Devices.SteelSeries { /// /// - /// Represents a device provider responsible for SteelSeries- devices. + /// Represents a device provider responsible for SteelSeries-devices. /// public class SteelSeriesDeviceProvider : AbstractRGBDeviceProvider { @@ -22,6 +22,9 @@ namespace RGB.NET.Devices.SteelSeries private const int VENDOR_ID = 0x1038; + /// + /// Gets the HID-definitions for SteelSeries-devices. + /// public static HIDLoader DeviceDefinitions { get; } = new(VENDOR_ID) { //Mice diff --git a/RGB.NET.Devices.WS281X/Arduino/ArduinoWS2812USBDevice.cs b/RGB.NET.Devices.WS281X/Arduino/ArduinoWS2812USBDevice.cs index 545dccd..d948cca 100644 --- a/RGB.NET.Devices.WS281X/Arduino/ArduinoWS2812USBDevice.cs +++ b/RGB.NET.Devices.WS281X/Arduino/ArduinoWS2812USBDevice.cs @@ -26,9 +26,10 @@ namespace RGB.NET.Devices.WS281X.Arduino /// /// Initializes a new instance of the class. /// - /// The update trigger used by this queue. + /// The device info of this device. /// The update queue performing updates for this device. /// The channel (as defined in the arduino-sketch) this device is attached to. + /// The amount of leds on this device. public ArduinoWS2812USBDevice(ArduinoWS2812USBDeviceInfo deviceInfo, ArduinoWS2812USBUpdateQueue updateQueue, int channel, int ledCount) : base(deviceInfo, updateQueue) { diff --git a/RGB.NET.Devices.WS281X/Arduino/ArduinoWS2812USBUpdateQueue.cs b/RGB.NET.Devices.WS281X/Arduino/ArduinoWS2812USBUpdateQueue.cs index 9263e64..5b77654 100644 --- a/RGB.NET.Devices.WS281X/Arduino/ArduinoWS2812USBUpdateQueue.cs +++ b/RGB.NET.Devices.WS281X/Arduino/ArduinoWS2812USBUpdateQueue.cs @@ -31,8 +31,7 @@ namespace RGB.NET.Devices.WS281X.Arduino /// Initializes a new instance of the class. /// /// The update trigger used by this queue. - /// The name of the serial-port to connect to. - /// The baud-rate used by the serial-connection. + /// The serial connection used to access the device. public ArduinoWS2812USBUpdateQueue(IDeviceUpdateTrigger updateTrigger, ISerialConnection serialConnection) : base(updateTrigger, serialConnection) { } diff --git a/RGB.NET.Devices.WS281X/Bitwizard/BitwizardWS2812USBDevice.cs b/RGB.NET.Devices.WS281X/Bitwizard/BitwizardWS2812USBDevice.cs index 9ff359d..aeabb5e 100644 --- a/RGB.NET.Devices.WS281X/Bitwizard/BitwizardWS2812USBDevice.cs +++ b/RGB.NET.Devices.WS281X/Bitwizard/BitwizardWS2812USBDevice.cs @@ -24,8 +24,10 @@ namespace RGB.NET.Devices.WS281X.Bitwizard /// /// Initializes a new instance of the class. /// - /// The update trigger used by this queue. + /// The device info of this device. /// The update queue performing updates for this device. + /// The offset used to access the leds on this device. + /// The amount of leds on this device. public BitwizardWS2812USBDevice(BitwizardWS2812USBDeviceInfo deviceInfo, BitwizardWS2812USBUpdateQueue updateQueue, int ledOffset, int ledCount) : base(deviceInfo, updateQueue) { diff --git a/RGB.NET.Devices.WS281X/Bitwizard/BitwizardWS2812USBUpdateQueue.cs b/RGB.NET.Devices.WS281X/Bitwizard/BitwizardWS2812USBUpdateQueue.cs index 623f0fe..022f1fe 100644 --- a/RGB.NET.Devices.WS281X/Bitwizard/BitwizardWS2812USBUpdateQueue.cs +++ b/RGB.NET.Devices.WS281X/Bitwizard/BitwizardWS2812USBUpdateQueue.cs @@ -17,8 +17,7 @@ namespace RGB.NET.Devices.WS281X.Bitwizard /// Initializes a new instance of the class. /// /// The update trigger used by this queue. - /// The name of the serial-port to connect to. - /// The baud-rate used by the serial-connection. + /// The serial connection used to access the device. public BitwizardWS2812USBUpdateQueue(IDeviceUpdateTrigger updateTrigger, ISerialConnection serialConnection) : base(updateTrigger, serialConnection) { } diff --git a/RGB.NET.Devices.WS281X/Bitwizard/BitwizardWS281XDeviceDefinition.cs b/RGB.NET.Devices.WS281X/Bitwizard/BitwizardWS281XDeviceDefinition.cs index 558548a..0443fa7 100644 --- a/RGB.NET.Devices.WS281X/Bitwizard/BitwizardWS281XDeviceDefinition.cs +++ b/RGB.NET.Devices.WS281X/Bitwizard/BitwizardWS281XDeviceDefinition.cs @@ -36,6 +36,9 @@ namespace RGB.NET.Devices.WS281X.Bitwizard /// public string? Name { get; set; } + /// + /// Gets a list of LED-strips configured on this device. + /// public List<(int pin, int stripLength)> Strips { get; } = new(); /// @@ -52,6 +55,7 @@ namespace RGB.NET.Devices.WS281X.Bitwizard /// Initializes a new instance of the class. /// /// The serial connection used for the device. + /// A list of LED-strips connected to this device. public BitwizardWS281XDeviceDefinition(ISerialConnection serialConnection, params (int pin, int stripLength)[] strips) { this.SerialConnection = serialConnection; @@ -64,6 +68,7 @@ namespace RGB.NET.Devices.WS281X.Bitwizard /// /// The name of the serial-port to connect to. /// The baud-rate of the serial-connection. + /// A list of LED-strips connected to this device. public BitwizardWS281XDeviceDefinition(string port, int baudRate = 115200, params (int pin, int stripLength)[] strips) { SerialConnection = new SerialPortConnection(port, baudRate); diff --git a/RGB.NET.Devices.WS281X/Generic/SerialPortConnection.cs b/RGB.NET.Devices.WS281X/Generic/SerialPortConnection.cs index fded9dc..822c845 100644 --- a/RGB.NET.Devices.WS281X/Generic/SerialPortConnection.cs +++ b/RGB.NET.Devices.WS281X/Generic/SerialPortConnection.cs @@ -28,6 +28,11 @@ namespace RGB.NET.Devices.WS281X #region Constructors + /// + /// Initializes a new instance of the class. + /// + /// The name of the serial-port to connect to. + /// The baud-rate used by the serial-connection. public SerialPortConnection(string port, int baudRate) { SerialPort = new SerialPort(port, baudRate); diff --git a/RGB.NET.Devices.WS281X/Generic/SerialPortUpdateQueue.cs b/RGB.NET.Devices.WS281X/Generic/SerialPortUpdateQueue.cs index 7bee162..4b3d378 100644 --- a/RGB.NET.Devices.WS281X/Generic/SerialPortUpdateQueue.cs +++ b/RGB.NET.Devices.WS281X/Generic/SerialPortUpdateQueue.cs @@ -33,8 +33,7 @@ namespace RGB.NET.Devices.WS281X /// Initializes a new instance of the class. /// /// The update trigger used by this queue. - /// The name of the serial-port to connect to. - /// The baud-rate used by the serial-connection. + /// The serial connection used to access the device. internal SerialConnectionUpdateQueue(IDeviceUpdateTrigger updateTrigger, ISerialConnection serialConnection) : base(updateTrigger) { diff --git a/RGB.NET.Devices.WS281X/NodeMCU/NodeMCUWS2812USBDevice.cs b/RGB.NET.Devices.WS281X/NodeMCU/NodeMCUWS2812USBDevice.cs index 3e59cd1..7d540b5 100644 --- a/RGB.NET.Devices.WS281X/NodeMCU/NodeMCUWS2812USBDevice.cs +++ b/RGB.NET.Devices.WS281X/NodeMCU/NodeMCUWS2812USBDevice.cs @@ -28,11 +28,12 @@ namespace RGB.NET.Devices.WS281X.NodeMCU /// /// Initializes a new instance of the class. /// - /// The update trigger used by this queue. + /// The device info of this device. /// The update queue performing updates for this device. /// The channel (as defined in the NodeMCU-sketch) this device is attached to. - public NodeMCUWS2812USBDevice(NodeMCUWS2812USBDeviceInfo info, NodeMCUWS2812USBUpdateQueue updateQueue, int channel, int ledCount) - : base(info, updateQueue) + /// The amount of leds on this device. + public NodeMCUWS2812USBDevice(NodeMCUWS2812USBDeviceInfo deviceInfo, NodeMCUWS2812USBUpdateQueue updateQueue, int channel, int ledCount) + : base(deviceInfo, updateQueue) { this.Channel = channel; diff --git a/RGB.NET.Devices.Wooting/Generic/WootingRGBDevice.cs b/RGB.NET.Devices.Wooting/Generic/WootingRGBDevice.cs index b7a4d22..11c91f9 100644 --- a/RGB.NET.Devices.Wooting/Generic/WootingRGBDevice.cs +++ b/RGB.NET.Devices.Wooting/Generic/WootingRGBDevice.cs @@ -16,6 +16,7 @@ namespace RGB.NET.Devices.Wooting.Generic /// Initializes a new instance of the class. /// /// The generic information provided by Wooting for the device. + /// The update trigger used to update this device. protected WootingRGBDevice(TDeviceInfo info, IDeviceUpdateTrigger updateTrigger) : base(info, new WootingUpdateQueue(updateTrigger)) { } diff --git a/RGB.NET.Devices.Wooting/Keyboard/WootingKeyboardRGBDevice.cs b/RGB.NET.Devices.Wooting/Keyboard/WootingKeyboardRGBDevice.cs index 2f7ac90..4e643bd 100644 --- a/RGB.NET.Devices.Wooting/Keyboard/WootingKeyboardRGBDevice.cs +++ b/RGB.NET.Devices.Wooting/Keyboard/WootingKeyboardRGBDevice.cs @@ -24,6 +24,7 @@ namespace RGB.NET.Devices.Wooting.Keyboard /// Initializes a new instance of the class. /// /// The specific information provided by Wooting for the keyboard + /// The update trigger used to update this device. internal WootingKeyboardRGBDevice(WootingKeyboardRGBDeviceInfo info, IDeviceUpdateTrigger updateTrigger) : base(info, updateTrigger) { diff --git a/RGB.NET.Devices.Wooting/Keyboard/WootingKeyboardRGBDeviceInfo.cs b/RGB.NET.Devices.Wooting/Keyboard/WootingKeyboardRGBDeviceInfo.cs index 69368be..f2dcfdf 100644 --- a/RGB.NET.Devices.Wooting/Keyboard/WootingKeyboardRGBDeviceInfo.cs +++ b/RGB.NET.Devices.Wooting/Keyboard/WootingKeyboardRGBDeviceInfo.cs @@ -23,7 +23,6 @@ namespace RGB.NET.Devices.Wooting.Keyboard /// Internal constructor of managed . /// /// The index of the . - /// The of the . internal WootingKeyboardRGBDeviceInfo(WootingDevicesIndexes deviceIndex) : base(RGBDeviceType.Keyboard, deviceIndex) { } diff --git a/RGB.NET.Devices.Wooting/WootingDeviceProvider.cs b/RGB.NET.Devices.Wooting/WootingDeviceProvider.cs index 8d88fd1..6c06d35 100644 --- a/RGB.NET.Devices.Wooting/WootingDeviceProvider.cs +++ b/RGB.NET.Devices.Wooting/WootingDeviceProvider.cs @@ -53,6 +53,7 @@ namespace RGB.NET.Devices.Wooting #region Methods + /// protected override void InitializeSDK() { lock (_WootingSDK.SdkLock) @@ -61,6 +62,7 @@ namespace RGB.NET.Devices.Wooting } } + /// protected override IEnumerable LoadDevices() { lock (_WootingSDK.SdkLock)