Apollo 10.0
自动驾驶开放平台
smart_recorder.cc 文件参考
smart_recorder.cc 的引用(Include)关系图:

浏览源代码.

函数

int main (int argc, char **argv)
 

函数说明

◆ main()

int main ( int  argc,
char **  argv 
)

在文件 smart_recorder.cc35 行定义.

35 {
36 google::ParseCommandLineFlags(&argc, &argv, true);
37 if (FLAGS_restored_output_dir.empty()) {
38 FLAGS_restored_output_dir =
39 absl::StrCat(FLAGS_source_records_dir, "_restored");
40 }
41 AINFO << "input dir: " << FLAGS_source_records_dir
42 << ". output dir: " << FLAGS_restored_output_dir
43 << ". config file: " << FLAGS_smart_recorder_config_filename
44 << ". program name: " << argv[0];
45 SmartRecordTrigger trigger_conf;
46 ACHECK(GetProtoFromFile(FLAGS_smart_recorder_config_filename, &trigger_conf))
47 << "Failed to load triggers config file "
48 << FLAGS_smart_recorder_config_filename;
49 auto processor = std::unique_ptr<RecordProcessor>(new RealtimeRecordProcessor(
50 FLAGS_source_records_dir, FLAGS_restored_output_dir));
51 if (!FLAGS_real_time_trigger) {
52 processor = std::unique_ptr<RecordProcessor>(new PostRecordProcessor(
53 FLAGS_source_records_dir, FLAGS_restored_output_dir));
54 }
55 if (!processor->Init(trigger_conf)) {
56 AERROR << "failed to init record processor";
57 return -1;
58 }
59 if (!processor->Process()) {
60 AERROR << "failed to process records";
61 return -1;
62 }
63 return 0;
64}
Post processor against recorded tasks that have been completed
Realtime processor against recorded tasks that are being recorded
#define ACHECK(cond)
Definition log.h:80
#define AERROR
Definition log.h:44
#define AINFO
Definition log.h:42
bool GetProtoFromFile(const std::string &file_name, google::protobuf::Message *message)
Parses the content of the file specified by the file_name as a representation of protobufs,...
Definition file.cc:132