32#include <OnixS/CME/MDH/Auxiliary/DeprecatedHeaderWarnings.Disable.h>
35#include <OnixS/CME/MDH/Auxiliary/DeprecatedHeaderWarnings.Restore.h>
81#if !defined(ONIXS_CMEMDH_NO_DEPRECATED)
88inline void gatherPcapFiles(
FileList& files,
const std::string& location,
const std::string& ext)
137 : begin_(other.begin_)
145 return (begin_ >= end_);
182 begin_ = other.begin_;
214template <
class DataSource,
class DataSourceLess = std::less<DataSource> >
219 typedef std::map<DataSource, DataSource, DataSourceLess>
Aliases;
233 : delayer_(other.delayer_)
234 , settingsUse_(other.settingsUse_)
235 , aliases_(other.aliases_)
236 , timeSpan_(other.timeSpan_)
237 , speed_(other.speed_)
250 settingsUse_ = policy;
313 delayer_ = other.delayer_;
315 settingsUse_ = other.settingsUse_;
317 aliases_ = other.aliases_;
319 timeSpan_ = other.timeSpan_;
321 speed_ = other.speed_;
366 using Base::settingsUse;
398 using Base::settingsUse;
432 Handler* handlers[] = {&handler};
461 Handler* handlers[] = {&handler};
499 Handler* handlers[] = {&handler};
538 Handler* handlers[] = {&handler};
540 replayPcapFiles(snapshots, snapshotsApplyOptions, incrementals, handlers, 1, supplements);
547 Handler* handlers[] = {&handler};
572 Handler* handlers[] = {&handler};
593 : logs_(std::move(
logs))
608 logs_ = std::move(
logs);
660 return useNaturalSendDelays_;
669 useNaturalSendDelays_ = value;
678 return updateSendingTime_;
686 updateSendingTime_ = value;
697 return sourceSwitchDelay_;
707 sourceSwitchDelay_ = value;
736 return incrementalPacketsCount_;
749 incrementalPacketsCount_ = value;
757 bool useNaturalSendDelays_ =
false;
758 bool updateSendingTime_ =
false;
760 size_t incrementalPacketsCount_ = (std::numeric_limits<size_t>::max)();
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
#define ONIXS_CMEMDH_LTWT
#define ONIXS_CME_MDH_TESTING_NAMESPACE_END
#define ONIXS_CMEMDH_EXPORTED_CLASS_DECL(typeName)
#define ONIXS_CMEMDH_NAMESPACE_END
#define ONIXS_CME_MDH_TESTING_NAMESPACE_BEGIN
#define ONIXS_CMEMDH_EXPORTED
DatamineReplaySettings()
Initializes settings with the default values.
HandlerSettingsUse::Enum settingsUse() const
Settings for replaying Handler log files through multicast senders.
LogPlayerSettings & sendDelay(Messaging::TimeSpan value) noexcept
Messaging::TimeSpan sourceSwitchDelay() const noexcept
ReplayDelayer & delayPolicy() const noexcept
Indicates policy for implementing replay delay.
LogPlayerSettings & logs(FileList logs) noexcept
LogPlayerSettings & useNaturalSendDelays(bool value) noexcept
bool updateSendingTime() const noexcept
LogPlayerSettings(ChannelId channel, FileList logs) noexcept
LogPlayerSettings & incrementalPacketsCount(size_t value) noexcept
Messaging::TimeSpan sendDelay() const noexcept
LogPlayerSettings & sourceSwitchDelay(Messaging::TimeSpan value) noexcept
LogPlayerSettings & delayPolicy(ReplayDelayer &delayer) noexcept
size_t incrementalPacketsCount() const noexcept
LogPlayerSettings & updateSendingTime(bool value) noexcept
bool useNaturalSendDelays() const noexcept
LogPlayerSettings & channel(ChannelId value) noexcept
ChannelId channel() const noexcept
Returns the channel identifier used to extract feed settings from the logs.
const FileList & logs() const noexcept
Returns the ordered list of Handler log files to replay.
Time interval specified in microseconds.
Time interval specified in milliseconds.
The time point without the time-zone information.
Replay supplements for the PCAP replay functionality.
PcapReplaySettings()
Initializes settings with the default values.
HandlerSettingsUse::Enum settingsUse() const
ReplayDelayer & delayPolicy() const
Indicates policy for implementing replay delay.
ReplaySpeed::Enum speed() const
Indicates processing speed policy.
void delayPolicy(ReplayDelayer &delayer)
Sets a policy for implementing replay delay.
const ReplaySpan & timeSpan() const
Time span for which entries are to be processed.
ReplaySettings()
Initializes the settings with the default values.
HandlerSettingsUse::Enum settingsUse() const
Handler settings use policy.
void speed(ReplaySpeed::Enum policy)
Defines processing speed.
const Aliases & aliases() const
ReplaySpan & timeSpan()
Time span for which entries are to be processed.
void settingsUse(HandlerSettingsUse::Enum policy)
Defines handler settings use policy.
ReplaySettings & operator=(const ReplaySettings &other)
Re-initializes as a copy of the other one.
ReplaySettings(const ReplaySettings &other)
Initializes as a copy of the other one.
std::map< DataSource, DataSource, DataSourceLess > Aliases
The table of data source aliases.
Defines range of log entries to be replayed.
void begin(const Messaging::Timestamp &value)
Updates the beginning of the range.
const Messaging::Timestamp & begin() const
Indicates the beginning of the range.
const Messaging::Timestamp & end() const
Indicates the end of the range.
ReplaySpan & operator=(const ReplaySpan &other)
Re-initializes as a copy of the other one.
bool empty() const
Indicates whether span is empty or not.
bool contain(const Messaging::Timestamp ×tamp) const
ReplaySpan(const Messaging::Timestamp &begin, const Messaging::Timestamp &end)
void end(const Messaging::Timestamp &value)
Indicates the end of the range.
ReplaySpan(const ReplaySpan &other)
ReplaySpan()
Initializes empty span.
Test helper that sends multicast datagrams to configured CME feed targets.
void replayPcapFiles(const FileList &, Handler **, size_t, const PcapReplaySettings &)
void gatherLogFiles(FileList &, ChannelId, const std::string &)
void replayDatamineFiles(const FileList &, Handler **, size_t, const DatamineReplaySettings &)
ReplaySettings< NetFeedId > LogReplaySettings
Replay supplements for log replay functionality.
Messaging::Timestamp timestamp(const Messaging::FIX::MultiContainer &, Messaging::FIX::Tag)
Retrieves last update time field value.
Messaging::UInt32 ChannelId
Identifies CME channel.
void replayLogFiles(const FileList &logs, Handler **handlers, size_t handlerQty, const LogReplaySettings &supplements)
DatamineReplaySettings::Aliases ChannelIdAliases
void gatherFiles(FileList &, const std::string &, const std::string &)
LogReplaySettings::Aliases FeedIdAliases
std::vector< std::string > FileList
Ordered list of logs to be replayed.
PcapReplaySettings::Aliases NetAddressAliases
void mergeDatamineFiles(const FileList &inFileNames, std::string outFileName, const ReplaySpan &timeSpan=ReplaySpan())
Merges the given Datamine files into a single one. The output file is gzipped.
Controls speed of market data replay.
Enum
Controls speed of market data replay.
@ NoDelay
Replays run at maximal speed.
@ Original
Data is replayed with the original speed.
Implements the replay delay using the sleep system call.
static ReplayDelayer & service()
Returns the instance reference.