42 auto dataspec = ctx.
options().
get<std::string>(
"dataspec");
43 auto timer = ctx.
options().
get<std::string>(
"timer");
46 std::vector<InputSpec> inputs;
47 std::vector<TimerSpec> timers;
48 if (timer.empty() ==
false) {
52 auto comma = timer.find(
',');
53 auto colon = timer.find(
':');
54 if (colon == std::string::npos) {
57 auto validity = std::stoull(timer.substr(0, colon));
58 auto period = std::stoull(timer.substr(colon + 1, comma - colon - 1));
60 if (comma == std::string::npos) {
63 timer = timer.substr(comma + 1);
65 inputs.emplace_back(
"timer",
"TST",
"TIMER", 0, Lifetime::Timer,
timerSpecs(timers));
68 std::vector<InputSpec> matchers =
select(dataspec.c_str());
69 std::vector<std::string> outputRefs;
70 std::vector<OutputSpec> outputSpecs;
71 for (
auto const& matcher : matchers) {
72 outputRefs.emplace_back(matcher.binding);
77 {.name = ctx.
options().
get<std::string>(
"name"),
79 .outputs = outputSpecs,
86 for (
auto const&
output : outputSpecs) {
88 std::this_thread::sleep_for(std::chrono::milliseconds(delay));
93 .options = {
ConfigParamSpec{
"data-size", VariantType::Int64, 1LL, {
"Size of the created messages"}}}}};
ConfigParamRegistry & options() const