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

The PacLed64 is a output controller with 64 outputs all supporting 256 pwm levels with a PWM frequency of 100khz. Since the outputs of the unit are constant current drivers providing 20ma each, leds can be connected directly to the outputs (no resistor needed), but booster circuits must be used to driver higher loads (e.g. Cree leds). Up to 4 PacLed64 controllers can be used with the DirectOutput framework. More...

Inheritance diagram for DirectOutput.Cab.Out.Pac.PacLed64:
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 ()
 Signals the workerthread that all pending updates for the PacLed64 should be sent to the PacLed64. More...
 
override void Init (Cabinet Cabinet)
 Initializes the PacLed64 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 PacLed64 object.
Finish does also terminate the workerthread. More...
 
 PacLed64 ()
 Initializes a new instance of the PacLed64 class. More...
 
 PacLed64 (int Id)
 Initializes a new instance of the PacLed64 class. 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.
It updates the internal array holding the states of the PacLed64 outputs. 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 Id [get, set]
 Gets or sets the Id of the PacLed64.
The Id of the PacLed64 must be unique and in the range of 1 to 4.
Setting changes the Name property, if it is blank or if the Name coresponds to PacLed64 {Id}. More...
 
int MinUpdateIntervalMs [get, set]
 Gets or sets the minmal update interval in miliseconds.
Specifies the minimal interval between update calls for the PacLed64. Default interval if not specified is 0ms.
Unless you have issues with your PacLed64, e.g. random flickering of leds and random firing of solenoids or knocker, this properties value should be kept on 0. Otherwise try 1ms or 2ms, before going for hight values.
Allowed value rang 0 - 1000ms.
More...
 
int FullUpdateThreshold [get, set]
 Gets or sets the full update threshold value. To allow for most efficient communication with the PacLed64 DOF checks how many output are to be updated. If a number of updates which are greater or equal than the FullUpdateThreshold is required a command to update all outputs of the controller is sent to the PacLed64. If the number of required updates is below the FullUpdateThreshold value, a series of update commands for single outputs is sent.
Background: The full updates command takes longer than the commands for a update of a single output. Therefore it is more efficient to send several single output commands than a full update command if only a small number of outputs has to be changed. During developemnt the full update command showed to be more efficient only if more than 30 outputs are to be updated.
Default value: 30
Allowed range: 0-64 (0 enforce full updates all the time, 64 will always use single updates except for some special cases) 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 PacLed64 is a output controller with 64 outputs all supporting 256 pwm levels with a PWM frequency of 100khz. Since the outputs of the unit are constant current drivers providing 20ma each, leds can be connected directly to the outputs (no resistor needed), but booster circuits must be used to driver higher loads (e.g. Cree leds). Up to 4 PacLed64 controllers can be used with the DirectOutput framework.

The framework supports auto detection and configuration of these units. If auto config is used, two LedWizEquivalent toys are added for each connected PacLed64. The numbers of the LedWizEquivalents are based on the Id of the PacLed64. Id1=LedwizEquivalent 20+21, Id2=LedwizEquivalent 22+23, Id3=LedwizEquivalent 24+25, Id4=LedwizEquivalent 26+27. If the numbers of ini files used for the configuration match these numbers, they will be used to set up the effects for the table.

This unit is made and sold by Ultimarc.

The implemention of the PacLed64 driver uses a separate thread per connected unit to ensure max. performance.

PacLed64Logo.png

Definition at line 23 of file PacLed64.cs.

Constructor & Destructor Documentation

DirectOutput.Cab.Out.Pac.PacLed64.PacLed64 ( )

Initializes a new instance of the PacLed64 class.

Definition at line 283 of file PacLed64.cs.

DirectOutput.Cab.Out.Pac.PacLed64.PacLed64 ( int  Id)

Initializes a new instance of the PacLed64 class.

Parameters
IdThe number of the PacLed64 (1-4).

Definition at line 296 of file PacLed64.cs.

Member Function Documentation

override void DirectOutput.Cab.Out.Pac.PacLed64.Finish ( )

Finishes the PacLed64 object.
Finish does also terminate the workerthread.

Implements DirectOutput.Cab.Out.IOutputController.

Definition at line 147 of file PacLed64.cs.

override void DirectOutput.Cab.Out.Pac.PacLed64.Init ( Cabinet  Cabinet)

Initializes the PacLed64 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 output controller instance.

Implements DirectOutput.Cab.Out.IOutputController.

Definition at line 133 of file PacLed64.cs.

override void DirectOutput.Cab.Out.Pac.PacLed64.OnOutputValueChanged ( IOutput  Output)
protectedvirtual

This method is called whenever the value of a output in the Outputs property changes its value.
It updates the internal array holding the states of the PacLed64 outputs.

Parameters
OutputThe output.
Exceptions
System.ExceptionThe OutputValueChanged event handler for PacLed64 unit {0} (Id: {2:0}) has been called by a sender which is not a OutputNumbered.
or
PacLed64 output numbers must be in the range of 1-64. The supplied output number {0} is out of range.

Implements DirectOutput.Cab.Out.OutputControllerBase.

Definition at line 189 of file PacLed64.cs.

override void DirectOutput.Cab.Out.Pac.PacLed64.Update ( )

Signals the workerthread that all pending updates for the PacLed64 should be sent to the PacLed64.

Implements DirectOutput.Cab.Out.IOutputController.

Definition at line 121 of file PacLed64.cs.

Property Documentation

int DirectOutput.Cab.Out.Pac.PacLed64.FullUpdateThreshold
getset

Gets or sets the full update threshold value. To allow for most efficient communication with the PacLed64 DOF checks how many output are to be updated. If a number of updates which are greater or equal than the FullUpdateThreshold is required a command to update all outputs of the controller is sent to the PacLed64. If the number of required updates is below the FullUpdateThreshold value, a series of update commands for single outputs is sent.
Background: The full updates command takes longer than the commands for a update of a single output. Therefore it is more efficient to send several single output commands than a full update command if only a small number of outputs has to be changed. During developemnt the full update command showed to be more efficient only if more than 30 outputs are to be updated.
Default value: 30
Allowed range: 0-64 (0 enforce full updates all the time, 64 will always use single updates except for some special cases)

The full update threshold (value 0-64, default: 30).
To allow for most efficient communication with the PacLed64 DOF checks how many output are to be updated. If a number of updates which are greater or equal than the FullUpdateThreshold is required a command to update all outputs of the controller is sent to the PacLed64. If the number of required updates is below the FullUpdateThreshold value, a series of update commands for single outputs is sent.
Background: The full updates command takes longer than the commands for a update of a single output. Therefore it is more efficient to send several single output commands than a full update command if only a small number of outputs has to be changed. During developemnt the full update command showed to be more efficient only if more than 30 outputs are to be updated.
Default value: 30
Allowed range: 0-64 (0 enforce full updates all the time, 64 will always use single updates except for some special cases)

Definition at line 108 of file PacLed64.cs.

int DirectOutput.Cab.Out.Pac.PacLed64.Id
getset

Gets or sets the Id of the PacLed64.
The Id of the PacLed64 must be unique and in the range of 1 to 4.
Setting changes the Name property, if it is blank or if the Name coresponds to PacLed64 {Id}.

The unique Id of the PacLed64 (Range 1-4).

Exceptions
System.ExceptionPacLed64 Ids must be between 1-4. The supplied Id {0} is out of range.

Definition at line 43 of file PacLed64.cs.

int DirectOutput.Cab.Out.Pac.PacLed64.MinUpdateIntervalMs
getset

Gets or sets the minmal update interval in miliseconds.
Specifies the minimal interval between update calls for the PacLed64. Default interval if not specified is 0ms.
Unless you have issues with your PacLed64, e.g. random flickering of leds and random firing of solenoids or knocker, this properties value should be kept on 0. Otherwise try 1ms or 2ms, before going for hight values.
Allowed value rang 0 - 1000ms.

The minimal update interval in milliseconds.
Specifies the minimal interval between update calls for the PacLed64. Default interval if not specified is 0ms.
Unless you have issues with your PacLed64, e.g. random flickering of leds and random firing of solenoids or knocker, this properties value should be kept on 0. Otherwise try 1ms or 2ms, before going for hight values.
Allowed value rang 0 - 1000ms.

Definition at line 85 of file PacLed64.cs.


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