66 , hosts_(other.hosts_)
84 group_.controlAssignment(
"Port", port_,
port);
94 const std::string&
ip()
const
106 group_.controlAssignment(
"IP Address", ip_, address);
190 const std::string&
id()
const
198 group_.controlAssignment(
"Identifier", id_,
id);
206 group_.controlChange(
"Feed Connection Settings", &FeedConnectionSettings::assignNoControl, *
this, other);
244 toStr(str, settings);
250template <
typename Layout>
263 group_.controlAssignment(
"Layout", layout_, value);
276 return heartbeatInterval_;
282 group_.controlAssignment(
"Heartbeat Interval", heartbeatInterval_, interval);
311#if !defined(ONIXS_CMEMDH_NO_DEPRECATED)
324 A_.networkInterfaces(interfaces);
340 B_.networkInterfaces(interfaces);
355 , heartbeatInterval_(heartbeat)
369 , layout_(other.layout_)
370 , heartbeatInterval_(other.heartbeatInterval_)
391 layout_ = other.layout_;
393 heartbeatInterval_ = other.heartbeatInterval_;
395 A_.assignNoControl(other.A_);
396 B_.assignNoControl(other.B_);
403 UInt32 heartbeatInterval_;
476 :
Base(static_cast<const
Base&>(other))
486 group().controlChange(
487 "Multicast Recovery Feed Settings", &MulticastRecoveryFeedSettings::assignNoControl, *
this, other
500 Base::assignNoControl(other);
513 toStr(str, settings);
529 , connectionAttempts_(3)
530 , connectionTimeout_(500)
538 :
Base(static_cast<const
Base&>(other))
539 , connectionAttempts_(other.connectionAttempts_)
540 , connectionTimeout_(other.connectionTimeout_)
541 , sendTimeout_(other.sendTimeout_)
555 return connectionAttempts_;
563 group().controlAssignment(
"Connection Attempts", connectionAttempts_, attemptQty);
577 return connectionTimeout_;
616 group().controlChange(
"TCP Recovery Feed Settings", &TcpRecoveryFeedSettings::assignNoControl, *
this, other);
627 UInt32 connectionAttempts_;
628 UInt32 connectionTimeout_;
633 Base::assignNoControl(other);
635 connectionAttempts_ = other.connectionAttempts_;
637 connectionTimeout_ = other.connectionTimeout_;
639 sendTimeout_ = other.sendTimeout_;
652 toStr(str, settings);
719 , outOfOrderPacketMaxInterval_(3)
720 , lostPacketWaitTime_(100000)
727 :
Base(static_cast<const
Base&>(other))
728 , outOfOrderPacketMaxInterval_(other.outOfOrderPacketMaxInterval_)
729 , lostPacketWaitTime_(other.lostPacketWaitTime_)
766 return outOfOrderPacketMaxInterval_;
773 group().controlAssignment(
"Out Of Order Packet Max Interval", outOfOrderPacketMaxInterval_, intervalLength);
801 return lostPacketWaitTime_;
808 group().controlAssignment(
"Lost Packet Wait Time", lostPacketWaitTime_, waitTime);
817 group().controlChange(
"Realtime Feed Settings", &RealtimeFeedSettings::assignNoControl, *
this, other);
827 UInt32 outOfOrderPacketMaxInterval_;
828 UInt32 lostPacketWaitTime_;
832 Base::assignNoControl(other);
834 outOfOrderPacketMaxInterval_ = other.outOfOrderPacketMaxInterval_;
836 lostPacketWaitTime_ = other.lostPacketWaitTime_;
849 toStr(str, settings);
902 , packetMaxSize_(1420)
903 , incrementalFeeds_(&group())
904 , instrumentFeeds_(&group())
905 , snapshotFeeds_(&group())
906 , mboSnapshotFeeds_(&group())
907 , historicalFeeds_(&group())
916 , packetMaxSize_(other.packetMaxSize_)
917 , incrementalFeeds_(other.incrementalFeeds_)
918 , instrumentFeeds_(other.instrumentFeeds_)
919 , snapshotFeeds_(other.snapshotFeeds_)
920 , mboSnapshotFeeds_(other.mboSnapshotFeeds_)
921 , historicalFeeds_(other.historicalFeeds_)
922 , engine_(other.engine_)
939 "Feed A Network Interfaces for All Feeds", &FeedSettings::assignFeedAInterfaces, *
this, interfaces
958 "Feed B Network Interfaces for All Feeds", &FeedSettings::assignFeedBInterfaces, *
this, interfaces
969 return packetMaxSize_;
983 return incrementalFeeds_;
989 return incrementalFeeds_;
995 return instrumentFeeds_;
1001 return instrumentFeeds_;
1007 return snapshotFeeds_;
1013 return snapshotFeeds_;
1019 return mboSnapshotFeeds_;
1025 return mboSnapshotFeeds_;
1031 return historicalFeeds_;
1037 return historicalFeeds_;
1044 return engine_.get();
1059 group().
controlChange(
"Feed Settings", &FeedSettings::assignNoControl, *
this, other);
1077 NetFeedEngineController();
1083 NetFeedEngineController(
const NetFeedEngineController&);
1086 ~NetFeedEngineController();
1089 NetFeedEngineController&
operator=(
const NetFeedEngineController& other)
1091 NetFeedEngineController tmp(other);
1103 void swap(NetFeedEngineController& other)
1105 std::swap(engine_, other.engine_);
1106 std::swap(owned_, other.owned_);
1110 NetFeedEngine* engine_;
1114 PacketSize packetMaxSize_;
1116 RealtimeFeedSettings incrementalFeeds_;
1118 MulticastRecoveryFeedSettings instrumentFeeds_;
1119 MulticastRecoveryFeedSettings snapshotFeeds_;
1120 MulticastRecoveryFeedSettings mboSnapshotFeeds_;
1122 TcpRecoveryFeedSettings historicalFeeds_;
1124 NetFeedEngineController engine_;
1128 const SettingGroup& group()
const
1136 void assignNoControl(
const FeedSettings& other)
1138 packetMaxSize_ = other.packetMaxSize_;
1140 incrementalFeeds_.assignNoControl(other.incrementalFeeds_);
1142 instrumentFeeds_.assignNoControl(other.instrumentFeeds_);
1144 snapshotFeeds_.assignNoControl(other.snapshotFeeds_);
1146 mboSnapshotFeeds_.assignNoControl(other.mboSnapshotFeeds_);
1148 historicalFeeds_.assignNoControl(other.historicalFeeds_);
1150 engine_ = other.engine_;
1155 void assignFeedAInterfaces(
const std::string& interfaces)
1161 incrementalFeeds_.A().networkInterfaces().assignNoControl(nifs);
1163 instrumentFeeds_.A().networkInterfaces().assignNoControl(nifs);
1165 snapshotFeeds_.A().networkInterfaces().assignNoControl(nifs);
1167 mboSnapshotFeeds_.A().networkInterfaces().assignNoControl(nifs);
1169 historicalFeeds_.A().networkInterfaces().assignNoControl(nifs);
1174 void assignFeedBInterfaces(
const std::string& interfaces)
1180 incrementalFeeds_.B().networkInterfaces().assignNoControl(nifs);
1182 instrumentFeeds_.B().networkInterfaces().assignNoControl(nifs);
1184 snapshotFeeds_.B().networkInterfaces().assignNoControl(nifs);
1186 mboSnapshotFeeds_.B().networkInterfaces().assignNoControl(nifs);
1188 historicalFeeds_.B().networkInterfaces().assignNoControl(nifs);
1201 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_NULLPTR
#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 & networkInterfaces(const std::string &interfaces)
const NifListSetting & networkInterfaces() const
FeedConnectionSettings & hosts(const std::string &hosts)
FeedConnectionSettings & port(UInt32 port)
Updates port number for the given connection settings.
FeedConnectionSettings & id(const std::string &id)
Updates the connection/feed identifier.
UInt32 port() const
Port component of the given connection settings.
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 & feedANetworkInterfaces(const std::string &interfaces)
FeedSettingsBase & feedBNetworkInterfaces(const std::string &interfaces)
UInt32 heartbeatInterval() const
const FeedConnectionSettings & A() const
Connection attributes for the primary (A) feed.
friend class FeedSettings
FeedSettingsBase & heartbeatInterval(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 SettingGroup *group, Layout layout, UInt32 heartbeat)
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(UInt32 intervalLength)
~RealtimeFeedSettings()
Finalizes the instance.
RealtimeFeedSettings & operator=(const RealtimeFeedSettings &other)
RealtimeFeedSettings & lostPacketWaitTime(UInt32 waitTime)
friend class FeedSettings
RealtimeFeedSettings(const SettingGroup *group=nullptr)
UInt32 lostPacketWaitTime() const
UInt32 outOfOrderPacketMaxInterval() const
Base services for settings grouped by a certain criteria.
void controlAssignment(const Char *description, Assignee &assignee, Value value) const
SettingGroup(SettingChangeController *controller=nullptr)
void controlChange(const Char *description, void(Changeable::*change)(), Changeable &changeable) const
Collection of parameters affecting recovery feeds behavior.
TcpRecoveryFeedSettings & connectionAttempts(UInt32 attemptQty)
TcpRecoveryFeedSettings & operator=(const TcpRecoveryFeedSettings &other)
UInt32 connectionAttempts() const
~TcpRecoveryFeedSettings()
Finalizes the instance.
UInt32 connectionTimeout() const
UInt32 sendTimeout() const
TcpRecoveryFeedSettings(const SettingGroup *group=nullptr)
TcpRecoveryFeedSettings & connectionTimeout(UInt32 connectionTimeout)
friend class FeedSettings
TcpRecoveryFeedSettings(const TcpRecoveryFeedSettings &other)
TcpRecoveryFeedSettings & sendTimeout(UInt32 sendTimeout)
ListSetting< std::string > HostListSetting
List of hosts as a setting.
bool fromStr(Decimal &, const Char *, size_t)
void connectivityFromConfiguration(FeedSettings &, const std::string &, ChannelId, DataCenter::Enum=DataCenter::Primary)
void toStr(std::string &, BookState::Enum)
Serializes book state value into a string.
HostListSetting NifListSetting
List of network interfaces as a setting.
UInt16 PacketSize
Integral type for measuring packets.
UInt32 ChannelId
Identifies CME channel.
@ DisasterRecovery
Indicates data center used in case of disaster.
@ 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.
@ 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.