Slick Sim 0.10.1
Exchange simulator that shadows real venues for risk-free strategy testing
Loading...
Searching...
No Matches
slick::sim::md_feed::PcapFeedConfig Struct Reference

What a pcap feed's config entry says, beyond its venue's multicast groups. More...

#include <md_feed/pcap_feed.hpp>

Collaboration diagram for slick::sim::md_feed::PcapFeedConfig:

Static Public Member Functions

static PcapFeedConfig from_json (const nlohmann::json &config, const std::string &feed)
 Throws std::runtime_error naming feed when a key is missing or invalid.

Public Attributes

std::string root
uint64_t begin_ns = 0
uint64_t end_ns = 0
double speed = 1.0
uint16_t control_port = 0
int control_max_connections = DEFAULT_CONTROL_MAX_CONNECTIONS

Static Public Attributes

static constexpr int DEFAULT_CONTROL_MAX_CONNECTIONS = 100

Detailed Description

What a pcap feed's config entry says, beyond its venue's multicast groups.

"pcap_root": directory of <date>/<group>:<port>/<group>:<port>.pcap.zst files (not needed when every group names its own file) "begin","end": the window, UTC ISO 8601 ("2026-11-06T14:00:00Z", fractions allowed) or integer nanoseconds since the epoch "speed": 1.0 (default) replays at the capture's own pace, N times faster, 0 as fast as the sim can publish "control_channel": { "port": N } - the TCP control channel clients use for status and to start the replay; optional "max_connections" (default 100) caps how many clients it accepts

Definition at line 33 of file pcap_feed.hpp.

Member Function Documentation

◆ from_json()

PcapFeedConfig slick::sim::md_feed::PcapFeedConfig::from_json ( const nlohmann::json & config,
const std::string & feed )
static

Throws std::runtime_error naming feed when a key is missing or invalid.

Definition at line 84 of file pcap_feed.cpp.

References begin_ns, control_max_connections, control_port, end_ns, root, and speed.

Member Data Documentation

◆ begin_ns

uint64_t slick::sim::md_feed::PcapFeedConfig::begin_ns = 0

Definition at line 35 of file pcap_feed.hpp.

Referenced by from_json().

◆ control_max_connections

int slick::sim::md_feed::PcapFeedConfig::control_max_connections = DEFAULT_CONTROL_MAX_CONNECTIONS

Definition at line 40 of file pcap_feed.hpp.

Referenced by slick::sim::md_feed::PcapFeedBase::PcapFeedBase(), and from_json().

◆ control_port

uint16_t slick::sim::md_feed::PcapFeedConfig::control_port = 0

Definition at line 38 of file pcap_feed.hpp.

Referenced by slick::sim::md_feed::PcapFeedBase::PcapFeedBase(), and from_json().

◆ DEFAULT_CONTROL_MAX_CONNECTIONS

int slick::sim::md_feed::PcapFeedConfig::DEFAULT_CONTROL_MAX_CONNECTIONS = 100
staticconstexpr

Definition at line 39 of file pcap_feed.hpp.

◆ end_ns

uint64_t slick::sim::md_feed::PcapFeedConfig::end_ns = 0

Definition at line 36 of file pcap_feed.hpp.

Referenced by from_json().

◆ root

std::string slick::sim::md_feed::PcapFeedConfig::root

Definition at line 34 of file pcap_feed.hpp.

Referenced by from_json().

◆ speed

double slick::sim::md_feed::PcapFeedConfig::speed = 1.0

Definition at line 37 of file pcap_feed.hpp.

Referenced by from_json().


The documentation for this struct was generated from the following files: