27 {
28
30
32
33 auto talker = talker_node->CreateWriter<
Chatter>(
"channel/chatter");
37 auto msg = std::make_shared<Chatter>();
38 msg->set_timestamp(
Time::Now().ToNanosecond());
39 msg->set_lidar_timestamp(
Time::Now().ToNanosecond());
40 msg->set_seq(seq);
41 msg->set_content("Hello, apollo!");
42 talker->Write(msg);
43 AINFO <<
"talker sent a message! No. " <<
seq;
45 rate.Sleep();
46 }
47 return 0;
48}
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