MCPcopy Create free account
hub / github.com/BabitMF/bmf / process

Method process

bmf/sdk/cpp_sdk/test/test_module_functor.cpp:83–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81 void mark_done() { done_ = true; }
82
83 int process(Task &task) override {
84 if (done_) {
85 task.set_timestamp(DONE);
86 }
87
88 Packet pkt0, pkt1;
89 task.pop_packet_from_input_queue(0, pkt0);
90 task.pop_packet_from_input_queue(1, pkt1);
91
92 auto result = pkt0.get<int>() + pkt1.get<int>();
93
94 task.fill_output_packet(0, Packet(result));
95
96 return 0;
97 }
98};
99
100REGISTER_MODULE_CLASS(FunctorSource)

Callers 1

module_functor.cppFile · 0.45

Calls 4

fill_output_packetMethod · 0.80
PacketFunction · 0.50
set_timestampMethod · 0.45

Tested by

no test coverage detected