OnixS C++ CME MDP Premium Market Data Handler 5.9.0
API Documentation
Loading...
Searching...
No Matches
SolarflareFeedEngine.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 <OnixS/CME/MDH/Watch.h>
26
28
60
65
69{
70 std::string str;
71
72 toStr(str, mode);
73
74 return str;
75}
76
81{
82public:
86 : mode_(SolarflareFeedEngineOperatingMode::Conventional)
87 , receiveRingSize_(static_cast<UInt32>(-1))
88 , cacheSize_(1024)
89 , socketBufferSize_(8 * 1024 * 1024)
90 , watch_(&UtcWatch::service())
91 {
92 }
93
96
99 {
100 return mode_;
101 }
102
108
118 {
119 return receiveRingSize_;
120 }
121
130 void receiveRingSize(UInt32 ringSize)
131 {
132 receiveRingSize_ = ringSize;
133 }
134
145 {
146 return cacheSize_;
147 }
148
152 {
153 cacheSize_ = cacheSize;
154 }
155
164 {
165 return socketBufferSize_;
166 }
167
175 void socketBufferSize(UInt32 bufferSize)
176 {
177 socketBufferSize_ = bufferSize;
178 }
179
187 {
188 return *watch_;
189 }
190
195 {
196 watch_ = &watch;
197 }
198
199private:
201
202 UInt32 receiveRingSize_;
203 UInt32 cacheSize_;
204
205 UInt32 socketBufferSize_;
206
207 WatchService* watch_;
208};
209
212void toStr(std::string&, const SolarflareFeedEngineSettings&);
213
215inline std::string toStr(const SolarflareFeedEngineSettings& settings)
216{
217 std::string str;
218
219 toStr(str, settings);
220
221 return str;
222}
223
231{
232public:
235
238
241 void info(std::string&) ONIXS_CMEMDH_OVERRIDE;
242
245
249
253
254private:
255 // The workhorse for the feed engine.
256 class Workhorse;
257
258 Workhorse* workhorse_;
259};
260
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
Definition Bootstrap.h:67
#define ONIXS_CMEMDH_LTWT
Definition Bootstrap.h:46
#define ONIXS_CMEMDH_NAMESPACE_END
Definition Bootstrap.h:68
#define ONIXS_CMEMDH_EXPORTED
Definition Compiler.h:171
#define ONIXS_CMEMDH_OVERRIDE
Definition Compiler.h:176
Designed to reflect various aspects of feed engine processing flow.
Definition FeedEngine.h:36
NetFeedEngine()
Construction through the descendants.
Definition FeedEngine.h:133
Base attributes of market data feed.
Definition Feed.h:55
Represents a collection of settings affecting the behavior of the Feed Engine while working with virt...
void receiveRingSize(UInt32 ringSize)
Number of buffers in a virtual interface receive ring.
SolarflareFeedEngineOperatingMode::Enum mode() const
The operational mode for the Feed Engine.
void socketBufferSize(UInt32 bufferSize)
Specifies socket buffer size.
UInt32 receiveRingSize() const
Number of buffers in a virtual interface receive ring.
void mode(SolarflareFeedEngineOperatingMode::Enum mode)
Defines the operational mode for the Feed Engine.
void watch(WatchService &watch)
Watch service to be used by Feed Engine.
void cacheSize(UInt32 cacheSize)
Size of pool of buffers used to receive and manipulate incoming data.
UInt32 socketBufferSize() const
Socket buffer size.
WatchService & watch() const
Watch service to be used by the Solarlfare Feed Engine.
SolarflareFeedEngineSettings()
Initializes the given instance of the network settings with the default values.
UInt32 cacheSize() const
Size of a pool of buffers used to receive and manipulate incoming data.
void info(std::string &) override
Appends information on the given implementation to the given string.
NetFeedLink & allocate(const NetFeed &) override
Allocates a link for the given feed.
NetFeedEngineProcessResult process() override
Carries out pending actions like data retrieval and event dispatching.
WatchService & watch() override
Exposes an instance of the watch service used while manipulating the feed links.
~SolarflareFeedEngine() override
Destructs the given instance.
SolarflareFeedEngine(const SolarflareFeedEngineSettings &)
Initializes the engine according to the given configuration.
void toStr(std::string &, BookState::Enum)
Serializes book state value into a string.
UInt32 UInt32
uInt32.
Definition Fields.h:202
Defines modes in with the Solarflare Feed Engine can operate.
Enum
Defines modes in with the Solarflare Feed Engine can operate.
@ Mixed
In the given mode the Solarflare Feed Engine mixes ef_vi services with the traditional network socket...
@ Conventional
The conventional mode supposes use of the ef_vi services only while working with multicast feeds.
Abstract watch service.
Definition Watch.h:30