OnixS C++ Eurex T7 Market and Reference Data (EMDI, MDI, RDI, EOBI) Handlers 18.2.2
Users' manual and API documentation
Loading...
Searching...
No Matches
HandlerSettings.h
Go to the documentation of this file.
1/*
2* Copyright Onix Solutions Limited [OnixS]. All rights reserved.
3*
4* This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
5* and international copyright treaties.
6*
7* Access to and use of the software is governed by the terms of the applicable ONIXS Software
8* Services Agreement (the Agreement) and Customer end user license agreements granting
9* a non-assignable, non-transferable and non-exclusive license to use the software
10* for it's own data processing purposes under the terms defined in the Agreement.
11*
12* Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
13* of this source code or associated reference material to any other location for further reproduction
14* or redistribution, and any amendments to this copyright notice, are expressly prohibited.
15*
16* Any reproduction or redistribution for sale or hiring of the Software not in accordance with
17* the terms of the Agreement is a violation of copyright law.
18*/
19
20#pragma once
21
24
25#include <string>
26#include <set>
27#include <sstream>
28
29namespace OnixS
30{
31 namespace Eurex
32 {
33 namespace MarketData
34 {
37 {
39 : port(0)
40 {}
41
43 std::string address;
44
46 unsigned port;
47
48
50 void clear()
51 {
52 address.clear();
53 port = 0;
54 }
55
57 bool empty() const
58 {
59 return address.empty() || (port == 0);
60 }
61
63 bool operator == (const ServiceDescriptor& other) const
64 {
65 return address == other.address && port == other.port;
66 }
67
69 bool operator != (const ServiceDescriptor& other) const
70 {
71 return address != other.address || port != other.port;
72 }
73 };
74
75 ONIXS_EUREX_EMDI_API std::ostream& operator << (std::ostream& stream, const ServiceDescriptor& descriptor);
76
79 {
82
85
87 void clear()
88 {
89 serviceA.clear();
90 serviceB.clear();
91 }
92
94 bool operator == (const FeedDescriptor& other) const
95 {
96 return serviceA == other.serviceA && serviceB == other.serviceB;
97 }
98
100 bool operator != (const FeedDescriptor& other) const
101 {
102 return serviceA != other.serviceA || serviceB != other.serviceB;
103 }
104 };
105
106 ONIXS_EUREX_EMDI_API std::ostream& operator << (std::ostream& stream, const FeedDescriptor& descriptor);
107
114
115 ONIXS_EUREX_EMDI_API std::ostream& operator << (std::ostream& stream, const InterfaceDescriptor& descriptor);
116
119 {
122 : licenseString("")
123 , licenseDirectory("")
124 , logDirectory("logs")
125 , logFileNamePrefix("log")
126 , logSettings(LogSettings::Default)
127 , logLevel(LogLevel::Info)
128 , useFeedA(true)
129 , useFeedB(true)
131 , lostPacketWaitTime(500)
133 , messagePoolSize(512000)
134 {
135 }
136
138 std::string licenseString;
139
141 std::string licenseDirectory;
142
144 std::string logDirectory;
145
147 std::string logFileNamePrefix ;
148
151
156
163 std::string networkInterface;
164
171 std::string networkInterfaceA;
172
179 std::string networkInterfaceB;
180
185
190
191
199 unsigned int heartbeatInterval;
200
218 unsigned int lostPacketWaitTime;
219
245
248 unsigned int messagePoolSize;
249 };
250
251 struct RdiHandlerSettings;
252 struct EmdiHandlerSettings;
253 struct MdiHandlerSettings;
254 struct EmdsHandlerSettings;
255
256 ONIXS_EUREX_EMDI_API std::ostream& operator << (std::ostream& stream, const RdiHandlerSettings& settings);
257 ONIXS_EUREX_EMDI_API std::ostream& operator << (std::ostream& stream, const EmdiHandlerSettings& settings);
258 ONIXS_EUREX_EMDI_API std::ostream& operator << (std::ostream& stream, const MdiHandlerSettings& settings);
259 ONIXS_EUREX_EMDI_API std::ostream& operator << (std::ostream& stream, const EmdsHandlerSettings& settings);
260
261 namespace EOBI
262 {
263 struct EobiHandlerSettings;
264 ONIXS_EUREX_EMDI_API std::ostream& operator << (std::ostream& stream, const EobiHandlerSettings& settings);
265 }
266
269 {
274 {
275 logFileNamePrefix = "OnixS.EurexRdiHandlerCpp";
276 }
277
280
287
292
294 std::string toString() const
295 {
296 std::ostringstream out;
297 out << *this;
298 return out.str();
299 }
300 };
301
304 {
309 {
310 logFileNamePrefix = "OnixS.EurexEmdiHandlerCpp";
311 }
312
315
318
325
327 size_t incrementalQueueSize = 100000;
328
330 std::string toString() const
331 {
332 std::ostringstream out;
333 out << *this;
334 return out.str();
335 }
336 };
337
340 {
345 {
346 logFileNamePrefix = "OnixS.EurexMdiHandlerCpp";
347 }
348
353
356
363
365 std::string toString() const
366 {
367 std::ostringstream out;
368 out << *this;
369 return out.str();
370 }
371 };
372
375 {
378 {
379 logFileNamePrefix = "OnixS.EurexEmdsHandlerCpp";
380 }
381
384
387
390
392 std::string toString() const
393 {
394 std::ostringstream out;
395 out << *this;
396 return out.str();
397 }
398 };
399
400 namespace EOBI
401 {
404 {
411 , bookDepth(10)
412 {
413 logFileNamePrefix = "OnixS.EurexEobiHandlerCpp";
414 }
415
418
421
428
431
433 unsigned bookDepth;
434
436 std::string toString() const
437 {
438 std::ostringstream out;
439 out << *this;
440 return out.str();
441 }
442 };
443 }
444 }
445 }
446}
std::ostream & operator<<(std::ostream &stream, const EobiHandlerSettings &settings)
std::ostream & operator<<(std::ostream &os, const Message &message)
std::string toString() const
Returns the string representation.
InterfaceDescriptor interfaceDescriptor
Sets data interface technical configuration.
unsigned maxBooksObjectAmount
Defines size of preallocated memory for Order Book. Default value is 100.
unsigned bookDepth
Sets max book depth for order books. Default value is 10.
EMDI handler configuration settings.
std::string toString() const
Returns the string representation.
size_t incrementalQueueSize
Max incremental queue size.
InterfaceDescriptor interfaceDescriptor
Sets data interface technical configuration.
EMDI handler configuration settings.
std::string toString() const
Returns the string representation.
FeedDescriptor exchangeTradeFeedDescriptor
Sets On-exchange trade prices feed technical configuration.
FeedDescriptor settlementFeedDescriptor
Sets Settlement prices feed technical configuration.
FeedDescriptor openInterestFeedDescriptor
Sets Open Interest prices feed technical configuration.
bool operator==(const FeedDescriptor &other) const
Compares with another instance.
ServiceDescriptor serviceB
Service B.
bool operator!=(const FeedDescriptor &other) const
Compares with another instance.
ServiceDescriptor serviceA
Service A.
std::string logDirectory
Log files are stored in this directory.
LogSettings::Enum logSettings
Combine LogSettings enum values to configure the logger.
std::string logFileNamePrefix
Template of log file name without extension.
std::string licenseDirectory
Path to the license directory.
MDI handler configuration settings.
std::string toString() const
Returns the string representation.
bool buildInternalOrderBooks
Build internal books.
RDI handler configuration settings.
std::string toString() const
Returns the string representation.
InterfaceDescriptor interfaceDescriptor
Sets data interface technical configuration.
bool operator!=(const ServiceDescriptor &other) const
Compares with another instance.
bool empty() const
checks whether descriptor is empty
bool operator==(const ServiceDescriptor &other) const
Compares with another instance.