OnixS C++ CME MDP Streamlined Market Data Handler 1.2.0
API Documentation
Loading...
Searching...
No Matches
FeedSettings.h
Go to the documentation of this file.
1// Copyright Onix Solutions Limited [OnixS]. All rights reserved.
2//
3// This software owned by Onix Solutions Limited [OnixS] and is
4// protected by copyright law and international copyright treaties.
5//
6// Access to and use of the software is governed by the terms of the applicable
7// OnixS Software Services Agreement (the Agreement) and Customer end user license
8// agreements granting a non-assignable, non-transferable and non-exclusive license
9// to use the software for it's own data processing purposes under the terms defined
10// in the Agreement.
11//
12// Except as otherwise granted within the terms of the Agreement, copying or
13// reproduction of any part of this source code or associated reference material
14// to any other location for further reproduction or redistribution, and any
15// amendments to this copyright notice, are expressly prohibited.
16//
17// Any reproduction or redistribution for sale or hiring of the Software not in
18// accordance with the terms of the Agreement is a violation of copyright law.
19//
20
21#pragma once
22
23#include <string>
24
26
28
66
69void
71 std::string&,
73
75inline
76std::string
79{
80 std::string str;
81
82 toStr(str, layout);
83
84 return str;
85}
86
89{
91 UInt32 heartbeatInterval_;
92
93 UInt32 outOfOrderPacketMaxInterval_;
94 UInt32 lostPacketWaitTime_;
95
96public:
99 : layout_(
101 BothFeedsWithArbitrage)
102 , heartbeatInterval_(30)
103 , outOfOrderPacketMaxInterval_(3)
104 , lostPacketWaitTime_(100000)
105 {
106 }
107
112 {
113 return layout_;
114 }
115
118 {
119 layout_ = value;
120 }
121
131 {
132 return heartbeatInterval_;
133 }
134
137 {
138 heartbeatInterval_ = value;
139 }
140
166 {
167 return outOfOrderPacketMaxInterval_;
168 }
169
173 {
174 outOfOrderPacketMaxInterval_ = value;
175 }
176
201 {
202 return lostPacketWaitTime_;
203 }
204
208 {
209 lostPacketWaitTime_ = value;
210 }
211};
212
215void
217 std::string&,
218 const RealtimeFeedSettings&);
219
221inline
222std::string
224 const RealtimeFeedSettings& settings)
225{
226 std::string str;
227
228 toStr(str, settings);
229
230 return str;
231}
232
233// Parameters affecting all feeds involved into market data processing.
235{
236 std::string connectivityConfigurationFile_;
237
238 std::string feedANetworkInterfaces_;
239 std::string feedBNetworkInterfaces_;
240
241 UInt16 maxPacketSize_;
242
243 RealtimeFeedSettings incrementalFeeds_;
244
245public:
248 : maxPacketSize_(1420)
249 {
250 }
251
253 const
254 std::string&
256 {
257 return connectivityConfigurationFile_;
258 }
259
261 void
263 const std::string& configurationFile)
264 {
265 connectivityConfigurationFile_ = configurationFile;
266 }
267
277 const
278 std::string&
280 {
281 return feedANetworkInterfaces_;
282 }
283
287 void
289 const std::string& interfaces)
290 {
291 feedANetworkInterfaces_ = interfaces;
292 }
293
303 const
304 std::string&
306 {
307 return feedBNetworkInterfaces_;
308 }
309
313 void
315 const std::string& interfaces)
316 {
317 feedBNetworkInterfaces_ = interfaces;
318 }
319
324 {
325 return maxPacketSize_;
326 }
327
330 {
331 maxPacketSize_ = value;
332 }
333
336 {
337 return incrementalFeeds_;
338 }
339
342 {
343 return incrementalFeeds_;
344 }
345};
346
349void
351 std::string&,
352 const FeedSettings&);
353
355inline
356std::string
358 const FeedSettings& settings)
359{
360 std::string str;
361
362 toStr(str, settings);
363
364 return str;
365}
366
#define ONIXS_CMESTREAMLINEDMDH_NAMESPACE_BEGIN
Definition Bootstrap.h:169
#define ONIXS_CMESTREAMLINEDMDH_LTWT_STRUCT
Definition Bootstrap.h:115
#define ONIXS_CMESTREAMLINEDMDH_NAMESPACE_END
Definition Bootstrap.h:173
#define ONIXS_CMESTREAMLINEDMDH_LTWT_CLASS
Definition Bootstrap.h:111
#define ONIXS_CMESTREAMLINEDMDH_EXPORTED
Definition Compiler.h:160
void feedANetworkInterfaces(const std::string &interfaces)
Specifies one or more network interfaces to use for "A" feeds while joining the multicast group; use ...
RealtimeFeedSettings & incrementalFeeds()
Reference to parameters affecting incremental feeds.
UInt16 maxPacketSize() const
Max size for network packet transmitted by MDP.
const std::string & feedANetworkInterfaces() const
Specifies one or more network interfaces to use for "A" feeds while joining the multicast group; use ...
void connectivityConfigurationFile(const std::string &configurationFile)
Sets path to the connectivity configuration file.
const std::string & feedBNetworkInterfaces() const
Specifies one or more network interfaces to use for "B" feeds while joining the multicast group; use ...
void maxPacketSize(UInt16 value)
Max size for network packet transmitted by MDP.
const std::string & connectivityConfigurationFile() const
Path to the connectivity configuration file.
FeedSettings()
Initializes instance with default values.
const RealtimeFeedSettings & incrementalFeeds() const
Reference to parameters affecting incremental feeds.
void feedBNetworkInterfaces(const std::string &interfaces)
Specifies one or more network interfaces to use for "B" feeds while joining the multicast group; use ...
Collection of parameters affecting real-time feeds behavior.
void layout(RealtimeFeedLayout::Enum value)
Defines feed layout for real-time feed group.
RealtimeFeedLayout::Enum layout() const
Defines feed layout for real-time feed group.
RealtimeFeedSettings()
Initializes instance with default values.
void outOfOrderPacketMaxInterval(UInt32 value)
Defines value of threshold used by Handler to differ out-of-order packets from gaps.
UInt32 heartbeatInterval() const
Specifies maximal time interval between two network packets.
void lostPacketWaitTime(UInt32 value)
Indicates for how long Handler should wait for the packet before it's considered as totally lost.
void heartbeatInterval(UInt32 value)
Specifies maximal time interval between two network packets.
UInt32 lostPacketWaitTime() const
Indicates for how long Handler should wait for the packet before it's considered as totally lost.
UInt32 outOfOrderPacketMaxInterval() const
Defines value of threshold used by Handler to differ out-of-order packets from gaps.
void toStr(std::string &str, const Decimal &number)
Definition Decimal.h:502
Defines feed layout alternates available for real-time feed like incremental one.
@ FeedBOnly
Indicates only feed B is used as source for market data.
@ FeedBWithFailoverToFeedA
Feed B is used as primary source of market data.
@ BothFeedsWithArbitrage
Handler arbitrates between both feeds A and B.
@ FeedAWithFailoverToFeedB
Feed A is used as primary source of market data.
@ FeedAOnly
Indicates only feed A is used as source for market data.
UInt32 Base
Integral type used as basement for constants.