OnixS C++ eSpeed ITCH Market Data Handler 1.7.3
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
22#include <sstream>
23#include <string>
24#include <set>
25#include <vector>
26
30
31
33
36{
38 : port (0)
39 {}
40
41 ServiceDescriptor (const std::string& a, unsigned p)
42 : address (a), port (p)
43 {}
44
46 std::string address;
47
49 unsigned port;
50
52 bool operator == (const ServiceDescriptor& other) const
53 {
54 return address == other.address && port == other.port;
55 }
56
58 bool operator != (const ServiceDescriptor& other) const
59 {
60 return address != other.address || port != other.port;
61 }
62
64 bool valid() const
65 {
66 return !address.empty() && port > 0;
67 }
68};
69
70ONIXS_ESPEED_ITCH_API std::ostream& operator << (std::ostream& stream, const ServiceDescriptor& descriptor);
71
74{
77
80
82 bool operator == (const FeedDescriptor& other) const
83 {
84 return serviceA == other.serviceA && serviceB == other.serviceB;
85 }
86
88 bool operator != (const FeedDescriptor& other) const
89 {
90 return serviceA != other.serviceA || serviceB != other.serviceB;
91 }
92};
93
94ONIXS_ESPEED_ITCH_API std::ostream& operator << (std::ostream& stream, const FeedDescriptor& descriptor);
95
97typedef std::set<std::string> Symbols;
98
99struct HandlerSettings;
100
101ONIXS_ESPEED_ITCH_API std::ostream& operator << (std::ostream& stream, const HandlerSettings& settings);
102
105{
108 : licenseString()
110 , logDirectory("logs")
111 , logFileNamePrefix("eSpeedItch")
112 , logSettings(LogSettings::Default)
113 , logLevel(LogLevel::Info)
117 , lostPacketWaitTime(100000)
118 , useFeedA(true)
119 , useFeedB(true)
123 , maxPacketSize(1500)
127 {}
128
130 std::string licenseString;
131
133 std::string licenseDirectory;
134
136 std::string logDirectory;
137
139 std::string logFileNamePrefix ;
140
143
148
153
161 std::string networkInterface;
162
170 std::string networkInterfaceA;
171
179 std::string networkInterfaceB;
180
189
215
240
245
250
253
256
259
262
265
267 unsigned short maxPacketSize;
268
271
279
281 std::string glimpseUsername;
282
284 std::string glimpsePassword;
285
288
291
294
296 std::string toString() const
297 {
298 std::ostringstream out;
299 out << *this;
300 return out.str();
301 }
302};
303
#define ONIXS_ESPEED_ITCH_NAMESPACE_BEGIN
Definition Bootstrap.h:27
#define ONIXS_ESPEED_ITCH_NAMESPACE_END
Definition Bootstrap.h:31
ONIXS_ESPEED_ITCH_API std::ostream & operator<<(std::ostream &stream, const ServiceDescriptor &descriptor)
std::set< std::string > Symbols
Alias for symbol list.
Feed descriptor.
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.
Handler configuration settings.
FeedDescriptor retransmissionFeed
Retransmission feed.
unsigned short maxPacketSize
Max size for network packet transmitted.
std::string networkInterfaceB
std::string networkInterfaceA
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.
std::string glimpseUsername
Username assigned for GLIMPSE.
FeedDescriptor itchFeed
ITCH Live feed.
std::string networkInterface
std::string logFileNamePrefix
Template of log file name without extension.
FeedDescriptor glimpseFeed
GLIMPSE feed.
unsigned int retransmissionMaxPacketNumber
Lost packets threshold when the Handler prefers retransmission.
unsigned int maxBooksObjectAmount
Defines size of prea-llocated memory for Order Book. Default value is 1000.
unsigned int maxRetransmissionResponseTime
Maximum timeout to wait retransmission responses (sec), default value is 30 sec.
UInt32 outOfOrderPacketMaxInterval
std::string licenseString
License string.
std::string glimpsePassword
Password assigned for GLIMPSE.
HandlerSettings()
Constructor.
LogLevel::Enum logLevel
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 networkInterfaceForTcpServices
std::string licenseDirectory
Path to the license directory.
bool buildInternalOrderBooks
Build internal books.
LogFilePermission::Enum logFilePermissions
Log file read permissions.
Definition LogSettings.h:97
Log level.
Definition LogSettings.h:31
Logging options.
Definition LogSettings.h:48
Service endpoint description.
bool operator!=(const ServiceDescriptor &other) const
Compares with another instance.
ServiceDescriptor(const std::string &a, unsigned p)
bool valid() const
Returns true if the descriptor points to valid ip address.
std::string address
Ip address.
unsigned port
Port number.
bool operator==(const ServiceDescriptor &other) const
Compares with another instance.