DirectOutput
DirectOutput framework R2 for virtual pinball cabinets.
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros Pages
Architecture
Warning
This page is not up to date! It was last updated in spring 2013.

Object model

GlobalArchitecture.png
Please check the docu on the classes for details on all class members and class descriptions.

The DirectOutput framework consist of 3 main areas:

  • Table where the events for changed table elements (e.g. a solenoid) from Pinmame are processed and if available the effects which are assigned to that table element are triggered. Table does also have a list of static Effects which are tiggered when the Table is initialized.
  • Cabinet which represents the physical parts of a virtual pinball cabinet. OutputControllers represent units like the LedWiz. Toys represent the gadgets which are installed in a cabinet (e.g. contactors, RGB-leds or a shaker). Toys are controlled by Effects and will, if necessary, change the value of one or severel Outputs of OutputControllers.
  • Effects are defining the actions for Toys in a Cabinet. Effects are triggered for events in Table.

Table

TableArchitecture.png
Please check the docu on the classes for details on all class members and class descriptions.

Effects

EffectsArchitecture.png
Please check the docu on the classes for details on all class members and class descriptions.

All Effects must implement the interface IEffect. EffectBase is a abstract base class for effect implementation. It is recommended to inherit from this class when implementing new effects.

More effects can be added to the framework by using scripts.

Cabinet

CabinetArchitecture.png
Please check the docu on the classes for details on all class members and class descriptions.

Toys

ToyArchitecture.png
Please check the docu on the classes for details on all class members and class descriptions.

All toys must implement the iToy interface to be usable in the framework. More toys can be added through scripting.

Outputcontroller

OutputControllerArchitecture.png
Please check the docu on the classes for details on all class members and class descriptions.

Multithreading

This framework distributes its work over several threads to ensure that there are no (or at least very little) side effects and performance problems with the application calling the framework functions.

If the framework is called with new data from the outside (e.g. through B2S.Server), all it will do is to put the received data in a queue and notifiy the main loop thread. After that the independent mainloop thread will take care of the received data and take all necessary actions.

The LedWiz object does also use a separate thread for each connected LedWiz, to overcome the response time problems of the LedWiz.

Depending on the config you are using other threads might be active as well.