40 auto msgCounter_shptr = std::make_shared<int>(msgCounter);
41 auto usrOutput_shptr = std::make_shared<o2f::Output>(
getOutput(usrOutput));
43 LOG(info) <<
">>>>>>>>>>>>>> Generator initialised";
47 int msgIndex = (*msgCounter_shptr)++;
51 LOG(info) <<
">>> MSG:" << msgIndex;
52 std::this_thread::sleep_for(std::chrono::milliseconds(1000));
54 LOG(info) <<
">>> Preparing MSG:" << msgIndex;
57 ctx.outputs().newChunk(*usrOutput_shptr, (msgIndex + 1) *
sizeof(uint32_t) /
sizeof(
char));
59 LOG(info) <<
">>> Preparing1 MSG:" << msgIndex;
61 auto payload =
reinterpret_cast<uint32_t*
>(outputMsg.data());
63 payload[0] = msgIndex;
65 LOG(info) <<
">>> Preparing2 MSG:" << msgIndex;
67 for (
int k = 0; k < msgIndex; ++k) {
68 payload[k + 1] = (uint32_t)32;
69 LOG(info) <<
">>>>\t" << payload[k + 1];
128 o2f::InputSpec{
"input",
"TST",
"ToBC", 0, o2f::Lifetime::Timeframe},
129 o2f::Outputs{{
"TST",
"BCAST0", 0, o2f::Lifetime::Timeframe},
130 {
"TST",
"BCAST1", 0, o2f::Lifetime::Timeframe}}));
139 lspec.emplace_back(
defineMerger(
"Merger",
o2f::Inputs{{
"input1",
"TST",
"PIP0", 0, o2f::Lifetime::Timeframe}, {
"input2",
"TST",
"PIP1", 0, o2f::Lifetime::Timeframe}},
144 return std::move(lspec);
o2f::DataProcessorSpec defineMerger(std::string devName, o2f::Inputs usrInputs, o2f::OutputSpec usrOutput, std::function< void(OutputBuffer, const o2f::DataRef)> const mergerFunc)