MCPcopy Create free account
hub / github.com/ChunelFeng/CGraph / daemonTask

Method daemonTask

example/E01-AutoPilot.cpp:57–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55class CameraGDaemon : public GDaemon {
56public:
57 CVoid daemonTask(GDaemonParamPtr param) override {
58 std::shared_ptr<ImageMParam> image(new ImageMParam());
59 image->frame_id_ = cur_index_;
60 std::string info = "this is " + std::to_string(cur_index_) + " image";
61 memcpy(image->image_buf_, info.c_str(), info.length());
62 cur_index_++;
63
64 CGRAPH_PUB_MPARAM(ImageMParam, EXAMPLE_IMAGE_TOPIC, image, GMessagePushStrategy::WAIT);
65 }
66
67private:
68 int cur_index_ = 0;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected