OnixS C++ B3 Binary UMDF Market Data Handler 1.10.0
Users' manual and 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#include <limits>
32
34
35class FeedEngine;
36
38struct Feed
39{
40 Feed() = default;
41
43 Feed(const std::string& addr, unsigned int port, const std::string& nif = "", FeedEngine* fe = nullptr)
44 : address(addr)
45 , port(port)
46 , networkInterface(nif)
47 , feedEngine(fe)
48 {}
49
51 std::string address;
52
54 unsigned port = 0;
55
59 std::string networkInterface;
60
64
66 bool valid() const
67 {
68 return !address.empty() && port > 0;
69 }
70};
71
72ONIXS_B3_UMDF_MD_API std::ostream& operator<<(std::ostream& stream, const Feed& descriptor);
73
76{
79
82};
83
84ONIXS_B3_UMDF_MD_API std::ostream& operator<<(std::ostream& stream, const FeedGroup& descriptor);
85
87
88ONIXS_B3_UMDF_MD_API std::ostream& operator<<(std::ostream& stream, const HandlerSettings& settings);
89
91
93struct ONIXS_B3_UMDF_MD_API HandlerSettings
94{
97
99 std::string licenseString;
100
102 std::string licenseDirectory;
103
106
114 std::string networkInterface;
115
123 std::string networkInterfaceA;
124
132 std::string networkInterfaceB;
133
140
164
187
190
193
196
198 bool buildOrderBooks = false;
199
203
205 static constexpr size_t FullOrderBookDepth = std::numeric_limits<UInt32>::max();
206
209
215
218
220 size_t incrementalQueueSize = 50000;
221
223 std::string toString() const
224 {
225 std::ostringstream out;
226 out << *this;
227 return out.str();
228 }
229
231 HandlerSettings& loadFeeds(int channelId, const std::string& channelConfigFile);
232
234 static void gatherChannelIds(std::vector<int>& channelIds, const std::string& channelConfigFile);
235};
236
#define ONIXS_B3_UMDF_MD_NAMESPACE_END
Definition ABI.h:168
#define ONIXS_B3_UMDF_MD_NAMESPACE_BEGIN
Definition ABI.h:163
#define ONIXS_B3_UMDF_MD_API_DECL(typeKind, typeName)
Definition ABI.h:31
The Feed Engine machinery.
Definition FeedEngine.h:128
A shared memory pool for building order books.
Definition OrderBook.h:90
Messaging::UInt32 UInt32
Definition Integral.h:37
ONIXS_B3_UMDF_MD_API std::ostream & operator<<(std::ostream &stream, const LoggerSettings &settings)
FeedEngine * feedEngine
Feed engine to use on feed.
bool valid() const
Returns true if the descriptor points to valid ip address.
std::string networkInterface
Specifies one or more network interfaces to use while joining the multicast group; use semi-colon del...
Feed(const std::string &addr, unsigned int port, const std::string &nif="", FeedEngine *fe=nullptr)
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 toString() const
Returns the string representation.
static void gatherChannelIds(std::vector< int > &channelIds, const std::string &channelConfigFile)
Gathers channel ids from the given channel configuration file.
std::string networkInterface
Specifies one or more network interfaces to use while joining the multicast group; use semi-colon del...
bool discardQueuedIncrementalPacketsIncludedInSnapshots
Discard queued incremental packets included in snapshots.
OrderBookPool * orderBookPool
A shared pool for building books.
bool startIncrementalFeedsAfterInstrumentRecovery
Start incremental feeds after instrument recovery.
FeedGroup snapshotFeeds
Snapshot recovery multicast feeds.
LoggerSettings loggerSettings
Logger settings.
static constexpr size_t FullOrderBookDepth
Max depth of the order book.
UInt32 outOfOrderPacketMaxInterval
Defines value of threshold used by Handler to differ out-of-order packets from gaps.
FeedGroup instrumentFeeds
Instrument definition multicast feeds.
UInt32 heartbeatInterval
Specifies maximal time interval between two network packets.
size_t incrementalQueueSize
Max incremental queue size.
FeedGroup incrementalFeeds
Incremental multicast feeds.
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.
size_t orderBookDepth
Exposed depth of the order books.
HandlerSettings & loadFeeds(int channelId, const std::string &channelConfigFile)
Loads channel feed settings from the given channel configuration file.