WIP
DirectOutput framework for virtual pinball cabinets WIP
|
Go to: Overview |
This abstract class implement the full base logic for a output controller with a separate thread for the hardware communication. All you have to do to create your own output controller class is to inherit this class and to implement a few abstract methods (int GetNumberOfConfiguredOutputs(), bool VerifySettings(), void ConnectToController(), void DisconnectFromController(), void UpdateOutputs(byte[] OutputValues). More...
Public Member Functions | |
void | SetValues (int FirstOutput, byte[] Values) |
Sets the values for one or several outputs of the controller. More... | |
virtual void | Init (Cabinet Cabinet) |
Initializes the output controller and starts the updater thread. More... | |
virtual void | Finish () |
Finishes the output controller and stop the updater thread. More... | |
void | Update () |
Triggers the update of the physical outputs More... | |
Protected Member Functions | |
void | SetupOutputs () |
Manages to output object of the output controller. Use the GetNumberOfConfiguredOutputs() method to determine the number of outputs to be setup. More... | |
override void | AfterNameChange (string OldName, string NewName) |
abstract int | GetNumberOfConfiguredOutputs () |
This method must return the number of configured outputs. The method is used internaly to determine the number of output objects which have to be setup. Return a fixed value for output controllers which have a fixed number of outputs. Return the value of a configurable property for controllers with a defineable number of outputs. More... | |
abstract bool | VerifySettings () |
Verifies the settings of the output controller. More... | |
abstract void | UpdateOutputs (byte[] OutputValues) |
This method is called whenever new data has to be sent to the output controller. Implement the communication with your hereware in this method. More... | |
abstract void | ConnectToController () |
This method is called when DOF wants to connect to the controller. Implement your own logic to connect to the controller here. More... | |
abstract void | DisconnectFromController () |
This method is called when DOF wants to disconnect from the controller. Implement your own logic to disconnect from the controller here. More... | |
Protected Member Functions inherited from DirectOutput.General.Generic.NamedItemBase | |
virtual void | BeforeNameChange (string OldName, string NewName) |
virtual void | OnPropertyChanged (string propertyName) |
virtual void | OnPropertyChanging (string propertyName) |
Properties | |
OutputList | Outputs [get, set] |
Contains the OutputList object for the outputs of the output controller. More... | |
bool | UpdaterThreadIsActive [get] |
Indicates whether the UpdaterThread is active or not. 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< NameChangeEventArgs > | AfterNameChanged |
Event is fired after the value of the property Name has changed. More... | |
EventHandler< NameChangeEventArgs > | BeforeNameChanged |
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< NameChangeEventArgs > | BeforeNameChanged |
Occurs before the name of the item changes. More... | |
EventHandler< NameChangeEventArgs > | AfterNameChanged |
Occurs when after the name of the item has changed. More... | |
This abstract class implement the full base logic for a output controller with a separate thread for the hardware communication. All you have to do to create your own output controller class is to inherit this class and to implement a few abstract methods (int GetNumberOfConfiguredOutputs(), bool VerifySettings(), void ConnectToController(), void DisconnectFromController(), void UpdateOutputs(byte[] OutputValues).
Definition at line 15 of file OutputControllerCompleteBase.cs.
|
protectedvirtual |
Reimplemented from DirectOutput.General.Generic.NamedItemBase.
Definition at line 60 of file OutputControllerCompleteBase.cs.
|
protectedpure virtual |
This method is called when DOF wants to connect to the controller. Implement your own logic to connect to the controller here.
Implemented in DirectOutput.Cab.Out.AdressableLedStrip.TeensyStripController, DirectOutput.Cab.Out.PS.Pinscape, DirectOutput.Cab.Out.DMX.ArtNet, and DirectOutput.Cab.Out.ComPort.PinControl.
|
protectedpure virtual |
This method is called when DOF wants to disconnect from the controller. Implement your own logic to disconnect from the controller here.
Implemented in DirectOutput.Cab.Out.AdressableLedStrip.TeensyStripController, DirectOutput.Cab.Out.PS.Pinscape, DirectOutput.Cab.Out.ComPort.PinControl, and DirectOutput.Cab.Out.DMX.ArtNet.
|
virtual |
Finishes the output controller and stop the updater thread.
Implements DirectOutput.Cab.Out.IOutputController.
Reimplemented in DirectOutput.Cab.Out.PS.Pinscape.
Definition at line 180 of file OutputControllerCompleteBase.cs.
|
protectedpure virtual |
This method must return the number of configured outputs. The method is used internaly to determine the number of output objects which have to be setup. Return a fixed value for output controllers which have a fixed number of outputs. Return the value of a configurable property for controllers with a defineable number of outputs.
Implemented in DirectOutput.Cab.Out.AdressableLedStrip.TeensyStripController, DirectOutput.Cab.Out.DMX.ArtNet, DirectOutput.Cab.Out.ComPort.PinControl, and DirectOutput.Cab.Out.OutputControllerFlexCompleteBase.
|
virtual |
Initializes the output controller and starts the updater thread.
Cabinet | The cabinet object which is using the output controller instance. |
Implements DirectOutput.Cab.Out.IOutputController.
Reimplemented in DirectOutput.Cab.Out.PS.Pinscape.
Definition at line 151 of file OutputControllerCompleteBase.cs.
|
protected |
Manages to output object of the output controller. Use the GetNumberOfConfiguredOutputs() method to determine the number of outputs to be setup.
Definition at line 27 of file OutputControllerCompleteBase.cs.
void DirectOutput.Cab.Out.OutputControllerCompleteBase.SetValues | ( | int | FirstOutput, |
byte[] | Values | ||
) |
Sets the values for one or several outputs of the controller.
FirstOutput | The first output to be updated with a new value (zero based). |
Values | The values to be used. |
Implements DirectOutput.Cab.Out.ISupportsSetValues.
Definition at line 129 of file OutputControllerCompleteBase.cs.
void DirectOutput.Cab.Out.OutputControllerCompleteBase.Update | ( | ) |
Triggers the update of the physical outputs
Implements DirectOutput.Cab.Out.IOutputController.
Definition at line 189 of file OutputControllerCompleteBase.cs.
|
protectedpure virtual |
This method is called whenever new data has to be sent to the output controller. Implement the communication with your hereware in this method.
OutputValues | Array of output values for each numbered output. |
Implemented in DirectOutput.Cab.Out.AdressableLedStrip.TeensyStripController, DirectOutput.Cab.Out.PS.Pinscape, DirectOutput.Cab.Out.DMX.ArtNet, and DirectOutput.Cab.Out.ComPort.PinControl.
|
protectedpure virtual |
Verifies the settings of the output controller.
true
if the verification is OK, otherwise false
Implemented in DirectOutput.Cab.Out.AdressableLedStrip.TeensyStripController, DirectOutput.Cab.Out.PS.Pinscape, DirectOutput.Cab.Out.DMX.ArtNet, and DirectOutput.Cab.Out.ComPort.PinControl.
|
getset |
Contains the OutputList object for the outputs of the output controller.
Definition at line 74 of file OutputControllerCompleteBase.cs.
|
get |
Indicates whether the UpdaterThread is active or not.
Definition at line 292 of file OutputControllerCompleteBase.cs.