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

Method run

tutorial/MyGNode/MyPubMessageNode.h:25–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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
33private:
34 int num_ = 0;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected