| 55 | class CameraGDaemon : public GDaemon { |
| 56 | public: |
| 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 | |
| 67 | private: |
| 68 | int cur_index_ = 0; |
nothing calls this directly
no outgoing calls
no test coverage detected