25 {
26 int ret = 0;
27 switch (error_code) {
29 AINFO <<
"ErrorCode::SUCCESS";
31 break;
33 AINFO <<
"ErrorCode::ERROR_CHECK_BEFORE_START";
35 "Do not start repeated. This request will be ignored\n");
36 break;
38 AINFO <<
"ErrorCode::ERROR_CHECK_BEFORE_START";
40 "Start command should be called before check. This request will "
41 "be ignored\n");
42 break;
44 AINFO <<
"ErrorCode::ERROR_REQUEST";
45 fprintf(
USER_STREAM,
"Request error. This request will be ignored\n");
46 break;
48 AINFO <<
"ErrorCode::ERROR_GNSS_SIGNAL_FAIL."
49 << "Please check if area is spacious";
51 "ERROR: GNSS signal do not meet the requirements, please make "
52 "sure area is spacious\n");
53 ret = -1;
54 break;
56 AINFO <<
"ErrorCode::ERROR_VERIFY_NO_GNSSPOS."
57 << "Please check if channel /apollo/sensor/gnss/best_pose exists "
58 "in system";
60 "ERROR:System has no channel /apollo/sensor/gnss/best_pose, you "
61 "may need to reboot system\n");
62 ret = -1;
63 break;
65 AINFO <<
"ErrorCode::ERROR_NOT_STATIC. Please keep the car still";
66 fprintf(
USER_STREAM,
"ERROR:Please keep the car still\n");
67 ret = -1;
68 break;
70 AINFO <<
"ErrorCode::ERROR_NOT_EIGHT_ROUTE. "
71 << "Please keep the car 8-like maneuver";
72 fprintf(
USER_STREAM,
"WARNING:Please keep the car 8-like maneuver\n");
73 break;
75 AINFO <<
"ErrorCode.ERROR_LOOPS_NOT_REACHED";
77 "WARNING:Collection time do not meet the requirements. "
78 "Supplementary data collection may be required\n");
79 ret = -1;
80 break;
82 AINFO <<
"ErrorCode.ERROR_CHANNEL_VERIFY_TOPIC_LACK";
84 ret = -1;
85 break;
87 AINFO <<
"ErrorCode.ERROR_CHANNEL_VERIFY_RATES_ABNORMAL";
89 ret = -1;
90 break;
92 AINFO <<
"ErrorCode.ERROR_VERIFY_NO_RECORDERS";
94 ret = -1;
95 break;
96 default:
97 AINFO <<
"This branch should never be reached. If this happened, please "
98 "open an issue. code: "
99 << error_code;
101 "ERROR:This branch should never be reached. If this happened, "
102 "please open an issue\n");
103 break;
104 }
105 return ret;
106}
@ ERROR_CHANNEL_VERIFY_RATES_ABNORMAL
@ ERROR_LOOPS_NOT_REACHED
@ ERROR_CHANNEL_VERIFY_TOPIC_LACK
@ ERROR_VERIFY_NO_GNSSPOS
@ ERROR_VERIFY_NO_RECORDERS
@ ERROR_CHECK_BEFORE_START