OnixS C++ FMX UST BIMP Market Data Handler 1.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
25
26#include <sstream>
27#include <string>
28#include <set>
29#include <vector>
30
31namespace OnixS
32{
33 namespace FmxUST
34 {
35 namespace MarketData
36 {
37 namespace Bimp
38 {
41 {
44 : port (0)
45 {}
46
48 ServiceDescriptor (const std::string& a, unsigned int port)
49 : address (a)
50 , port (port)
51 {}
52
54 std::string address;
55
57 unsigned port;
58
60 bool operator == (const ServiceDescriptor& other) const
61 {
62 return address == other.address && port == other.port;
63 }
64
66 bool operator != (const ServiceDescriptor& other) const
67 {
68 return !operator==(other);
69 }
70
72 bool valid() const
73 {
74 return !address.empty() && port > 0;
75 }
76 };
77
78 ONIXS_FMXUST_BIMP_API std::ostream& operator << (std::ostream& stream, const ServiceDescriptor& descriptor);
79
82 {
85
88
90 bool operator == (const FeedDescriptor& other) const
91 {
92 return serviceA == other.serviceA && serviceB == other.serviceB;
93 }
94
96 bool operator != (const FeedDescriptor& other) const
97 {
98 return !operator==(other);
99 }
100 };
101
102 ONIXS_FMXUST_BIMP_API std::ostream& operator << (std::ostream& stream, const FeedDescriptor& descriptor);
103
106 {
109
112 const std::string& addr, unsigned int port,
113 const std::string& name, const std::string& pass, const std::string& ni = "")
114 : ServiceDescriptor(addr, port)
115 , username(name)
116 , password(pass)
117 , networkInterface(ni)
118 {}
119
121 bool valid() const
122 {
123 return
125 (!username.empty()) &&
126 (!password.empty());
127 }
128
130 bool operator == (const TcpServiceDescriptor& other) const
131 {
132 return
134 (username == other.username);
135 }
136
138 bool operator != (const TcpServiceDescriptor& other) const
139 {
140 return !operator==(other);
141 }
142
144 std::string username;
145
147 std::string password;
148
156 std::string networkInterface;
157 };
158
160 ONIXS_FMXUST_BIMP_API std::ostream& operator << (std::ostream& stream, const TcpServiceDescriptor& descriptor);
161
162
172
174 ONIXS_FMXUST_BIMP_API std::ostream& operator << (std::ostream& stream, const TcpFeedDescriptor& descriptor);
175
176
178 typedef std::set<std::string> Symbols;
179
180 struct HandlerSettings;
181
182 ONIXS_FMXUST_BIMP_API std::ostream& operator << (std::ostream& stream, const HandlerSettings& settings);
183
186 {
189 : licenseString()
191 , logDirectory("logs")
192 , logFileNamePrefix("FenicsUstBimp")
193 , logSettings(LogSettings::Default)
194 , logLevel(LogLevel::Info)
198 , lostPacketWaitTime(100000)
199 , useFeedA(true)
200 , useFeedB(true)
202 , maxPacketSize(1500)
207 {}
208
210 std::string licenseString;
211
213 std::string licenseDirectory;
214
216 std::string logDirectory;
217
219 std::string logFileNamePrefix ;
220
223
228
233
241 std::string networkInterface;
242
250 std::string networkInterfaceA;
251
259 std::string networkInterfaceB;
260
269
295
320
325
330
333
336
339
342
345
354
357
359 unsigned short maxPacketSize;
360
363
366
369
372
375
377 std::string toString() const
378 {
379 std::ostringstream out;
380 out << *this;
381 return out.str();
382 }
383 };
384
385 }
386 }
387 }
388}
Represents set of CPU indices.
Definition Defines.h:111
std::set< std::string > Symbols
Alias for symbol list.
ONIXS_FMXUST_BIMP_API std::ostream & operator<<(std::ostream &stream, const ServiceDescriptor &descriptor)
bool operator==(const FeedDescriptor &other) const
Compares with another instance.
bool operator!=(const FeedDescriptor &other) const
Compares with another instance.
ThreadAffinity snapshotServiceRecvAffinity
Spin request TCP service receiving affinity.
unsigned short maxPacketSize
Max size for network packet transmitted by Eurex.
TcpFeedDescriptor snapshotService
Spin TCP service credentials.
std::string logDirectory
Log files are stored in this directory.
std::string toString() const
Returns the string representation.
LogSettings::Enum logSettings
Combine LogSettings enum values to configure the logger.
ThreadAffinity snapshotServiceSendingAffinity
Spin request TCP service sending affinity.
std::string logFileNamePrefix
Template of log file name without extension.
FeedDescriptor reRequestFeed
Gap response feed.
unsigned int replayMaxPacketsNumber
Lost packets threshold when the Handler prefers replay, should not exceed 10000.
unsigned int maxBooksObjectAmount
Defines size of pre-allocated memory for Order Book. Default value is 100.
unsigned int minReconnectingTimeout
Minimum timeout value between attempts to connect replay and recovery services (sec),...
unsigned int maxConnectingAttempts
Max number of attempts to connect replay and recovery services, default value is 3.
std::string licenseDirectory
Path to the license directory.
bool operator!=(const ServiceDescriptor &other) const
Compares with another instance.
bool valid() const
Returns true if the descriptor points to valid ip address.
ServiceDescriptor(const std::string &a, unsigned int port)
bool operator==(const ServiceDescriptor &other) const
Compares with another instance.
TcpServiceDescriptor(const std::string &addr, unsigned int port, const std::string &name, const std::string &pass, const std::string &ni="")
bool valid() const
Returns true if the descriptor is valid.
bool operator==(const TcpServiceDescriptor &other) const
Compares with another instance.
bool operator!=(const TcpServiceDescriptor &other) const
Compares with another instance.