OnixS C++ Euronext Optiq MDG Handler 1.3.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
25
26#include <sstream>
27#include <string>
28#include <set>
29#include <vector>
30
31namespace OnixS
32{
33 namespace Euronext
34 {
35 namespace MarketData
36 {
37 namespace OptiqMdg
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_EURONEXT_OPTIQMDG_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_EURONEXT_OPTIQMDG_API std::ostream& operator << (std::ostream& stream, const FeedDescriptor& descriptor);
103
105 typedef std::set<std::string> Symbols;
106
107 struct HandlerSettings;
108
109 ONIXS_EURONEXT_OPTIQMDG_API std::ostream& operator << (std::ostream& stream, const HandlerSettings& settings);
110
113 {
116 : licenseString("")
117 , licenseDirectory("")
118 , logDirectory("logs")
119 , logFileNamePrefix("EuronextOptiqMdg")
120 , logSettings(LogSettings::Default)
121 , logLevel(LogLevel::Info)
125 , lostPacketWaitTime(100000)
126 , useFeedA(true)
127 , useFeedB(true)
128 , maxPacketSize(1400)
129 {}
130
132 std::string licenseString;
133
135 std::string licenseDirectory;
136
138 std::string logDirectory;
139
141 std::string logFileNamePrefix ;
142
145
150
155
163 std::string networkInterface;
164
172 std::string networkInterfaceA;
173
181 std::string networkInterfaceB;
182
191
217
242
247
252
255
258
262 unsigned short maxPacketSize;
263
265 std::string toString() const
266 {
267 std::ostringstream out;
268 out << *this;
269 return out.str();
270 }
271 };
272 }
273 }
274 }
275}
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.
unsigned short maxPacketSize
Max size for network packet transmitted by Euronext Optiq MDG.
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...
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.
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.