26 {
27
29
31
32 auto talker = talker_node->CreateWriter<
Driver>(
"/apollo/prediction");
34
35 std::string content("apollo_prediction");
37 static uint64_t
seq = 0;
38 auto msg = std::make_shared<Driver>();
39 msg->set_timestamp(
Time::Now().ToNanosecond());
40 msg->set_msg_id(seq++);
41 msg->set_content(content + std::to_string(seq - 1));
42 talker->Write(msg);
43 AINFO <<
"/apollo/prediction sent message, seq=" << (
seq - 1) <<
";";
44 rate.Sleep();
45 }
46 return 0;
47}
static Time Now()
get the current time.
bool Init(const char *binary_name, const std::string &dag_info)
std::unique_ptr< Node > CreateNode(const std::string &node_name, const std::string &name_space)
uint32_t seq
Sequence number of message