WIP
DirectOutput framework for virtual pinball cabinets WIP
Go to:
Overview 
DirectOutput.Cab.Out.AdressableLedStrip.DirectStripController Class Reference

This output controller class is used to control the direct strip controller by Swisslizard. More...

Inheritance diagram for DirectOutput.Cab.Out.AdressableLedStrip.DirectStripController:
DirectOutput.Cab.Out.OutputControllerBase DirectOutput.Cab.Out.ISupportsSetValues DirectOutput.General.Generic.NamedItemBase DirectOutput.Cab.Out.IOutputController DirectOutput.Cab.Out.IOutputController DirectOutput.General.Generic.INamedItem DirectOutput.General.Generic.INamedItem DirectOutput.General.Generic.INamedItem DirectOutput.Cab.Out.AdressableLedStrip.WS2811StripController

Public Member Functions

void SetValues (int FirstOutput, byte[] Values)
 Sets the values for one or several outputs of the controller. More...
 
override void Init (Cabinet Cabinet)
 Initializes the output controller. More...
 
override void Finish ()
 Finishes the output controller. More...
 
override void Update ()
 Notifies the updater thread to sdend data to the controller hardware. More...
 
 DirectStripController ()
 Initializes a new instance of the DirectStripController class. More...
 

Protected Member Functions

override void OnOutputValueChanged (IOutput ChangedOutput)
 This method is called whenever the value of a output in the Outputs property changes its value.
More...
 
- Protected Member Functions inherited from DirectOutput.General.Generic.NamedItemBase
virtual void AfterNameChange (string OldName, string NewName)
 
virtual void BeforeNameChange (string OldName, string NewName)
 
virtual void OnPropertyChanged (string propertyName)
 
virtual void OnPropertyChanging (string propertyName)
 

Properties

int ControllerNumber [get, set]
 Gets or sets the number of the controller. More...
 
int NumberOfLeds [get, set]
 Gets or sets the number of leds on the WS2811 based led strip. More...
 
bool PackData [get, set]
 Gets or sets a value indicating whether the data which is sent to the controller should be packed. Data packing uses a simple IFF (Interchangable File Format) like system. More...
 
bool UpdaterThreadIsActive [get]
 Indicates whether the UpdaterThread of the DirectStripController instance is active or not. More...
 
- Properties inherited from DirectOutput.Cab.Out.OutputControllerBase
virtual OutputList Outputs [get, set]
 Contains the OutputList object for the outputs of the output controller.
More...
 
- Properties inherited from DirectOutput.General.Generic.NamedItemBase
string Name [get, set]
 Name of the named item.
Triggers BeforeNameChange before a new Name is set.
Triggers AfterNameChanged after a new name has been set. 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.Out.IOutputController
new string Name [get, set]
 Name of the IOutputController. This property is fully implemented in the abstract OutputControllerBase class. More...
 
OutputList Outputs [get, set]
 OutputList containing the IOutput objects for a IOutputController. 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< NameChangeEventArgsBeforeNameChanged
 Event is fired before the value of the property Name is changed. More...
 
PropertyChangedEventHandler PropertyChanged
 
PropertyChangingEventHandler PropertyChanging
 
- Events inherited from DirectOutput.General.Generic.INamedItem
EventHandler< NameChangeEventArgsBeforeNameChanged
 Occurs before the name of the item changes. More...
 
EventHandler< NameChangeEventArgsAfterNameChanged
 Occurs when after the name of the item has changed. More...
 

Detailed Description

This output controller class is used to control the direct strip controller by Swisslizard.

The hardware of this controller is based on a Atmel microcontroller and a FT245R USB interface chip by FTDI. To ensure max performance all copde on the controller has been written in assembler.

WS2811 is a small controller chip which can controll a RGB led (256 PWM level on each channel) and be daisychained, so long cahins of LEDs (led strip are possible. The WS2812 understands the same protocoll as the WS2811, but is a RGB led with integrated controller chip which allows for even more dense populated RGB strips.

Those controller chips are controlled using a single data line (there is no clock line). The data has to be sent with a frequency of 800khz. 1 bits have a duration of 0.65uS high and 0.6uS low. 0 bits have a duration of 0.25uS high and 1uS low. A interuption in the dataflow triggers the controller chips to push the data in the shift register to the PWM outputs. Since the timing requirements are very strict it is not easily possible to output that signal directly from a computer with normal operating system. Thats why controllers like the one displayed below are needed.

WS2811Controller.jpg

This is a image of my controller prototype with classical through the hole parts and a small breakoutboard by SparkFun. At the time of the release of DOF R2, the first prototypes of SMD version of the controller are in production. Check back in the forums for more information.

Definition at line 24 of file DirectStripController.cs.

Constructor & Destructor Documentation

DirectOutput.Cab.Out.AdressableLedStrip.DirectStripController.DirectStripController ( )

Initializes a new instance of the DirectStripController class.

Definition at line 377 of file DirectStripController.cs.

Member Function Documentation

override void DirectOutput.Cab.Out.AdressableLedStrip.DirectStripController.Finish ( )
virtual

Finishes the output controller.

Implements DirectOutput.Cab.Out.OutputControllerBase.

Definition at line 179 of file DirectStripController.cs.

override void DirectOutput.Cab.Out.AdressableLedStrip.DirectStripController.Init ( Cabinet  Cabinet)
virtual

Initializes the output controller.

Parameters
CabinetThe cabinet object which is using the IOutputController instance.

Implements DirectOutput.Cab.Out.OutputControllerBase.

Definition at line 167 of file DirectStripController.cs.

override void DirectOutput.Cab.Out.AdressableLedStrip.DirectStripController.OnOutputValueChanged ( IOutput  ChangedOutput)
protectedvirtual

This method is called whenever the value of a output in the Outputs property changes its value.

Parameters
ChangedOutputThe output which has triggered the event.

Implements DirectOutput.Cab.Out.OutputControllerBase.

Definition at line 119 of file DirectStripController.cs.

void DirectOutput.Cab.Out.AdressableLedStrip.DirectStripController.SetValues ( int  FirstOutput,
byte[]  Values 
)

Sets the values for one or several outputs of the controller.

Parameters
FirstOutputThe first output to be updated with a new value (zero based).
ValuesThe values to be used.

Implements DirectOutput.Cab.Out.ISupportsSetValues.

Definition at line 33 of file DirectStripController.cs.

override void DirectOutput.Cab.Out.AdressableLedStrip.DirectStripController.Update ( )
virtual

Notifies the updater thread to sdend data to the controller hardware.

Implements DirectOutput.Cab.Out.OutputControllerBase.

Definition at line 188 of file DirectStripController.cs.

Property Documentation

int DirectOutput.Cab.Out.AdressableLedStrip.DirectStripController.ControllerNumber
getset

Gets or sets the number of the controller.

The number of the WS2811 strip controller.

Definition at line 64 of file DirectStripController.cs.

int DirectOutput.Cab.Out.AdressableLedStrip.DirectStripController.NumberOfLeds
getset

Gets or sets the number of leds on the WS2811 based led strip.

The number of leds on the WS2811 based led strip.

Definition at line 79 of file DirectStripController.cs.

bool DirectOutput.Cab.Out.AdressableLedStrip.DirectStripController.PackData
getset

Gets or sets a value indicating whether the data which is sent to the controller should be packed. Data packing uses a simple IFF (Interchangable File Format) like system.

true if data should be packed bore it is sent to the controller; otherwise false (default).

Definition at line 100 of file DirectStripController.cs.

bool DirectOutput.Cab.Out.AdressableLedStrip.DirectStripController.UpdaterThreadIsActive
get

Indicates whether the UpdaterThread of the DirectStripController instance is active or not.

Definition at line 254 of file DirectStripController.cs.


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