Class BitwizardWS281XDeviceDefinition
Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.
Implements
Inherited Members
Namespace: RGB.NET.Devices.WS281X.Bitwizard
Assembly: RGB.NET.Devices.WS281X.dll
Syntax
public sealed class BitwizardWS281XDeviceDefinition : IWS281XDeviceDefinition
Constructors
| Edit this page View SourceBitwizardWS281XDeviceDefinition(ISerialConnection, params (int pin, int stripLength)[])
Initializes a new instance of the BitwizardWS281XDeviceDefinition class.
Declaration
public BitwizardWS281XDeviceDefinition(ISerialConnection serialConnection, params (int pin, int stripLength)[] strips)
Parameters
| Type | Name | Description |
|---|---|---|
| ISerialConnection | serialConnection | The serial connection used for the device. |
| (int channel, int ledCount)[] | strips | A list of LED-strips connected to this device. |
BitwizardWS281XDeviceDefinition(string, int, params (int pin, int stripLength)[])
Initializes a new instance of the BitwizardWS281XDeviceDefinition class.
Declaration
public BitwizardWS281XDeviceDefinition(string port, int baudRate = 115200, params (int pin, int stripLength)[] strips)
Parameters
| Type | Name | Description |
|---|---|---|
| string | port | The name of the serial-port to connect to. |
| int | baudRate | The baud-rate of the serial-connection. |
| (int channel, int ledCount)[] | strips | A list of LED-strips connected to this device. |
Properties
| Edit this page View SourceBaudRate
Gets the baud-rate used by the serial-connection.
Declaration
public int BaudRate { get; }
Property Value
| Type | Description |
|---|---|
| int |
MaxStripLength
Gets or sets the amount of leds controlled by one pin. This only needs to be changed if the firmware on the controller is updated.
Declaration
public int MaxStripLength { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Name
Gets or sets the name used by this device.
Declaration
public string? Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Port
Gets the name of the serial-port to connect to.
Declaration
public string Port { get; }
Property Value
| Type | Description |
|---|---|
| string |
SerialConnection
Gets the serial-connection used for the device.
Declaration
public ISerialConnection SerialConnection { get; }
Property Value
| Type | Description |
|---|---|
| ISerialConnection |
Strips
Gets a list of LED-strips configured on this device.
Declaration
public List<(int pin, int stripLength)> Strips { get; }
Property Value
| Type | Description |
|---|---|
| List<(int pin, int stripLength)> |
Methods
| Edit this page View SourceCreateDevices(IDeviceUpdateTrigger)
Gets the devices defined by this definition.
Declaration
public IEnumerable<IRGBDevice> CreateDevices(IDeviceUpdateTrigger updateTrigger)
Parameters
| Type | Name | Description |
|---|---|---|
| IDeviceUpdateTrigger | updateTrigger |
Returns
| Type | Description |
|---|---|
| IEnumerable<IRGBDevice> | The initialized devices defined by this definition. |