Class LightspeedHIDLoader<TLed, TData>
Represents a loaded for logitech HID-devices.
Inherited Members
Namespace: RGB.NET.Devices.Logitech.HID
Assembly: RGB.NET.Devices.Logitech.dll
Syntax
public sealed class LightspeedHIDLoader<TLed, TData> : IEnumerable<HIDDeviceDefinition<TLed, TData>>, IEnumerable where TLed : notnull
Type Parameters
| Name | Description |
|---|---|
| TLed | The type of the identifier leds are mapped to. |
| TData | The type of the custom data added to the HID-device. |
Properties
| Edit this page View SourceLoadFilter
Gets or sets the filter used to determine which devices should be loaded.
Declaration
public RGBDeviceType LoadFilter { get; set; }
Property Value
| Type | Description |
|---|---|
| RGBDeviceType |
VendorId
Gets the vendor id used for this loader.
Declaration
public int VendorId { get; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
| Edit this page View SourceAdd(int, RGBDeviceType, string, LedMapping<TLed>, TData)
Adds a new HIDDeviceDefinition<TLed, TData> to this loader.
Declaration
public void Add(int virtualPid, RGBDeviceType deviceType, string name, LedMapping<TLed> ledMapping, TData customData)
Parameters
| Type | Name | Description |
|---|---|---|
| int | virtualPid | The virtual product id of the HID-device. |
| RGBDeviceType | deviceType | The type of the device. |
| string | name | The name of the device. |
| LedMapping<TLed> | ledMapping | The mapping of the leds of the device. |
| TData | customData | Some custom data to attach to the device. |
GetConnectedDevices()
Gets a enumerable containing all devices from the definition-list that are connected and match the LoadFilter.
Declaration
public IEnumerable<HIDDeviceDefinition<TLed, TData>> GetConnectedDevices()
Returns
| Type | Description |
|---|---|
| IEnumerable<HIDDeviceDefinition<TLed, TData>> | The enumerable containing the connected devices. |
GetConnectedDevices<TKey>(Func<HIDDeviceDefinition<TLed, TData>, TKey>)
Gets a enumerable containing all the first device of each group of devices from the definition-list that are connected and match the LoadFilter. The grouping is done by the specified function.
Declaration
public IEnumerable<HIDDeviceDefinition<TLed, TData>> GetConnectedDevices<TKey>(Func<HIDDeviceDefinition<TLed, TData>, TKey> groupBy)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<HIDDeviceDefinition<TLed, TData>, TKey> | groupBy | The function grouping the devices. |
Returns
| Type | Description |
|---|---|
| IEnumerable<HIDDeviceDefinition<TLed, TData>> | The enumerable containing the selected devices. |
Type Parameters
| Name | Description |
|---|---|
| TKey | The type of the key used to group the devices. |
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<HIDDeviceDefinition<TLed, TData>> GetEnumerator()
Returns
| Type | Description |
|---|---|
| IEnumerator<HIDDeviceDefinition<TLed, TData>> | An enumerator that can be used to iterate through the collection. |