| 23 | } |
| 24 | |
| 25 | CStatus run() override { |
| 26 | std::shared_ptr<MyMessageParam> mp(new MyMessageParam()); // 创建一个消息,并且发送出去 |
| 27 | mp->num = (num_++) * 100; |
| 28 | mp->info = "this is a test info, num = " + std::to_string(mp->num); |
| 29 | CStatus status = CGRAPH_PUB_MPARAM(MyMessageParam, "pub-sub", mp, CGraph::GMessagePushStrategy::WAIT); |
| 30 | return status; |
| 31 | } |
| 32 | |
| 33 | private: |
| 34 | int num_ = 0; |
nothing calls this directly
no outgoing calls
no test coverage detected