17#include "cyber/examples/proto/examples.pb.h"
27int main(
int argc,
char *argv[]) {
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());
41 msg->set_content(
"Hello, apollo!");
43 AINFO <<
"talker sent a message! No. " << seq;
Cyber has builtin time type Time.
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)
int main(int argc, char *argv[])