DirectOuput Framework R2
DirectOutput framework R2 for virtual pinball cabinets
Go to:
Overview 
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros Pages
DirectOutput.GlobalConfiguration.GlobalConfig Class Reference

Global configuration for the DirectOutput framework.
More...

Public Member Functions

Dictionary< int, FileInfo > GetIniFilesDictionary (string TableFilename="")
 Gets the a dictionary containing all ini files (file) and their number (key). More...
 
FileInfo GetCabinetConfigFile ()
 FileInfo object for the file containing the configuration of the cabinet (outputs, toys and so on). More...
 
DirectoryInfo GetCabinetConfigDirectory ()
 Gets the cabinet config directory. More...
 
FileInfo GetTableConfigFile (string FullTableFilename)
 Gets a FileInfo object for the table config file.
The file is lookued up using the list of the property TableConfigFilePatterns. If more than one file matches the search patterns, only the first file is returned. More...
 
string GetLogFilename (string TableFilename="", string RomName="")
 Gets the log filename based on the LogFilePattern with replaced placeholders. More...
 
string GlobalConfigDirectoryName ()
 Path to the directory where the global config is stored (readonly). More...
 
DirectoryInfo GetGlobalConfigDirectory ()
 Gets a DirectoryInfo object for the global config directory. More...
 
FileInfo GetGlobalConfigFile ()
 Gets a FileInfo object for the global config file. More...
 
string GetGlobalConfigXml ()
 Returns a serialized XML representation of the global configuration. More...
 
void SaveGlobalConfig (string GlobalConfigFilename="")
 Saves the GlobalConfig to the file specified in GlobalConfigFilename.
Before saving the current global config file is backed up. More...
 
 GlobalConfig ()
 Initializes a new instance of the GlobalConfig class. More...
 

Static Public Member Functions

static GlobalConfig GetGlobalConfigFromConfigXmlFile (string GlobalConfigFileName)
 Instanciates a GlobalConfig object from a global configuration in a XML file.
If the global config file does not exist or can not be loaded, null will be returned. More...
 
static GlobalConfig GetGlobalConfigFromGlobalConfigXml (string ConfigXml)
 Instanciates a GlobalConfig object from a global configuration in a XML string. More...
 

Properties

int LedControlMinimumEffectDurationMs [get, set]
 Gets or sets the minimum duration in milliseconds for LedControl effects occupying one output (e.g. contactors).
This settings has no effect if a duration or blinking is defined for the LedControlEffect.
If this value is not specified in the globalconfig file, 60 miliseconds will be used by default. More...
 
int LedControlMinimumRGBEffectDurationMs [get, set]
 Gets or sets the minimum duration in milliseconds for LedControl effects controlling RGB leds.
This settings has no effect if a duration or blinking is defined for the LedControlEffect. If this value is not specified in the globalconfig file, 120 miliseconds will be used by default. More...
 
string IniFilesPath [get, set]
 Gets or sets the path to the ini files used for table configurations More...
 
FilePattern CabinetConfigFilePattern [get, set]
 Gets or sets the path and name of the cabinet config file. More...
 
FilePatternList TableConfigFilePatterns [get, set]
 Gets or sets the config file patterns used to looup the table configuration. More...
 
bool EnableLogging [get, set]
 Gets or sets a value indicating whether impotant events in the framework are logged to a file. More...
 
bool ClearLogOnSessionStart [get, set]
 Gets or sets a value indicating whether DOF clears the log file on session start. More...
 
FilePattern LogFilePattern [get, set]
 Gets or sets the log file pattern.
The log file pattern supports the following placeholders: More...
 
string GlobalConfigFilename [get, set]
 Gets or sets the global config filename. More...
 

Detailed Description

Global configuration for the DirectOutput framework.

Definition at line 17 of file GlobalConfig.cs.

Constructor & Destructor Documentation

DirectOutput.GlobalConfiguration.GlobalConfig.GlobalConfig ( )
inline

Initializes a new instance of the GlobalConfig class.

Definition at line 591 of file GlobalConfig.cs.

Member Function Documentation

DirectoryInfo DirectOutput.GlobalConfiguration.GlobalConfig.GetCabinetConfigDirectory ( )
inline

Gets the cabinet config directory.

Returns
The DirectoryInfo object for the cabinet config directory or null if no CabinetConfigFile is available.

Definition at line 234 of file GlobalConfig.cs.

FileInfo DirectOutput.GlobalConfiguration.GlobalConfig.GetCabinetConfigFile ( )
inline

FileInfo object for the file containing the configuration of the cabinet (outputs, toys and so on).

Returns
FileInfo object for the file containing the configuration of the cabinet or null if no file has been specified.

Definition at line 219 of file GlobalConfig.cs.

DirectoryInfo DirectOutput.GlobalConfiguration.GlobalConfig.GetGlobalConfigDirectory ( )
inline

Gets a DirectoryInfo object for the global config directory.

Returns
The DirectoryInfo object for the global config directory or null if no GlobalConfigFilename is defined.

Definition at line 428 of file GlobalConfig.cs.

FileInfo DirectOutput.GlobalConfiguration.GlobalConfig.GetGlobalConfigFile ( )
inline

Gets a FileInfo object for the global config file.

Returns
FileInfo object for the global config file or null if no filename has been set.

Definition at line 457 of file GlobalConfig.cs.

static GlobalConfig DirectOutput.GlobalConfiguration.GlobalConfig.GetGlobalConfigFromConfigXmlFile ( string  GlobalConfigFileName)
inlinestatic

Instanciates a GlobalConfig object from a global configuration in a XML file.
If the global config file does not exist or can not be loaded, null will be returned.

Parameters
GlobalConfigFileNameName of the global config XML file.
Returns
GlobalConfig object or null.

Definition at line 508 of file GlobalConfig.cs.

static GlobalConfig DirectOutput.GlobalConfiguration.GlobalConfig.GetGlobalConfigFromGlobalConfigXml ( string  ConfigXml)
inlinestatic

Instanciates a GlobalConfig object from a global configuration in a XML string.

Parameters
ConfigXmlXML string
Returns
GlobalConfig object for the specified ConfigXML or null if the XML data can not be deserialized.

Definition at line 546 of file GlobalConfig.cs.

string DirectOutput.GlobalConfiguration.GlobalConfig.GetGlobalConfigXml ( )
inline

Returns a serialized XML representation of the global configuration.

Returns
XMLString

Definition at line 470 of file GlobalConfig.cs.

Dictionary<int, FileInfo> DirectOutput.GlobalConfiguration.GlobalConfig.GetIniFilesDictionary ( string  TableFilename = "")
inline

Gets the a dictionary containing all ini files (file) and their number (key).

Parameters
TableFilenameThe table filename.
Returns
Dictionary of ini files. Key is the ini file number, value is the ini file.

Definition at line 79 of file GlobalConfig.cs.

string DirectOutput.GlobalConfiguration.GlobalConfig.GetLogFilename ( string  TableFilename = "",
string  RomName = "" 
)
inline

Gets the log filename based on the LogFilePattern with replaced placeholders.

Parameters
TableFilenameThe table filename.
RomNameName of the rom.
Returns

Definition at line 355 of file GlobalConfig.cs.

FileInfo DirectOutput.GlobalConfiguration.GlobalConfig.GetTableConfigFile ( string  FullTableFilename)
inline

Gets a FileInfo object for the table config file.
The file is lookued up using the list of the property TableConfigFilePatterns. If more than one file matches the search patterns, only the first file is returned.

Parameters
FullTableFilenameThe table filename (The *.vpt file for the table, not the config file).
Returns
A FileInfo object for the table config file or null if no matching file was found.

Definition at line 278 of file GlobalConfig.cs.

string DirectOutput.GlobalConfiguration.GlobalConfig.GlobalConfigDirectoryName ( )
inline

Path to the directory where the global config is stored (readonly).

Returns
string containing to the global config directory.

Definition at line 415 of file GlobalConfig.cs.

void DirectOutput.GlobalConfiguration.GlobalConfig.SaveGlobalConfig ( string  GlobalConfigFilename = "")
inline

Saves the GlobalConfig to the file specified in GlobalConfigFilename.
Before saving the current global config file is backed up.

Parameters
GlobalConfigFilename(Optional)Global config filename. If no value is supplied the value of the property GlobalConfigFilename will be used.

Definition at line 566 of file GlobalConfig.cs.

Property Documentation

FilePattern DirectOutput.GlobalConfiguration.GlobalConfig.CabinetConfigFilePattern
getset

Gets or sets the path and name of the cabinet config file.

The path and name of the cabinet config file.

Definition at line 207 of file GlobalConfig.cs.

bool DirectOutput.GlobalConfiguration.GlobalConfig.ClearLogOnSessionStart
getset

Gets or sets a value indicating whether DOF clears the log file on session start.

true if DOF should clear the log file on session start; otherwise, false.

Definition at line 315 of file GlobalConfig.cs.

bool DirectOutput.GlobalConfiguration.GlobalConfig.EnableLogging
getset

Gets or sets a value indicating whether impotant events in the framework are logged to a file.

true if logging is enabled, false if logging is disabled.

Definition at line 301 of file GlobalConfig.cs.

string DirectOutput.GlobalConfiguration.GlobalConfig.GlobalConfigFilename
getset

Gets or sets the global config filename.

The global config filename.

Definition at line 447 of file GlobalConfig.cs.

string DirectOutput.GlobalConfiguration.GlobalConfig.IniFilesPath
getset

Gets or sets the path to the ini files used for table configurations

The path to the directory containing the ini files used for table configurations.

Definition at line 68 of file GlobalConfig.cs.

int DirectOutput.GlobalConfiguration.GlobalConfig.LedControlMinimumEffectDurationMs
getset

Gets or sets the minimum duration in milliseconds for LedControl effects occupying one output (e.g. contactors).
This settings has no effect if a duration or blinking is defined for the LedControlEffect.
If this value is not specified in the globalconfig file, 60 miliseconds will be used by default.

The minimum effect duration in milliseconds.

Definition at line 36 of file GlobalConfig.cs.

int DirectOutput.GlobalConfiguration.GlobalConfig.LedControlMinimumRGBEffectDurationMs
getset

Gets or sets the minimum duration in milliseconds for LedControl effects controlling RGB leds.
This settings has no effect if a duration or blinking is defined for the LedControlEffect. If this value is not specified in the globalconfig file, 120 miliseconds will be used by default.

The minimum effect duration in milliseconds.

Definition at line 52 of file GlobalConfig.cs.

FilePattern DirectOutput.GlobalConfiguration.GlobalConfig.LogFilePattern
getset

Gets or sets the log file pattern.
The log file pattern supports the following placeholders:

  • {GlobalConfigDir}
  • {DllDir}
  • {TableDir}
  • {TableName}
  • {RomName}
  • {DateTime}
  • {Date}
  • {Time}

The log file pattern.

Definition at line 344 of file GlobalConfig.cs.

FilePatternList DirectOutput.GlobalConfiguration.GlobalConfig.TableConfigFilePatterns
getset

Gets or sets the config file patterns used to looup the table configuration.

The table config file patterns.

Definition at line 266 of file GlobalConfig.cs.


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