OnixS C++ Eurex T7 Market and Reference Data Interface (EMDI, RDI, EOBI) Handlers  7.4.2
API documentation
FeedEngineSettings.cpp
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 #include <sstream>
21 
23 
24 
25 namespace OnixS {
26 namespace Eurex {
27 namespace MarketData {
28 
29 
31 {
32  if (value == FeedEngineMode::Select)
33  return "Select";
34  if (value == FeedEngineMode::EfVi)
35  return "EfVi";
36 
37  return "Unknown";
38 }
39 
41  : threadAffinity_()
42  , threadCount_(1)
43  , dataWaitTime_(10)
44  , spinBeforeIdleTime_(1)
45  , socketBufferSize_(8 * 1024 * 1024)
46  , mode_(FeedEngineMode::Select)
47 {
48 }
49 
51 {
52 }
53 
54 std::string FeedEngineSettings::toString() const
55 {
56  std::ostringstream out;
57  out << *this;
58  return out.str();
59 }
60 
61 std::ostream & operator << (std::ostream & stream, const FeedEngineSettings & settings)
62 {
63  stream << "FeedEngineSettings ["
64  << "mode=" << FeedEngineMode::toString(settings.mode())
65  << ", dataWaitTime=" << settings.dataWaitTime()
66  << ", " << "threadAffinity=" << settings.threadAffinity().toString()
67  << ", " << "threadCount=" << settings.threadCount()
68  << ", " << "spinBeforeIdleTime=" << settings.spinBeforeIdleTime()
69  << ", " << "udpSocketBufferSize=" << settings.socketBufferSize()
70  << "]";
71 
72  return stream;
73 }
74 
75 
76 }
77 }
78 }
std::string toString() const
Returns the string representation.
Solarflare ef_vi-based engine.
Definition: FeedEngine.h:89
FeedEngineMode::Enum mode() const
Definition: FeedEngine.h:116
Definition: Defines.h:30
FeedEngineSettings()
Initializes options with default values.
static std::string toString(FeedEngineMode::Enum value)
Returns the string representation.
const ThreadAffinity & threadAffinity() const
Definition: FeedEngine.h:133
ONIXS_EUREX_EMDI_API std::ostream & operator<<(std::ostream &stream, const FeedEngineSettings &settings)
Collection of settings affecting Feed Engine behavior.
Definition: FeedEngine.h:97
std::string toString() const
Returns the string representation.
API to use by the Feed Engine.
Definition: FeedEngine.h:81