DirectOutput
DirectOutput framework R2 for virtual pinball cabinets.
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros Pages
DirectOutput.Cab.Out.FTDIChip.FT245RBitbangController Class Reference

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...

Inheritance diagram for DirectOutput.Cab.Out.FTDIChip.FT245RBitbangController:
Collaboration diagram for DirectOutput.Cab.Out.FTDIChip.FT245RBitbangController:

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...
 

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< NameChangeEventArgsAfterNameChanged
 Event is fired after the value of the property Name has changed. More...
 
EventHandler< NameChangeEventArgsBeforeNameChange
 Event is fired before the value of the property Name is changed. More...
 
- Events inherited from DirectOutput.General.Generic.INamedItem
EventHandler< NameChangeEventArgsBeforeNameChange
 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 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.

SainSmart8PortUsbRelay.jpg
SainSmart 8port USB relay board

Thanks go to DJRobX for his early implementation of a SainSmart output controller which was the starting point for the implementation of this class.

Constructor & Destructor Documentation

DirectOutput.Cab.Out.FTDIChip.FT245RBitbangController.FT245RBitbangController ( )

Initializes a new instance of the FT245RBitbangController class.

Member Function Documentation

override void DirectOutput.Cab.Out.FTDIChip.FT245RBitbangController.Finish ( )

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

Implements DirectOutput.Cab.Out.IOutputController.

override void DirectOutput.Cab.Out.FTDIChip.FT245RBitbangController.Init ( Cabinet  Cabinet)

Initializes the FT245RBitbangController and starts the updater thread.

Parameters
CabinetThe Cabinet object which is using the IOutputController instance.

Implements DirectOutput.Cab.Out.IOutputController.

override void DirectOutput.Cab.Out.FTDIChip.FT245RBitbangController.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 outputs.

Parameters
OutputThe output which has changed.
Exceptions
System.ExceptionThe 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.

Reimplemented from DirectOutput.Cab.Out.OutputControllerBase.

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.

Property Documentation

string DirectOutput.Cab.Out.FTDIChip.FT245RBitbangController.SerialNumber
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.

bool DirectOutput.Cab.Out.FTDIChip.FT245RBitbangController.UpdaterThreadIsActive
get

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


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