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

The LedWiz is a easy to use outputcontroller with 32 outputs which all support 49 pwm levels with a PWM frequency of approx. 50hz. The LedWiz is able to drive leds and smaller loads directly, but will require some kind of booster for power hungery gadgets like big contactors or motors. More...

Inheritance diagram for DirectOutput.Cab.Out.LW.LedWiz:
DirectOutput.Cab.Out.OutputControllerBase DirectOutput.Cab.Out.IOutputController DirectOutput.General.Generic.NamedItemBase DirectOutput.Cab.Out.IOutputController DirectOutput.General.Generic.INamedItem DirectOutput.General.Generic.INamedItem DirectOutput.General.Generic.INamedItem

Public Member Functions

override void Update ()
 Updates all outputs of the LedWiz output controller.
Signals the workerthread that all pending updates for the ledwiz should be sent to the physical LedWiz unit. More...
 
override void Init (Cabinet Cabinet)
 Initializes the LedWiz object.
This method does also start the workerthread which does the actual update work when Update() is called.
This method should only be called once. Subsequent calls have no effect. More...
 
override void Finish ()
 Finishes the LedWiz object.
Finish does also terminate the workerthread for updates. More...
 
void Dispose ()
 Disposes the LedWiz object. More...
 
 LedWiz ()
 Initializes a new instance of the LedWiz class. More...
 
 LedWiz (int Number)
 Initializes a new instance of the LedWiz class. More...
 

Static Public Member Functions

static List< int > GetLedwizNumbers ()
 Gets the numbers of the LedWiz controllers which are connected to the system. More...
 

Protected Member Functions

override void OnOutputValueChanged (IOutput Output)
 This method is called whenever the value of a output in the Outputs property changes its value.
Updates the internal arrays holding the states of the LedWiz outputs. More...
 
virtual void Dispose (bool disposing)
 Releases unmanaged and - optionally - managed resources. 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 Number [get, set]
 Gets or sets the number of the LedWiz.
The number of the LedWiz must be unique.
Setting changes the Name property, if it is blank or if the Name coresponds to LedWiz {Number}. More...
 
int MinCommandIntervalMs [get, set]
 Gets or sets the mininimal interval between command in miliseconds (Default: 1ms). Depending on the mainboard, usb hardware on the board, usb drivers and other factors the LedWiz does sometime tend to loose or misunderstand commands received if the are sent in to short intervals. The settings allows to increase the default minmal interval between commands from 1ms to a higher value. Higher values will make problems less likely, but decreases the number of possible updates of the ledwiz outputs in a given time frame. It is recommended to use the default interval of 1 ms and only to increase this interval if problems occur (Toys which are sometimes not reacting, random knocks of replay knocker or solenoids). 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

The LedWiz is a easy to use outputcontroller with 32 outputs which all support 49 pwm levels with a PWM frequency of approx. 50hz. The LedWiz is able to drive leds and smaller loads directly, but will require some kind of booster for power hungery gadgets like big contactors or motors.

LedWizboard.jpg

The DirectOutput framework does fully support the LedWiz and can control up to 16 LedWiz units.

The framework can automatically detect connected LedWiz units and configure them for use with the framework.

The LedWiz is made by GroovyGameGear and can by ordered directly on GroovyGamegears website, but also from some other vendors.

This unit was the first output controller which was widely used in the virtual pinball community and was the unit for which the legacy vbscript solution was developed. The DirectOutput framework replaces the vbscript solution, but can reuse the ini files which were used for the configuration of the tables. Please read ledcontrolfiles for more information.

The current implementation of the LedWiz driver uses a separate thread for every ledwiz connected to the system to ensure max. performance.

LedWizLogo.jpg

Definition at line 27 of file LedWiz.cs.

Constructor & Destructor Documentation

DirectOutput.Cab.Out.LW.LedWiz.LedWiz ( )

Initializes a new instance of the LedWiz class.

Definition at line 449 of file LedWiz.cs.

DirectOutput.Cab.Out.LW.LedWiz.LedWiz ( int  Number)

Initializes a new instance of the LedWiz class.

Parameters
NumberThe number of the LedWiz (1-16).

Definition at line 464 of file LedWiz.cs.

Member Function Documentation

void DirectOutput.Cab.Out.LW.LedWiz.Dispose ( )

Disposes the LedWiz object.

Definition at line 382 of file LedWiz.cs.

virtual void DirectOutput.Cab.Out.LW.LedWiz.Dispose ( bool  disposing)
protectedvirtual

Releases unmanaged and - optionally - managed resources.

Parameters
disposingtrue to release both managed and unmanaged resources; false to release only unmanaged resources.

Definition at line 392 of file LedWiz.cs.

override void DirectOutput.Cab.Out.LW.LedWiz.Finish ( )

Finishes the LedWiz object.
Finish does also terminate the workerthread for updates.

Implements DirectOutput.Cab.Out.IOutputController.

Definition at line 138 of file LedWiz.cs.

static List<int> DirectOutput.Cab.Out.LW.LedWiz.GetLedwizNumbers ( )
static

Gets the numbers of the LedWiz controllers which are connected to the system.

Returns

Definition at line 351 of file LedWiz.cs.

override void DirectOutput.Cab.Out.LW.LedWiz.Init ( Cabinet  Cabinet)

Initializes the LedWiz object.
This method does also start the workerthread which does the actual update work when Update() is called.
This method should only be called once. Subsequent calls have no effect.

Parameters
CabinetThe Cabinet object which is using the LedWiz instance.

Implements DirectOutput.Cab.Out.IOutputController.

Definition at line 119 of file LedWiz.cs.

override void DirectOutput.Cab.Out.LW.LedWiz.OnOutputValueChanged ( IOutput  Output)
protectedvirtual

This method is called whenever the value of a output in the Outputs property changes its value.
Updates the internal arrays holding the states of the LedWiz outputs.

Parameters
OutputThe output which has changed.
Exceptions
System.ExceptionThe OutputValueChanged event handler for LedWiz {0:00} has been called by a sender which is not a LedWizOutput.
or
LedWiz output numbers must be in the range of 1-32. The supplied output number {0} is out of range.

Implements DirectOutput.Cab.Out.OutputControllerBase.

Definition at line 180 of file LedWiz.cs.

override void DirectOutput.Cab.Out.LW.LedWiz.Update ( )

Updates all outputs of the LedWiz output controller.
Signals the workerthread that all pending updates for the ledwiz should be sent to the physical LedWiz unit.

Implements DirectOutput.Cab.Out.IOutputController.

Definition at line 107 of file LedWiz.cs.

Property Documentation

int DirectOutput.Cab.Out.LW.LedWiz.MinCommandIntervalMs
getset

Gets or sets the mininimal interval between command in miliseconds (Default: 1ms). Depending on the mainboard, usb hardware on the board, usb drivers and other factors the LedWiz does sometime tend to loose or misunderstand commands received if the are sent in to short intervals. The settings allows to increase the default minmal interval between commands from 1ms to a higher value. Higher values will make problems less likely, but decreases the number of possible updates of the ledwiz outputs in a given time frame. It is recommended to use the default interval of 1 ms and only to increase this interval if problems occur (Toys which are sometimes not reacting, random knocks of replay knocker or solenoids).

The mininimal interval between command in miliseconds (Default: 1ms). Depending on the mainboard, usb hardware on the board, usb drivers and other factors the LedWiz does sometime tend to loose or misunderstand commands received if the are sent in to short intervals. The settings allows to increase the default minmal interval between commands from 1ms to a higher value. Higher values will make problems less likely, but decreases the number of possible updates of the ledwiz outputs in a given time frame. It is recommended to use the default interval of 1 ms and only to increase this interval if problems occur (Toys which are sometimes not reacting, random knocks of replay knocker or solenoids).

Definition at line 90 of file LedWiz.cs.

int DirectOutput.Cab.Out.LW.LedWiz.Number
getset

Gets or sets the number of the LedWiz.
The number of the LedWiz must be unique.
Setting changes the Name property, if it is blank or if the Name coresponds to LedWiz {Number}.

The unique number of the LedWiz (Range 1-16).

Exceptions
System.ExceptionLedWiz Numbers must be between 1-16. The supplied number {0} is out of range.

Definition at line 47 of file LedWiz.cs.


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