OnixS C++ FIX Engine 4.13.0
API Documentation
Loading...
Searching...
No Matches
Configuring the Engine

Inner Contents

 Complete Reference of Configuration Settings
 Specifying Multiple Listen Ports
 Example of Configuration File

Detailed Description

There are a number of parameters (settings) which control the behavior of the Engine.

The default settings of the Engine can be changed, using the OnixS::FIX::EngineSettings class, an external XML-based configuration file or the XML-based configuration string.

To specify configuration which Engine must read, use OnixS::FIX::Engine::init(const OnixS::FIX::EngineSettings& settings), OnixS::FIX::Engine::init(const std::string& configFile) or OnixS::FIX::Engine::initFromString(const std::string& configuration) methods of the OnixS::FIX::Engine class.

Example

Configure the FIX Engine by the OnixS::FIX::EngineSettings class:

using namespace OnixS::FIX;
// Create an instance of the EngineSettings class.
EngineSettings engineSettings;
// Set necessary settings.
engineSettings.dictionaryFile("CmeFastFixDictionary.xml")
.licenseFile("licenseFile");
// Invoke the Engine::init with the given EngineSettings class instance.
Engine::init(engineSettings);

Configure the FIX Engine by the external XML-based configuration file:

using namespace OnixS::FIX;
// Invoke the Engine::init with the name of an external XML-based configuration file.
Engine::init("FIX.Engine.config");

Configure the FIX Engine by the XML-based configuration string:

using namespace OnixS::FIX;
// Create an XML-based configuration string.
const char * builtinConfig =
"<configuration>"
"<FixEngine>"
"<add key=\"DictionaryFile\" value=\"CmeFastFixDictionary.xml\"/>"
"<add key=\"LicenseFile\" value=\"licenseFile\"/>"
"</FixEngine>"
"</configuration>";
// Invoke the Engine::initFromString with the given XML-based configuration string.
Engine::initFromString(builtinConfig);