Introduction
The global configuration of the DirectOutput framework defines which files the system loads for the Cabinet and Table configuration. In addition the global conguration specifies which C#-script files containing extensions for the framework to load and compile. The global configuration information is valid for the whole framework no matter what cabinet or table config is loaded.
Depending on the interface used to communicate with the framework, different global configuration files are loaded.
For the B2S.Server Plugin the configuration file "GlobalConfig_B2SServer.xml" is loaded. The framework is searching for this file in the following locations:
- A directory named -config- withing the directory of the DirectOutput.dll.
- A shortcut named -config- to a directory.
- Table directory.
- Directory of the DirectOutput.dll.
Global configuration file sections
TableScriptFilePatterns
GlobalScriptsFilePatterns defines the search patterns for global script files. The script files are loaded and compiled before the cabinet and table configs or any other scripts are loaded. This setting supports wildcards (* represents any number of characters, ? represents one character). In addition the following placeholders are supported:
- {DllDir} represents the directory of the DirectOutput.dll.
- {GlobalConfigDir} represents the global config directory.
A GlobalScriptsFilePatterns section could contain the following content:
<GlobalScriptFilePatterns>
<FilePattern>{GlobalConfigDir}\cabinet*.cs</FilePattern>
</GlobalScriptFilePatterns>
CabinetConfigFilePatterns
CabinetConfigFilePatterns defines the patterns for the cabinet configuration file. If the patterns are matching more than one file, only the first matching file is loaded for the cabinet configuration. This setting supports wildcards (* represents any number of characters, ? represents one character). In addition the following placeholders are supported:
- {DllDir} represents the directory of the DirectOutput.dll.
- {GlobalConfigDir} represents the default global config directory.
A typical CabinetConfigFilePattern sections might looks as follows:
<CabinetConfigFilePatterns>
<FilePattern>{GlobalConfigDir}\cabinet.xml</FilePattern>
</CabinetConfigFilePatterns>
CabinetScriptsFilePattern
CabinetScriptsFilePattern defines the search patterns for cabinet script files. The script files are loaded an compiled before the cabinet config is loaded. This settings supports the same wildcards and placeholders as the CabinetConfigFilePatterns setting.
A CabinetScriptsFilePattern section could contain the following content:
<CabinetScriptFilePatterns>
<FilePattern>{GlobalConfigDir}\cabinet*.cs</FilePattern>
</CabinetScriptFilePatterns>
TableConfigFilePatterns
TableConfigFilePatterns define the search patterns which are used to lookup the table configuration file. If more than one file matches the search patterns, only the first matching file is loaded for the table configuration. This setting supports wildcards (* represents any number of characters, ? represents one character). In addition the following placeholders are supported:
- {TableDir} represents the full path to the directory of the table.
- {TableDirName} represents the name of the table directory (last part of {TableDir}).
- {TableName} represents the name of the table without extensions.
- {DllDir} represents the directory of the DirectOutput.dll.
- {GlobalConfigDir} represents the default global config directory.
A typical TableConfigFilePattern section looks as follows:
<TableScriptFilePatterns>
<FilePattern>{GlobalConfigDir}\\{TableName}.xml</FilePattern>
</TableScripsFilePatterns>
TableScriptFilePatterns
TableScriptsFilePatterns define the search patterns for table specific script files. The script files are loaded and compiled before the table config is loaded. This settings supports the same wildcards and placeholders as the TableConfigFilePatterns setting.
A typical TableScriptsFilePattern section might looks as follows:
<TableScriptFilePatterns>
<FilePattern>{GlobalConfigDir}\\{TableName}*.cs</FilePattern>
</TableScriptFilePatterns>
LedControl options
LedControlIniFiles
LedControlIniFiles holds the paths to LedControl.ini files as well as the LedWiz number assiociated with the ledcontrol.ini files. LedControl.ini files can be used as a fallback solution if no cabinet and/or cabinet config is loaded. The LedControlIniFiles section can contain up to 16 LedControlIniFile sections.
A LedControlIniFile section defines a single LedControl.ini file and the associated LedWiz number.
- FileName contains the full filename of the LedControl.ini file.
- LedWizNumber contains the LedWiz number associated with the file defined in FileName.
Please read the chapter ledcontrolfiles for more information on this topic.
A typical LedControlIniFiles section looks as follows:
<LedControlIniFiles>
<LedControlIniFile>
<Filename>c:\Ledcontrol\LedControl.ini</Filename>
<LedWizNumber>1</LedWizNumber>
</LedControlIniFile>
</LedControlIniFiles>
LedControl settings
In addition to the LedControl.ini files you can specify a few more options for LedControl use:
- LedControlMinimumEffectDurationMs specifies the minimum duration for LedControl effects which control only one output (e.g. contactors, start button light).
- LedControlMinimumRGBEffectDurationMs specifies the minimum duration for LedControl effects control RGBleds.
Both settings have no effect if the effect setting in the LedControl file specifies a duration.
Under normal circumstances these settings look like this:
<LedControlMinimumEffectDurationMs>60</LedControlMinimumEffectDurationMs>
<LedControlMinimumRGBEffectDurationMs>120</LedControlMinimumRGBEffectDurationMs>
Logging
EnableLogging does whats its name says. It enables log output to the file specified in the LogFilePattern.
The LogFilePattern can defines a filename for the log file and can include the following placeholders:
- {DllDir} represents the directory of the DirectOutput.dll.
- {GlobalConfigDir} represents the default global config directory.
- {TableDir} represents the full path to the directory of the table.
- {TableDirName} represents the name of the table directory (last part of {TableDir}).
- {TableName} represents the name of the table without extensions.
- {RomName} is the name of the game rom.
- {DateTime} is a timestamp containing the current date and type in the following form: yyyymmdd_hhmmss.
- {Date} is the current date in the following form: yyyymmdd.
- {Time} is the current time in the following form: hhmmss
Typical entries for the loggin configuration might look as follows:
<EnableLogging>true</EnableLogging>
<LogFilePattern>.TableName}_{DateTime}.log</LogFilePattern>
Example
<?xml version="1.0" encoding="utf-8"?>
<GlobalConfig>
<LedControlMinimumEffectDurationMs>60</LedControlMinimumEffectDurationMs>
<LedControlMinimumRGBEffectDurationMs>120</LedControlMinimumRGBEffectDurationMs>
<LedControlIniFiles>
<LedControlIniFile>
<Filename>c:\Ledcontrol\LedControl.ini</Filename>
<LedWizNumber>1</LedWizNumber>
<LedControlIniFile>
<Filename>c:\Ledcontrol\LedControl2.ini</Filename>
<LedWizNumber>2</LedWizNumber>
</LedControlIniFile>
</LedControlIniFiles>
<CabinetConfigFilePatterns>
<FilePattern>{GlobalConfigDir}\cabinet.xml</FilePattern>
</CabinetConfigFilePatterns>
<CabinetScriptFilePatterns>
<FilePattern>{GlobalConfigDir}\cabinet*.cs</FilePattern>
</CabinetScriptFilePatterns>
<TableScriptFilePatterns>
<FilePattern>{GlobalConfigDir}\\{TableName}*.cs</FilePattern>
</TableScriptFilePatterns>
<TableConfigFilePatterns>
<FilePattern>{GlobalConfigDir}\\{TableName}.xml</FilePattern>
</TableConfigFilePatterns>
<GlobalScriptFilePatterns>
<FilePattern>{GlobalConfigDir}\cabinet*.cs</FilePattern>
</GlobalScriptFilePatterns>
<EnableLogging>false</EnableLogging>
<LogFilePattern>.\DirectOutput.log</LogFilePattern>
</GlobalConfig>