Apollo 10.0
自动驾驶开放平台
apollo::hdmap::LoopsChecker类 参考

#include <client_loops_check.h>

apollo::hdmap::LoopsChecker 的协作图:

Public 成员函数

 LoopsChecker (const std::string &time_flag_file)
 
int SyncStart (bool *reached)
 

详细描述

在文件 client_loops_check.h32 行定义.

构造及析构函数说明

◆ LoopsChecker()

apollo::hdmap::LoopsChecker::LoopsChecker ( const std::string &  time_flag_file)
explicit

在文件 client_loops_check.cc28 行定义.

29 : time_flag_file_(time_flag_file) {
30 YAML::Node node = YAML::LoadFile(FLAGS_client_conf_yaml);
31 std::string server_addr =
32 node["grpc_host_port"]["grpc_host"].as<std::string>() + ":" +
33 node["grpc_host_port"]["grpc_port"].as<std::string>();
34 check_period_ = node["loops_check"]["check_period"].as<int>();
35 service_stub_ = CollectionCheckerService::NewStub(
36 grpc::CreateChannel(server_addr, grpc::InsecureChannelCredentials()));
37}

成员函数说明

◆ SyncStart()

int apollo::hdmap::LoopsChecker::SyncStart ( bool *  reached)

在文件 client_loops_check.cc39 行定义.

39 {
40 std::vector<std::pair<double, double>> time_ranges = GetTimeRanges();
41 size_t pair_count = time_ranges.size();
42 if (pair_count == 0) {
43 AINFO << "there is no time range";
44 return -1;
45 }
46 int ret = Start(time_ranges);
47 if (ret != 0) {
48 AINFO << "loops check start failed";
49 fprintf(USER_STREAM, "loops check start failed\n");
50 return -1;
51 }
52 return PeriodicCheck(reached);
53}
#define USER_STREAM
#define AINFO
Definition log.h:42

该类的文档由以下文件生成: