DirectOutput
DirectOutput framework R3 for virtual pinball cabinets.
Loading...
Searching...
No Matches
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.
override void Finish ()
 Finishes the FT245RBitbangController object.
Finish does also terminate the workerthread.
override void Update ()
 Signals the workerthread that all pending updates for the FT245RBitbangController should be sent to the hardware.
 FT245RBitbangController ()
 Initializes a new instance of the FT245RBitbangController class.
Public Member Functions inherited from DirectOutput.Cab.Out.OutputControllerBase
void Init (Cabinet Cabinet)
 Init must be overwritten and must initialize the ouput controller.
This method is called after the objects haven been instanciated.
void Finish ()
 Finish must be overwritten and must finish the ouput controller.
All necessary cleanup tasks have to be implemented here und all physical outputs have to be turned off.
void Update ()
 Update must update the physical outputs to the values defined in the Outputs list.

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.
Protected Member Functions inherited from DirectOutput.Cab.Out.OutputControllerBase
void OnOutputValueChanged (IOutput Output)
 This method is called whenever the value of a output in the Outputs property changes its value.
It doesn't do anything in this base class, but it can be overwritten (use override) in classes inherting the base class.
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.
String Description [get, set]
 Gets or sets the device description string, as reported by the device.
int Id [get, set]
 Gets or sets the Id of the FT245RBitbangController.
The Id must be unique and in the range of 0 to 9.
This Id is optional, and used by AutoConfig.
bool UpdaterThreadIsActive [get]
 Indicates whether the UpdaterThread of the FT245RBitbangController instance is active or not.
Properties inherited from DirectOutput.Cab.Out.OutputControllerBase
virtual OutputList Outputs [get, set]
 Contains the OutputList object for the outputs of the output controller.

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

Additional Inherited Members

Events inherited from DirectOutput.General.Generic.NamedItemBase
EventHandler< NameChangeEventArgsAfterNameChanged
 Event is fired after the value of the property Name has changed.
EventHandler< NameChangeEventArgsBeforeNameChanged
 Event is fired before the value of the property Name is changed.
PropertyChangedEventHandler PropertyChanged
PropertyChangingEventHandler PropertyChanging
Events inherited from DirectOutput.General.Generic.INamedItem
EventHandler< NameChangeEventArgsBeforeNameChanged
 Occurs before the name of the item changes.
EventHandler< NameChangeEventArgsAfterNameChanged
 Occurs when after the name of the item has changed.

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.

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

◆ FT245RBitbangController()

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

Initializes a new instance of the FT245RBitbangController class.

Member Function Documentation

◆ Finish()

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

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

Implements DirectOutput.Cab.Out.IOutputController.

◆ Init()

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

Implements DirectOutput.Cab.Out.IOutputController.

◆ OnOutputValueChanged()

override void DirectOutput.Cab.Out.FTDIChip.FT245RBitbangController.OnOutputValueChanged ( IOutput Output)
protected

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.

◆ Update()

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

◆ Description

String DirectOutput.Cab.Out.FTDIChip.FT245RBitbangController.Description
getset

Gets or sets the device description string, as reported by the device.

The description string.

◆ Id

int DirectOutput.Cab.Out.FTDIChip.FT245RBitbangController.Id
getset

Gets or sets the Id of the FT245RBitbangController.
The Id must be unique and in the range of 0 to 9.
This Id is optional, and used by AutoConfig.

The unique Id of the device (Range 0-9).

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

◆ SerialNumber

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.

◆ UpdaterThreadIsActive

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: