B2S.Server Plugin Interface
Interface library for B2S.Server plugins
Go to:
Overview 
 All Classes Namespaces Files Functions Properties Pages
B2SServerPluginInterface.IDirectPlugin Interface Reference

Interface for plugins for the B2S Server.
All plugins must implement this interface to be recognized by the B2S Server. In addition they also have to export the class implementing the interface using the following attribute [Export(typeof(B2SServerPluginInterface.IDirectPlugin))] in c# or <Export(GetType(B2SServerPluginInterface.IDirectPlugin))> for VB.net. Please refer to the documentation of the B2S.Server Sample Plugin Project (http://directoutput.github.com/B2SServerSamplePlugin/) for more information on plugins. More...

Public Member Functions

void PluginInit (string TableFilename, string RomName="")
 This method initalizes the plugin.
It is the first plugin method beeing called after the plugin has been instanciated. More...
 
void PluginFinish ()
 Finishes the plugin.
This is the last method called, before a plugin is discared. This method is also called, after a undhandled exception has occured in a plugin. More...
 
void DataReceive (char TableElementTypeChar, int Number, int Value)
 This method is called, when new data from Pinmame or the B2SSetData command for EMTables is available. More...
 

Properties

string Name [get]
 Gets the name of the plugin.
It is recommended to add the version/build number of your plugin to the name, so different version can easily be recognized be the end user. More...
 

Detailed Description

Interface for plugins for the B2S Server.
All plugins must implement this interface to be recognized by the B2S Server. In addition they also have to export the class implementing the interface using the following attribute [Export(typeof(B2SServerPluginInterface.IDirectPlugin))] in c# or <Export(GetType(B2SServerPluginInterface.IDirectPlugin))> for VB.net. Please refer to the documentation of the B2S.Server Sample Plugin Project (http://directoutput.github.com/B2SServerSamplePlugin/) for more information on plugins.

Remarks
Be sure to handle all exceptions of your plugin, since the B2S Server will deactivate plugins throwing unhandled exceptions.

Definition at line 11 of file IDirectPlugin.cs.

Member Function Documentation

void B2SServerPluginInterface.IDirectPlugin.DataReceive ( char  TableElementTypeChar,
int  Number,
int  Value 
)

This method is called, when new data from Pinmame or the B2SSetData command for EMTables is available.

Remarks
Make implementations of this method as fast as possible! Delays in this method will slow down the whole virtual pinball system. The best solution is to put the data in a queue and process it in a independent thread.
Parameters
TableElementTypeCharChar representing the table element type (S=Solenoid, W=Switch, L=Lamp, M=Mech, G=GI, E=EMTable, D=Led, ?=Unknown table element type).
NumberThe number of the table element.
ValueThe value of the table element.
void B2SServerPluginInterface.IDirectPlugin.PluginFinish ( )

Finishes the plugin.
This is the last method called, before a plugin is discared. This method is also called, after a undhandled exception has occured in a plugin.

void B2SServerPluginInterface.IDirectPlugin.PluginInit ( string  TableFilename,
string  RomName = "" 
)

This method initalizes the plugin.
It is the first plugin method beeing called after the plugin has been instanciated.

Parameters
TableFilenameThe filename of the table.
RomNameName of the rom (optional).

Property Documentation

string B2SServerPluginInterface.IDirectPlugin.Name
get

Gets the name of the plugin.
It is recommended to add the version/build number of your plugin to the name, so different version can easily be recognized be the end user.

The name of the plugin.

Definition at line 34 of file IDirectPlugin.cs.


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