DirectOutput
DirectOutput framework R2 for virtual pinball cabinets.
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros Pages
DirectOutput.Cab.Toys.Hardware.LedStrip Class Reference

Represents a adressable led strip. More...

Inheritance diagram for DirectOutput.Cab.Toys.Hardware.LedStrip:
Collaboration diagram for DirectOutput.Cab.Toys.Hardware.LedStrip:

Public Member Functions

override void Init (Cabinet Cabinet)
 Initializes the toy. More...
 
override void Reset ()
 Resets the toy. Turns all outputs off. More...
 
override void UpdateOutputs ()
 Updates the data of the assigned output controller More...
 
RGBAColor[,] GetLayer (int LayerNr)
 Gets the 2 dimensional RGBAColor array for the specified layer. More...
 
 LedStrip ()
 Initializes a new instance of the LedStrip class. More...
 

Properties

int Width [get, set]
 Gets or sets the width resp. number of leds in horizontal direction of the led stripe. More...
 
int Height [get, set]
 Gets or sets the height resp. the number of leds in vertical direction of the led strip. More...
 
int NumberOfLeds [get]
 Gets the number of leds of the led stripe. More...
 
int NumberOfOutputs [get]
 Gets the number of outputs required for the ledstrip. More...
 
LedStripArrangementEnum LedStripArrangement [get, set]
 Gets or sets the strip arrangement. The following image explains the meaining of the different values. More...
 
RGBOrderEnum ColorOrder [get, set]
 Gets or sets the order of the colors for the leds of the led strip. Usually colors are represented in RGB (Red - Green - Blue) order, but depending on the type of the used strip the color order might be different (e.g. WS2812 led chips have green - red - blue as their color order). More...
 
int FirstLedNumber [get, set]
 Gets or sets the number of the first led of the strip. More...
 
string FadingCurveName [get, set]
 Gets or sets the name of the fading curve as defined in the Curves list of the cabinet object. This curve can be used to adjust the brightness values for the led to the brightness perception of the human eye. More...
 
string OutputControllerName [get, set]
 Gets or sets the name of the output controller to be used. More...
 
MatrixDictionaryBase< RGBAColorLayers [get, set]
 Gets the layers dictionary of the toy. More...
 
- Properties inherited from DirectOutput.Cab.Toys.IToy
new string Name [get, set]
 Gets or sets the Name of the IToy. More...
 
- Properties inherited from DirectOutput.General.Generic.INamedItem
string Name [get, set]
 Gets or sets the name of the item.
Must fire the BeforeNameChange and AfterNameChange events when the value of the property is changed. More...
 
- Properties inherited from DirectOutput.Cab.Toys.IMatrixToy< MatrixElementType >
int Height [get]
 Gets the height resp. the y dimension of the toys matrix. More...
 
int Width [get]
 Gets the width resp. the x dimension of the toys matrix. More...
 

Additional Inherited Members

- Events inherited from DirectOutput.General.Generic.NamedItemBase
EventHandler< NameChangeEventArgsAfterNameChanged
 Event is fired after the value of the property Name has changed. More...
 
EventHandler< NameChangeEventArgsBeforeNameChange
 Event is fired before the value of the property Name is changed. More...
 
- Events inherited from DirectOutput.General.Generic.INamedItem
EventHandler< NameChangeEventArgsBeforeNameChange
 Occurs before the name of the item changes. More...
 
EventHandler< NameChangeEventArgsAfterNameChanged
 Occurs when after the name of the item has changed. More...
 

Detailed Description

Represents a adressable led strip.

The toy supports several layers and supports transparency/alpha channels for every single led.

Constructor & Destructor Documentation

DirectOutput.Cab.Toys.Hardware.LedStrip.LedStrip ( )

Initializes a new instance of the LedStrip class.

Member Function Documentation

RGBAColor [,] DirectOutput.Cab.Toys.Hardware.LedStrip.GetLayer ( int  LayerNr)

Gets the 2 dimensional RGBAColor array for the specified layer.

Dimension 0 of the array represents the x resp. horizontal direction. Dimension 1 of the array repersent the y resp. vertical direction. Position 0,0 is the upper left corner of the ledarray.

If the specified layer does not exist, it will be created as a fully transparent layer where all positions are set to transparent black.

Parameters
LayerNrThe layer nr.
Returns
The RGBAColor array for the specified layer.

Implements DirectOutput.Cab.Toys.IMatrixToy< MatrixElementType >.

override void DirectOutput.Cab.Toys.Hardware.LedStrip.Init ( Cabinet  Cabinet)

Initializes the toy.

Parameters
CabinetCabinet object to which the IToy belongs.

Implements DirectOutput.Cab.Toys.IToy.

override void DirectOutput.Cab.Toys.Hardware.LedStrip.Reset ( )

Resets the toy. Turns all outputs off.

Implements DirectOutput.Cab.Toys.IToy.

override void DirectOutput.Cab.Toys.Hardware.LedStrip.UpdateOutputs ( )
virtual

Updates the data of the assigned output controller

Implements DirectOutput.Cab.Toys.ToyBaseUpdatable.

Property Documentation

RGBOrderEnum DirectOutput.Cab.Toys.Hardware.LedStrip.ColorOrder
getset

Gets or sets the order of the colors for the leds of the led strip. Usually colors are represented in RGB (Red - Green - Blue) order, but depending on the type of the used strip the color order might be different (e.g. WS2812 led chips have green - red - blue as their color order).

The color order of the leds on the strip.

string DirectOutput.Cab.Toys.Hardware.LedStrip.FadingCurveName
getset

Gets or sets the name of the fading curve as defined in the Curves list of the cabinet object. This curve can be used to adjust the brightness values for the led to the brightness perception of the human eye.

The name of the fading curve.

int DirectOutput.Cab.Toys.Hardware.LedStrip.FirstLedNumber
getset

Gets or sets the number of the first led of the strip.

The number of the first led of the strip.

int DirectOutput.Cab.Toys.Hardware.LedStrip.Height
getset

Gets or sets the height resp. the number of leds in vertical direction of the led strip.

The height of the led stripe.

MatrixDictionaryBase<RGBAColor> DirectOutput.Cab.Toys.Hardware.LedStrip.Layers
getset

Gets the layers dictionary of the toy.

The layers dictionary of the toy.

LedStripArrangementEnum DirectOutput.Cab.Toys.Hardware.LedStrip.LedStripArrangement
getset

Gets or sets the strip arrangement. The following image explains the meaining of the different values.

The strip arrangement value as defined in the LedStripArrangementEnum.

int DirectOutput.Cab.Toys.Hardware.LedStrip.NumberOfLeds
get

Gets the number of leds of the led stripe.

The number of leds of the led stripe.

int DirectOutput.Cab.Toys.Hardware.LedStrip.NumberOfOutputs
get

Gets the number of outputs required for the ledstrip.

The number of outputs of the ledstrip.

string DirectOutput.Cab.Toys.Hardware.LedStrip.OutputControllerName
getset

Gets or sets the name of the output controller to be used.

The name of the output controller.

int DirectOutput.Cab.Toys.Hardware.LedStrip.Width
getset

Gets or sets the width resp. number of leds in horizontal direction of the led stripe.

The width of the led stripe.


The documentation for this class was generated from the following file: