OnixS C++ Euronext Optiq MDG Handler 1.5.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
26
27#include <sstream>
28#include <string>
29#include <set>
30#include <vector>
31
32namespace OnixS
33{
34 namespace Euronext
35 {
36 namespace MarketData
37 {
38 namespace OptiqMdg
39 {
42 {
45 : port (0)
46 {}
47
49 ServiceDescriptor (const std::string& a, unsigned int port)
50 : address (a)
51 , port (port)
52 {}
53
55 std::string address;
56
58 unsigned port;
59
61 bool operator == (const ServiceDescriptor& other) const
62 {
63 return address == other.address && port == other.port;
64 }
65
67 bool operator != (const ServiceDescriptor& other) const
68 {
69 return !operator==(other);
70 }
71
73 bool valid() const
74 {
75 return !address.empty() && port > 0;
76 }
77 };
78
79 ONIXS_EURONEXT_OPTIQMDG_API std::ostream& operator << (std::ostream& stream, const ServiceDescriptor& descriptor);
80
83 {
86
89
91 bool operator == (const FeedDescriptor& other) const
92 {
93 return serviceA == other.serviceA && serviceB == other.serviceB;
94 }
95
97 bool operator != (const FeedDescriptor& other) const
98 {
99 return !operator==(other);
100 }
101 };
102
103 ONIXS_EURONEXT_OPTIQMDG_API std::ostream& operator << (std::ostream& stream, const FeedDescriptor& descriptor);
104
106 typedef std::set<std::string> Symbols;
107
108 struct HandlerSettings;
109
110 ONIXS_EURONEXT_OPTIQMDG_API std::ostream& operator << (std::ostream& stream, const HandlerSettings& settings);
111
114 {
117 : licenseString("")
118 , licenseDirectory("")
119 , logDirectory("logs")
120 , logFileNamePrefix("EuronextOptiqMdg")
121 , logSettings(LogSettings::Default)
122 , logLevel(LogLevel::Info)
126 , lostPacketWaitTime(100000)
127 , useFeedA(true)
128 , useFeedB(true)
129 , maxCompatibleSbeVersion(Messaging::SchemaTraits::Version)
130 {}
131
133 std::string licenseString;
134
136 std::string licenseDirectory;
137
139 std::string logDirectory;
140
142 std::string logFileNamePrefix ;
143
146
151
156
164 std::string networkInterface;
165
173 std::string networkInterfaceA;
174
182 std::string networkInterfaceB;
183
192
218
243
248
253
256
259
261 size_t incrementalQueueSize = 100000;
262
283
285 std::string toString() const
286 {
287 std::ostringstream out;
288 out << *this;
289 return out.str();
290 }
291 };
292 }
293 }
294 }
295}
ONIXS_EURONEXT_OPTIQMDG_API std::ostream & operator<<(std::ostream &stream, const ServiceDescriptor &descriptor)
std::set< std::string > Symbols
Alias for symbol list.
bool operator==(const FeedDescriptor &other) const
Compares with another instance.
bool operator!=(const FeedDescriptor &other) const
Compares with another instance.
std::string networkInterfaceB
Specifies one or more network interfaces to use while joining the multicast group B; use semi-colon d...
std::string networkInterfaceA
Specifies one or more network interfaces to use while joining the multicast group A; use semi-colon d...
UInt32 maxCompatibleSbeVersion
Highest SBE message schema version the Handler tolerates as forward-compatible.
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 networkInterface
Specifies one or more network interfaces to use while joining the multicast group; use semi-colon del...
std::string logFileNamePrefix
Template of log file name without extension.
UInt32 outOfOrderPacketMaxInterval
Defines value of threshold used by Handler to differ out-of-order packets from gaps.
UInt32 heartbeatInterval
Specifies maximal time interval between two network packets.
size_t incrementalQueueSize
Max incremental queue size.
std::string licenseDirectory
Path to the license directory.
UInt32 lostPacketWaitTime
Indicates for how long Handler should wait for the packet before it's considered as totally lost.
LogFilePermission::Enum logFilePermissions
Log file permissions.
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.