OnixS C++ CME iLink 3 Binary Order Entry Handler  1.13.0
API Documentation
Predefined Schedules and Connection Settings

To simplify development, Session Scheduler provides an ability to define session schedules and connecting settings in configuration files for later referencing in the source code.

Once presets are defined in the file, the session scheduler can use them during the instance initialization stage (OnixS::CME::iLink3::Scheduling::SessionSchedulerOptions class exposes OnixS::CME::iLink3::Scheduling::SessionSchedulerOptions::configurationFile member for these purposes). Afterwards, both schedules and connection settings can be referenced in the source code using the string identifiers. Scheduler exposes the OnixS::CME::iLink3::Scheduling::SessionScheduler::add overload to schedule a session with parameters described in a configuration file.

Example

using namespace OnixS::CME::iLink3;
SessionSchedulerOptions schedulerOptions;
schedulerOptions.configurationFile("Scheduler.conf");
SessionScheduler scheduler(schedulerOptions);
scheduler.add(&session, "ScheduleId", "ConnectionId");

Moreover, OnixS::CME::iLink3::Scheduling::SessionScheduler exposes OnixS::CME::iLink3::Scheduling::SessionScheduler::findSchedule and OnixS::CME::iLink3::Scheduling::SessionScheduler::findConnectionSettings members to access real instances of schedules and connection settings described in the configuration file. These members can help when a session has to be registered with a partially predefined configuration.

Example

The following example demonstrates how a session can be registered with a predefined schedule, but custom connection settings are not described in the configuration file.

using namespace OnixS::CME::iLink3;
scheduler.add(
&testingEnvironmentSession,
*scheduler.findSchedule("CME"),
SessionConnectionSettings("testing-evironment.cme.com", 8000));

Configuration File Reference

Description of Scheduler settings has XML-based syntax. The following tags are supported:

Tag

Description

SchedulerSettings

Root element of scheduler's configuration.

Schedules

Contains descriptions of predefined schedules.

Schedule

Describes attributes of a particular session schedule.

Connections

Contains descriptions of predefined session connection settings.

Connection

Defines characteristics of a particular session connection.

Note
Up-to-date Scheduler settings configuration schema available on Corporate Website.

Defining Session Schedule

Session Schedule description consists in definition of the following attributes for the <Schedule> element:

Attribute Values

Notes

id Non-empty String

It's a unique identifier for the schedule. The value of this attribute is used later in the source code to refer to the described schedule. It must be unique among all schedules.

firstDay Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday Defines the first day of the activity week for session.
lastDay Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday Defines the last day of the activity week for session.
logonTime Time value from 0:00 till 23:59 in 24 hours format (with optional seconds resolution). Defines the time of logon for a session.
logoutTime Time value from 0:00 till 23:59 in 24 hours format (with optional seconds resolution).

Defines the time of logout for a session.

Defining Session Connection Settings

The description of connection settings consists of the definition of the following attributes for the <Connection> element:

Attribute Values

Notes

id Non-empty String

It's a unique identifier for the settings set. The value of this attribute is used later in the source code to refer to described settings. It must be unique among all settings sets.

host String If a session must be logged on in the role of initiator, this parameter defines a remote host to which the session must connect to. Otherwise, the attribute is ignored.
port Number

If a session must be logged on in the role of initiator, this parameter defines a port number to which the session must connect to. Otherwise, the attribute is ignored.

Note
It's possible to specify multiple counter parties in session connection settings description. If Scheduler fails to connect session to one counterparty, it will switch, using another one and so on, until a successful connection will be established. For this reason, the session connection settings XML description accepts inner <Counterparty> nodes with host and port attributes. Inner nodes are ignored if master <Connection>> node contains host and port attributes.

Example

Below is a typical configuration file for Sessions Scheduler.

1 <?xml version="1.0" encoding="utf-8" ?>
2 <SchedulerSettings
3  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4  xsi:schemaLocation="https://ref.onixs.biz/fix/scheduler https://ref.onixs.biz/fix/scheduler/scheduler-settings-1.6.xsd"
5  xmlns="https://ref.onixs.biz/fix/scheduler" >
6 
7  <Schedules>
8 
9  <Schedule
10  id="CME"
11  firstDay="Sunday"
12  logonTime="18:00"
13  lastDay="Friday"
14  logoutTime="16:00"
15  />
16 
17  <Schedule
18  id="SimpleDaily"
19  firstDay="Monday"
20  lastDay="Friday"
21  logonTime="08:00"
22  logoutTime="17:00"
23  />
24 
25  </Schedules>
26 
27  <Connections>
28  <Connection
29  id="LocalSession">
30  <Counterparty host="localhost" port="4500"/>
31  </Connection>
32  <Connection
33  id="SessionToTestingEnvironment">
34  <Counterparty host="testing-evn.privatedomain.com" port="8000"/>
35  </Connection>
36  <Connection
37  id="MultiTargetSession">
38  <Counterparty host="primary.domain.com" port="4600"/>
39  <Counterparty host="secondary.domain.com" port="4500"/>
40  </Connection>
41  </Connections>
42 </SchedulerSettings>