28#include <OnixS/CME/MDH/Auxiliary/DeprecatedHeaderWarnings.Disable.h>
30#include <OnixS/CME/MDH/Auxiliary/DeprecatedHeaderWarnings.Restore.h>
73 , hosts_(other.hosts_)
93 group_.controlAssignment(
"Port", port_,
port);
103 const std::string&
ip()
const
117 group_.controlAssignment(
"IP Address", ip_, address);
205 const std::string&
id()
const
215 group_.controlAssignment(
"Identifier", id_,
id);
225 group_.controlChange(
"Feed Connection Settings", &FeedConnectionSettings::assignNoControl, *
this, other);
263 toStr(str, settings);
269template <
typename Layout>
284 group_.controlAssignment(
"Layout", layout_, value);
297 return heartbeatInterval_;
305 group_.controlAssignment(
"Heartbeat Interval", heartbeatInterval_, interval);
334#if !defined(ONIXS_CMEMDH_NO_DEPRECATED)
347 A_.networkInterfaces(interfaces);
361 FeedSettingsBase& feedBNetworkInterfaces(
const std::string& interfaces)
363 B_.networkInterfaces(interfaces);
378 , heartbeatInterval_(heartbeat)
392 , layout_(other.layout_)
393 , heartbeatInterval_(other.heartbeatInterval_)
414 layout_ = other.layout_;
416 heartbeatInterval_ = other.heartbeatInterval_;
418 A_.assignNoControl(other.A_);
419 B_.assignNoControl(other.B_);
499 : Base(static_cast<const Base&>(other))
511 group().controlChange(
512 "Multicast Recovery Feed Settings", &MulticastRecoveryFeedSettings::assignNoControl, *
this, other
538 toStr(str, settings);
554 , connectionAttempts_(3)
555 , connectionTimeout_(500)
563 : Base(static_cast<const Base&>(other))
564 , connectionAttempts_(other.connectionAttempts_)
565 , connectionTimeout_(other.connectionTimeout_)
566 , sendTimeout_(other.sendTimeout_)
580 return connectionAttempts_;
590 group().controlAssignment(
"Connection Attempts", connectionAttempts_, attemptQty);
604 return connectionTimeout_;
649 group().controlChange(
"TCP Recovery Feed Settings", &TcpRecoveryFeedSettings::assignNoControl, *
this, other);
668 connectionAttempts_ = other.connectionAttempts_;
670 connectionTimeout_ = other.connectionTimeout_;
672 sendTimeout_ = other.sendTimeout_;
685 toStr(str, settings);
752 , outOfOrderPacketMaxInterval_(3)
753 , lostPacketWaitTime_(100000)
760 : Base(static_cast<const Base&>(other))
761 , outOfOrderPacketMaxInterval_(other.outOfOrderPacketMaxInterval_)
762 , lostPacketWaitTime_(other.lostPacketWaitTime_)
799 return outOfOrderPacketMaxInterval_;
808 group().controlAssignment(
"Out Of Order Packet Max Interval", outOfOrderPacketMaxInterval_, intervalLength);
836 return lostPacketWaitTime_;
845 group().controlAssignment(
"Lost Packet Wait Time", lostPacketWaitTime_, waitTime);
856 group().controlChange(
"Realtime Feed Settings", &RealtimeFeedSettings::assignNoControl, *
this, other);
873 outOfOrderPacketMaxInterval_ = other.outOfOrderPacketMaxInterval_;
875 lostPacketWaitTime_ = other.lostPacketWaitTime_;
888 toStr(str, settings);
941 , packetMaxSize_(1420)
942 , incrementalFeeds_(&group())
943 , instrumentFeeds_(&group())
944 , snapshotFeeds_(&group())
945 , mboSnapshotFeeds_(&group())
946 , historicalFeeds_(&group())
955 , packetMaxSize_(other.packetMaxSize_)
956 , incrementalFeeds_(other.incrementalFeeds_)
957 , instrumentFeeds_(other.instrumentFeeds_)
958 , snapshotFeeds_(other.snapshotFeeds_)
959 , mboSnapshotFeeds_(other.mboSnapshotFeeds_)
960 , historicalFeeds_(other.historicalFeeds_)
961 , engine_(other.engine_)
980 "Feed A Network Interfaces for All Feeds", &FeedSettings::assignFeedAInterfaces, *
this, interfaces
1001 "Feed B Network Interfaces for All Feeds", &FeedSettings::assignFeedBInterfaces, *
this, interfaces
1012 return packetMaxSize_;
1028 return incrementalFeeds_;
1034 return incrementalFeeds_;
1040 return instrumentFeeds_;
1046 return instrumentFeeds_;
1052 return snapshotFeeds_;
1058 return snapshotFeeds_;
1064 return mboSnapshotFeeds_;
1070 return mboSnapshotFeeds_;
1076 return historicalFeeds_;
1082 return historicalFeeds_;
1093 return engine_.get();
1120 group().
controlChange(
"Feed Settings", &FeedSettings::assignNoControl, *
this, other);
1138 NetFeedEngineController();
1144 NetFeedEngineController(
const NetFeedEngineController&);
1147 ~NetFeedEngineController();
1150 NetFeedEngineController&
operator=(
const NetFeedEngineController& other)
1152 NetFeedEngineController tmp(other);
1164 void swap(NetFeedEngineController& other)
1166 std::swap(engine_, other.engine_);
1167 std::swap(owned_, other.owned_);
1171 NetFeedEngine* engine_;
1175 PacketSize packetMaxSize_;
1177 RealtimeFeedSettings incrementalFeeds_;
1179 MulticastRecoveryFeedSettings instrumentFeeds_;
1180 MulticastRecoveryFeedSettings snapshotFeeds_;
1181 MulticastRecoveryFeedSettings mboSnapshotFeeds_;
1183 TcpRecoveryFeedSettings historicalFeeds_;
1185 NetFeedEngineController engine_;
1189 const SettingGroup& group()
const
1197 void assignNoControl(
const FeedSettings& other)
1199 packetMaxSize_ = other.packetMaxSize_;
1201 incrementalFeeds_.assignNoControl(other.incrementalFeeds_);
1203 instrumentFeeds_.assignNoControl(other.instrumentFeeds_);
1205 snapshotFeeds_.assignNoControl(other.snapshotFeeds_);
1207 mboSnapshotFeeds_.assignNoControl(other.mboSnapshotFeeds_);
1209 historicalFeeds_.assignNoControl(other.historicalFeeds_);
1211 engine_ = other.engine_;
1216 void assignFeedAInterfaces(
const std::string& interfaces)
1222 incrementalFeeds_.A().networkInterfaces().assignNoControl(nifs);
1224 instrumentFeeds_.A().networkInterfaces().assignNoControl(nifs);
1226 snapshotFeeds_.A().networkInterfaces().assignNoControl(nifs);
1228 mboSnapshotFeeds_.A().networkInterfaces().assignNoControl(nifs);
1230 historicalFeeds_.A().networkInterfaces().assignNoControl(nifs);
1235 void assignFeedBInterfaces(
const std::string& interfaces)
1241 incrementalFeeds_.B().networkInterfaces().assignNoControl(nifs);
1243 instrumentFeeds_.B().networkInterfaces().assignNoControl(nifs);
1245 snapshotFeeds_.B().networkInterfaces().assignNoControl(nifs);
1247 mboSnapshotFeeds_.B().networkInterfaces().assignNoControl(nifs);
1249 historicalFeeds_.B().networkInterfaces().assignNoControl(nifs);
1262 toStr(str, settings);
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
#define ONIXS_CMEMDH_LTWT
#define ONIXS_CMEMDH_LTWT_CLASS_DECL(name)
#define ONIXS_CMEMDH_EXPORTED_CLASS_DECL(typeName)
#define ONIXS_CMEMDH_NAMESPACE_END
#define ONIXS_CMEMDH_EXPORTED
The collection of parameters defining feed connection.
FeedConnectionSettings & ip(const std::string &address)
const std::string & id() const
The unique connection/feed identifier.
friend class FeedSettingsBase
FeedConnectionSettings & operator=(const FeedConnectionSettings &other)
FeedConnectionSettings(const FeedConnectionSettings &other)
HostListSetting & hosts()
~FeedConnectionSettings()
Finalizes the instance.
const std::string & ip() const
const HostListSetting & hosts() const
NifListSetting & networkInterfaces()
FeedConnectionSettings(const SettingGroup *group=nullptr)
Initializes as a blank instance.
FeedConnectionSettings & port(Messaging::UInt32 port)
FeedConnectionSettings & networkInterfaces(const std::string &interfaces)
Messaging::UInt32 port() const
Port component of the given connection settings.
const NifListSetting & networkInterfaces() const
FeedConnectionSettings & hosts(const std::string &hosts)
FeedConnectionSettings & id(const std::string &id)
Collection of parameters which are common for all types of feeds.
const FeedConnectionSettings & B() const
Connection attributes for the secondary (B) feed.
void assignNoControl(const FeedSettingsBase &other)
Layout layout() const
Defines feed layout for a feed group.
const SettingGroup & group() const
FeedSettingsBase(const SettingGroup *group, Layout layout, Messaging::UInt32 heartbeat)
Messaging::UInt32 heartbeatInterval() const
const FeedConnectionSettings & A() const
Connection attributes for the primary (A) feed.
friend class FeedSettings
FeedSettingsBase & heartbeatInterval(Messaging::UInt32 interval)
FeedConnectionSettings & B()
Connection attributes for the secondary (B) feed.
FeedSettingsBase & layout(Layout value)
FeedConnectionSettings & A()
Connection attributes for the primary (A) feed.
FeedSettingsBase(const FeedSettingsBase &other)
FeedSettings(SettingChangeController *controller=nullptr)
Initializes the instance with the default values.
RealtimeFeedSettings & incrementalFeeds()
The settings related to incremental feeds.
NetFeedEngine * engine() const
Returns the Feed Engine used by the handler.
FeedSettings(const FeedSettings &other)
friend class PcapReplayHelper
FeedSettings & feedANetworkInterfaces(const std::string &interfaces)
const MulticastRecoveryFeedSettings & instrumentFeeds() const
The settings related to instrument feeds.
FeedSettings & packetMaxSize(PacketSize value)
FeedSettings & engine(NetFeedEngine *engine)
Replaces the default Feed Engine with an explicit instance.
TcpRecoveryFeedSettings & historicalFeeds()
The settings related to historical (TCP Recovery) feeds.
PacketSize packetMaxSize() const
FeedSettings & feedBNetworkInterfaces(const std::string &interfaces)
const MulticastRecoveryFeedSettings & snapshotFeeds() const
The settings related to snapshot feeds.
const RealtimeFeedSettings & incrementalFeeds() const
The settings related to incremental feeds.
MulticastRecoveryFeedSettings & instrumentFeeds()
The settings related to instrument feeds.
FeedSettings & operator=(const FeedSettings &other)
friend class HandlerSettings
const MulticastRecoveryFeedSettings & mboSnapshotFeeds() const
The settings related to snapshot feeds.
MulticastRecoveryFeedSettings & snapshotFeeds()
The settings related to snapshot feeds.
MulticastRecoveryFeedSettings & mboSnapshotFeeds()
The settings related to snapshot feeds.
const TcpRecoveryFeedSettings & historicalFeeds() const
The settings related to historical (TCP recovery) feeds.
Stores a controller-aware list of setting values.
ListSetting & assignNoControl(const ListSetting &other)
Replaces the items without consulting the change controller.
Collection of parameters affecting recovery feeds behavior.
MulticastRecoveryFeedSettings(const SettingGroup *group=nullptr)
~MulticastRecoveryFeedSettings()
Finalizes the instance.
friend class FeedSettings
MulticastRecoveryFeedSettings & operator=(const MulticastRecoveryFeedSettings &other)
MulticastRecoveryFeedSettings(const MulticastRecoveryFeedSettings &other)
Initializes the instance as a copy of the other one.
Collection of parameters affecting real-time feeds behavior.
RealtimeFeedSettings(const RealtimeFeedSettings &other)
RealtimeFeedSettings & outOfOrderPacketMaxInterval(Messaging::UInt32 intervalLength)
~RealtimeFeedSettings()
Finalizes the instance.
RealtimeFeedSettings & lostPacketWaitTime(Messaging::UInt32 waitTime)
RealtimeFeedSettings & operator=(const RealtimeFeedSettings &other)
friend class FeedSettings
Messaging::UInt32 outOfOrderPacketMaxInterval() const
RealtimeFeedSettings(const SettingGroup *group=nullptr)
Messaging::UInt32 lostPacketWaitTime() const
Associates setting mutations with a change controller.
SettingGroup(SettingChangeController *controller=nullptr)
Creates a setting group that uses the specified controller.
void controlChange(const Messaging::Char *description, void(Changeable::*change)(), Changeable &changeable) const
Invokes a zero-argument member function as a guarded change.
void controlAssignment(const Messaging::Char *description, Assignee &assignee, Value value) const
Assigns a value while coordinating the change with the controller.
Collection of parameters affecting recovery feeds behavior.
TcpRecoveryFeedSettings & operator=(const TcpRecoveryFeedSettings &other)
TcpRecoveryFeedSettings & sendTimeout(Messaging::UInt32 sendTimeout)
~TcpRecoveryFeedSettings()
Finalizes the instance.
Messaging::UInt32 connectionTimeout() const
TcpRecoveryFeedSettings & connectionTimeout(Messaging::UInt32 connectionTimeout)
Messaging::UInt32 connectionAttempts() const
TcpRecoveryFeedSettings & connectionAttempts(Messaging::UInt32 attemptQty)
TcpRecoveryFeedSettings(const SettingGroup *group=nullptr)
friend class FeedSettings
TcpRecoveryFeedSettings(const TcpRecoveryFeedSettings &other)
Messaging::UInt32 sendTimeout() const
bool fromStr(Int8 &, const Char *, size_t)
std::uint32_t UInt32
uInt32.
Messaging::UInt16 PacketSize
Represents a packet size in bytes.
ListSetting< std::string > HostListSetting
List of hosts as a setting.
void connectivityFromConfiguration(FeedSettings &settings, const std::string &configurationFile, ChannelId channel, DataCenter::Enum dataCenter=DataCenter::Primary)
Loads a channel's connection settings from a connectivity configuration file.
void connectivityFromConfigurationString(FeedSettings &settings, const std::string &configuration, ChannelId channel, DataCenter::Enum dataCenter=DataCenter::Primary)
Loads a channel's connection settings from connectivity configuration XML.
void fromStr(NifList &, const std::string &, const std::string &=std::string("; ,"))
Messaging::UInt32 ChannelId
Identifies a CME MDP 3.0 market data channel.
HostListSetting NifListSetting
List of network interfaces as a setting.
void toStr(std::string &str, BookState::Enum bookState)
Appends a string representation of a book state.
@ DisasterRecovery
Indicates data center used in case of disaster.
Messaging::UInt32 Base
Integral type used as basement for constants.
@ FeedBOnly
Indicates only feed B is used as source for market data.
@ FeedBWithFailoverToFeedA
@ BothFeedsWithArbitrage
Handler arbitrates between both feeds A and B.
@ FeedAWithFailoverToFeedB
@ FeedAOnly
Indicates only feed A is used as source for market data.
Messaging::UInt32 Base
Integral type used as basement for constants.
@ FeedBOnly
Indicates only feed B is used as source for market data.
@ FeedBWithFailoverToFeedA
@ FeedAWithFailoverToFeedB
@ FeedAOnly
Indicates only feed A is used as source for market data.
Messaging::UInt32 Base
Integral type used as basement for constants.
Coordinates changes to settings that belong to a setting group.