28#include <OnixS/CME/MDH/Auxiliary/DeprecatedHeaderWarnings.Disable.h>
30#include <OnixS/CME/MDH/Auxiliary/DeprecatedHeaderWarnings.Restore.h>
71 , hosts_(other.hosts_)
89 group_.controlAssignment(
"Port", port_,
port);
99 const std::string&
ip()
const
111 group_.controlAssignment(
"IP Address", ip_, address);
195 const std::string&
id()
const
203 group_.controlAssignment(
"Identifier", id_,
id);
211 group_.controlChange(
"Feed Connection Settings", &FeedConnectionSettings::assignNoControl, *
this, other);
249 toStr(str, settings);
255template <
typename Layout>
268 group_.controlAssignment(
"Layout", layout_, value);
281 return heartbeatInterval_;
287 group_.controlAssignment(
"Heartbeat Interval", heartbeatInterval_, interval);
316#if !defined(ONIXS_CMEMDH_NO_DEPRECATED)
329 A_.networkInterfaces(interfaces);
343 FeedSettingsBase& feedBNetworkInterfaces(
const std::string& interfaces)
345 B_.networkInterfaces(interfaces);
360 , heartbeatInterval_(heartbeat)
374 , layout_(other.layout_)
375 , heartbeatInterval_(other.heartbeatInterval_)
396 layout_ = other.layout_;
398 heartbeatInterval_ = other.heartbeatInterval_;
400 A_.assignNoControl(other.A_);
401 B_.assignNoControl(other.B_);
481 : Base(static_cast<const Base&>(other))
491 group().controlChange(
492 "Multicast Recovery Feed Settings", &MulticastRecoveryFeedSettings::assignNoControl, *
this, other
518 toStr(str, settings);
534 , connectionAttempts_(3)
535 , connectionTimeout_(500)
543 : Base(static_cast<const Base&>(other))
544 , connectionAttempts_(other.connectionAttempts_)
545 , connectionTimeout_(other.connectionTimeout_)
546 , sendTimeout_(other.sendTimeout_)
560 return connectionAttempts_;
568 group().controlAssignment(
"Connection Attempts", connectionAttempts_, attemptQty);
582 return connectionTimeout_;
621 group().controlChange(
"TCP Recovery Feed Settings", &TcpRecoveryFeedSettings::assignNoControl, *
this, other);
640 connectionAttempts_ = other.connectionAttempts_;
642 connectionTimeout_ = other.connectionTimeout_;
644 sendTimeout_ = other.sendTimeout_;
657 toStr(str, settings);
724 , outOfOrderPacketMaxInterval_(3)
725 , lostPacketWaitTime_(100000)
732 : Base(static_cast<const Base&>(other))
733 , outOfOrderPacketMaxInterval_(other.outOfOrderPacketMaxInterval_)
734 , lostPacketWaitTime_(other.lostPacketWaitTime_)
771 return outOfOrderPacketMaxInterval_;
778 group().controlAssignment(
"Out Of Order Packet Max Interval", outOfOrderPacketMaxInterval_, intervalLength);
806 return lostPacketWaitTime_;
813 group().controlAssignment(
"Lost Packet Wait Time", lostPacketWaitTime_, waitTime);
822 group().controlChange(
"Realtime Feed Settings", &RealtimeFeedSettings::assignNoControl, *
this, other);
839 outOfOrderPacketMaxInterval_ = other.outOfOrderPacketMaxInterval_;
841 lostPacketWaitTime_ = other.lostPacketWaitTime_;
854 toStr(str, settings);
907 , packetMaxSize_(1420)
908 , incrementalFeeds_(&group())
909 , instrumentFeeds_(&group())
910 , snapshotFeeds_(&group())
911 , mboSnapshotFeeds_(&group())
912 , historicalFeeds_(&group())
921 , packetMaxSize_(other.packetMaxSize_)
922 , incrementalFeeds_(other.incrementalFeeds_)
923 , instrumentFeeds_(other.instrumentFeeds_)
924 , snapshotFeeds_(other.snapshotFeeds_)
925 , mboSnapshotFeeds_(other.mboSnapshotFeeds_)
926 , historicalFeeds_(other.historicalFeeds_)
927 , engine_(other.engine_)
944 "Feed A Network Interfaces for All Feeds", &FeedSettings::assignFeedAInterfaces, *
this, interfaces
963 "Feed B Network Interfaces for All Feeds", &FeedSettings::assignFeedBInterfaces, *
this, interfaces
974 return packetMaxSize_;
988 return incrementalFeeds_;
994 return incrementalFeeds_;
1000 return instrumentFeeds_;
1006 return instrumentFeeds_;
1012 return snapshotFeeds_;
1018 return snapshotFeeds_;
1024 return mboSnapshotFeeds_;
1030 return mboSnapshotFeeds_;
1036 return historicalFeeds_;
1042 return historicalFeeds_;
1049 return engine_.get();
1064 group().
controlChange(
"Feed Settings", &FeedSettings::assignNoControl, *
this, other);
1082 NetFeedEngineController();
1088 NetFeedEngineController(
const NetFeedEngineController&);
1091 ~NetFeedEngineController();
1094 NetFeedEngineController&
operator=(
const NetFeedEngineController& other)
1096 NetFeedEngineController tmp(other);
1108 void swap(NetFeedEngineController& other)
1110 std::swap(engine_, other.engine_);
1111 std::swap(owned_, other.owned_);
1115 NetFeedEngine* engine_;
1119 PacketSize packetMaxSize_;
1121 RealtimeFeedSettings incrementalFeeds_;
1123 MulticastRecoveryFeedSettings instrumentFeeds_;
1124 MulticastRecoveryFeedSettings snapshotFeeds_;
1125 MulticastRecoveryFeedSettings mboSnapshotFeeds_;
1127 TcpRecoveryFeedSettings historicalFeeds_;
1129 NetFeedEngineController engine_;
1133 const SettingGroup& group()
const
1141 void assignNoControl(
const FeedSettings& other)
1143 packetMaxSize_ = other.packetMaxSize_;
1145 incrementalFeeds_.assignNoControl(other.incrementalFeeds_);
1147 instrumentFeeds_.assignNoControl(other.instrumentFeeds_);
1149 snapshotFeeds_.assignNoControl(other.snapshotFeeds_);
1151 mboSnapshotFeeds_.assignNoControl(other.mboSnapshotFeeds_);
1153 historicalFeeds_.assignNoControl(other.historicalFeeds_);
1155 engine_ = other.engine_;
1160 void assignFeedAInterfaces(
const std::string& interfaces)
1166 incrementalFeeds_.A().networkInterfaces().assignNoControl(nifs);
1168 instrumentFeeds_.A().networkInterfaces().assignNoControl(nifs);
1170 snapshotFeeds_.A().networkInterfaces().assignNoControl(nifs);
1172 mboSnapshotFeeds_.A().networkInterfaces().assignNoControl(nifs);
1174 historicalFeeds_.A().networkInterfaces().assignNoControl(nifs);
1179 void assignFeedBInterfaces(
const std::string& interfaces)
1185 incrementalFeeds_.B().networkInterfaces().assignNoControl(nifs);
1187 instrumentFeeds_.B().networkInterfaces().assignNoControl(nifs);
1189 snapshotFeeds_.B().networkInterfaces().assignNoControl(nifs);
1191 mboSnapshotFeeds_.B().networkInterfaces().assignNoControl(nifs);
1193 historicalFeeds_.B().networkInterfaces().assignNoControl(nifs);
1206 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)
Re-initializes the instance as a copy of the other one.
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)
Updates port number for the given connection settings.
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)
Updates the connection/feed identifier.
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)
Specifies maximal time interval between two packets.
FeedConnectionSettings & B()
Connection attributes for the secondary (B) feed.
FeedSettingsBase & layout(Layout value)
Defines feed layout for recovery feed group.
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
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)
Max size for network packet transmitted by MDP.
FeedSettings & engine(NetFeedEngine *engine)
Defines instance of the Feed Engine to be used by the Handler.
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.
Represents a setting which is a list of values.
ListSetting & assignNoControl(const ListSetting &other)
Collection of parameters affecting recovery feeds behavior.
MulticastRecoveryFeedSettings(const SettingGroup *group=nullptr)
~MulticastRecoveryFeedSettings()
Finalizes the instance.
friend class FeedSettings
MulticastRecoveryFeedSettings & operator=(const MulticastRecoveryFeedSettings &other)
Re-initializes the instance as a copy of the other one.
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
Base services for settings grouped by a certain criteria.
SettingGroup(SettingChangeController *controller=nullptr)
void controlChange(const Messaging::Char *description, void(Changeable::*change)(), Changeable &changeable) const
void controlAssignment(const Messaging::Char *description, Assignee &assignee, Value value) const
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.
ListSetting< std::string > HostListSetting
List of hosts as a setting.
void connectivityFromConfiguration(FeedSettings &, const std::string &, ChannelId, DataCenter::Enum=DataCenter::Primary)
void fromStr(NifList &, const std::string &, const std::string &=std::string("; ,"))
Messaging::UInt32 ChannelId
Identifies CME channel.
void toStr(std::string &, BookState::Enum)
Serializes book state value into a string.
HostListSetting NifListSetting
List of network interfaces as a setting.
Messaging::UInt16 PacketSize
Integral type for measuring packets.
@ 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.