OnixS C++ Eurex T7 Market and Reference Data (EMDI, MDI, RDI, EOBI) Handlers 18.2.0
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
249 unsigned int messagePoolSize;
250 };
251
252 struct RdiHandlerSettings;
253 struct EmdiHandlerSettings;
254 struct MdiHandlerSettings;
255 struct EmdsHandlerSettings;
256
257 ONIXS_EUREX_EMDI_API std::ostream& operator << (std::ostream& stream, const RdiHandlerSettings& settings);
258 ONIXS_EUREX_EMDI_API std::ostream& operator << (std::ostream& stream, const EmdiHandlerSettings& settings);
259 ONIXS_EUREX_EMDI_API std::ostream& operator << (std::ostream& stream, const MdiHandlerSettings& settings);
260 ONIXS_EUREX_EMDI_API std::ostream& operator << (std::ostream& stream, const EmdsHandlerSettings& settings);
261
262 namespace EOBI
263 {
264 struct EobiHandlerSettings;
265 ONIXS_EUREX_EMDI_API std::ostream& operator << (std::ostream& stream, const EobiHandlerSettings& settings);
266 }
267
270 {
275 {
276 logFileNamePrefix = "OnixS.EurexRdiHandlerCpp";
277 }
278
281
288
293
295 std::string toString() const
296 {
297 std::ostringstream out;
298 out << *this;
299 return out.str();
300 }
301 };
302
305 {
310 {
311 logFileNamePrefix = "OnixS.EurexEmdiHandlerCpp";
312 }
313
316
319
326
328 std::string toString() const
329 {
330 std::ostringstream out;
331 out << *this;
332 return out.str();
333 }
334 };
335
338 {
343 {
344 logFileNamePrefix = "OnixS.EurexMdiHandlerCpp";
345 }
346
351
354
361
363 std::string toString() const
364 {
365 std::ostringstream out;
366 out << *this;
367 return out.str();
368 }
369 };
370
373 {
376 {
377 logFileNamePrefix = "OnixS.EurexEmdsHandlerCpp";
378 }
379
382
385
388
390 std::string toString() const
391 {
392 std::ostringstream out;
393 out << *this;
394 return out.str();
395 }
396 };
397
398 namespace EOBI
399 {
402 {
409 , bookDepth(10)
410 {
411 logFileNamePrefix = "OnixS.EurexEobiHandlerCpp";
412 }
413
416
419
426
429
431 unsigned bookDepth;
432
434 std::string toString() const
435 {
436 std::ostringstream out;
437 out << *this;
438 return out.str();
439 }
440 };
441 }
442 }
443 }
444}
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.
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.