Show / Hide Table of Contents

Class LightspeedHIDLoader<TLed, TData>

Represents a loaded for logitech HID-devices.

Inheritance
object
LightspeedHIDLoader<TLed, TData>
Implements
IEnumerable<HIDDeviceDefinition<TLed, TData>>
IEnumerable
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
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 Source

LoadFilter

Gets or sets the filter used to determine which devices should be loaded.

Declaration
public RGBDeviceType LoadFilter { get; set; }
Property Value
Type Description
RGBDeviceType
| Edit this page View Source

VendorId

Gets the vendor id used for this loader.

Declaration
public int VendorId { get; }
Property Value
Type Description
int

Methods

| Edit this page View Source

Add(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.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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.

Implements

IEnumerable<T>
IEnumerable
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX