WIP
DirectOutput framework for virtual pinball cabinets WIP
|
Go to: Overview |
This is a generic output controller class which are based on the FT245R chip (http://www.ftdichip.com/Products/ICs/FT245R.htm). Only units using the chip in bitbang mode are supported by this output controller class. The SainSmart USB relay boards (http://www.sainsmart.com/arduino-compatibles-1/relay/usb-relay.html) are compatible with this output controller, but other hardware which is based on the same controller chip might be compatible as well. Generally controller units which is exclusively using the FT245R (no extra cpu on board) and having max. 8 output ports are likely to be compatible. Please let me know, if you have tested other hardware successfully, so I can ammend the docu. More...
Public Member Functions | |
override void | Init (Cabinet Cabinet) |
Initializes the FT245RBitbangController and starts the updater thread. More... | |
override void | Finish () |
Finishes the FT245RBitbangController object. Finish does also terminate the workerthread. More... | |
override void | Update () |
Signals the workerthread that all pending updates for the FT245RBitbangController should be sent to the hardware. More... | |
FT245RBitbangController () | |
Initializes a new instance of the FT245RBitbangController 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 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 | |
string | SerialNumber [get, set] |
Gets or sets the serial number of the FT245R chip which is to be controlled. More... | |
bool | UpdaterThreadIsActive [get] |
Indicates whether the UpdaterThread of the FT245RBitbangController 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< 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 is a generic output controller class which are based on the FT245R chip (http://www.ftdichip.com/Products/ICs/FT245R.htm). Only units using the chip in bitbang mode are supported by this output controller class. The SainSmart USB relay boards (http://www.sainsmart.com/arduino-compatibles-1/relay/usb-relay.html) are compatible with this output controller, but other hardware which is based on the same controller chip might be compatible as well. Generally controller units which is exclusively using the FT245R (no extra cpu on board) and having max. 8 output ports are likely to be compatible. Please let me know, if you have tested other hardware successfully, so I can ammend the docu.
Thanks go to DJRobX for his early implementation of a SainSmart output controller which was the starting point for the implementation of this class.
Definition at line 16 of file FT245RBitbangController.cs.
DirectOutput.Cab.Out.FTDIChip.FT245RBitbangController.FT245RBitbangController | ( | ) |
Initializes a new instance of the FT245RBitbangController class.
Definition at line 447 of file FT245RBitbangController.cs.
override void DirectOutput.Cab.Out.FTDIChip.FT245RBitbangController.Finish | ( | ) |
Finishes the FT245RBitbangController object.
Finish does also terminate the workerthread.
Implements DirectOutput.Cab.Out.IOutputController.
Definition at line 52 of file FT245RBitbangController.cs.
override void DirectOutput.Cab.Out.FTDIChip.FT245RBitbangController.Init | ( | Cabinet | Cabinet | ) |
Initializes the FT245RBitbangController and starts the updater thread.
Cabinet | The cabinet object which is using the output controller instance. |
Implements DirectOutput.Cab.Out.IOutputController.
Definition at line 36 of file FT245RBitbangController.cs.
|
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 outputs.
Output | The output which has changed. |
System.Exception | The OutputValueChanged event handler for the FT245RBitbangController with serial {0} has been called by a sender which is not a OutputNumbered. or FT245RBitbangController output numbers must be in the range of 1-8. The supplied output number {0} for FT245RBitbangController with serial number {1} is out of range. |
Implements DirectOutput.Cab.Out.OutputControllerBase.
Definition at line 96 of file FT245RBitbangController.cs.
override void DirectOutput.Cab.Out.FTDIChip.FT245RBitbangController.Update | ( | ) |
Signals the workerthread that all pending updates for the FT245RBitbangController should be sent to the hardware.
Implements DirectOutput.Cab.Out.IOutputController.
Definition at line 61 of file FT245RBitbangController.cs.
|
getset |
Gets or sets the serial number of the FT245R chip which is to be controlled.
The serial number of the FT245R chip which is to be controlled.
Definition at line 27 of file FT245RBitbangController.cs.
|
get |
Indicates whether the UpdaterThread of the FT245RBitbangController instance is active or not.
Definition at line 181 of file FT245RBitbangController.cs.