OnixS CBOE CMi2 Trading Handler for C++  1.1.3.0
Adjusting Handler's Settings

Handler Settings

Th OnixS::CBOE::Trading::CMi2::Handler constructor accepts an instance of the OnixS::CBOE::Trading::CMi2::HandlerSettings class which defines values for various parameters that affect Handler's behavior. The section below describes the most important parameters.

Primary Settings

Directory for Log Files

By default,the Handler logs all important aspects of its activity while processing market data. Therefore, it must know where on local file system it can store this kind of information. The OnixS::CBOE::Trading::CMi2::HandlerSettings::logDirectory parameter value must be defined to point the Handler in which directory it can place its log files.

Licensing the Handler

The Handler needs a license for successful execution. If the Handler is not able to find a valid License, it will throw an exception at the initialization stage.

The OnixS::CBOE::Trading::CMi2::HandlerSettings structure exposes the OnixS::CBOE::Trading::CMi2::HandlerSettings::licenseDirectory parameter which allows to instruct the Handler where to look for a valid license. By default, the Handler looks for a license in the current directory for the application which uses the Handler.

Note
The Handler looks for a valid license in the specified folder and selects the best one. If multiple license is available, it will select most significant one (for example, Production instead of Trial if both are available).

Example

Following example demonstrates how to setup primary settings for the Handler:

int main (int argc, char* argv[])
{
HandlerSettings settings;
// This option is used to control verbosity of logger.
// This option is used to specify extra logger settings.
// Logs will be stored in 'logs' local sub folder.
settings.logDirectory = "logs";
// This option is used to instruct the Handler where to look for a valid license.
settings.licenseDirectory = "../../license";
Handler handler (settings);
// ...
}