Apollo 10.0
自动驾驶开放平台
gnss_component.cc
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2017 The Apollo Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *****************************************************************************/
17
18namespace apollo {
19namespace drivers {
20namespace gnss {
21
23
25 : monitor_logger_buffer_(
26 apollo::common::monitor::MonitorMessageItem::GNSS) {}
27
29 config::Config gnss_config;
31 &gnss_config)) {
32 monitor_logger_buffer_.ERROR("Unable to load gnss conf file: " +
34 return false;
35 }
36 AINFO << "Gnss config: " << gnss_config.DebugString();
37
38 raw_stream_.reset(new RawStream(gnss_config, node_));
39
40 if (!raw_stream_->Init()) {
41 monitor_logger_buffer_.ERROR("Init gnss stream failed");
42 AERROR << "Init gnss stream failed";
43 return false;
44 }
45 raw_stream_->Start();
46 monitor_logger_buffer_.INFO("gnss is started.");
47 return true;
48}
49
50} // namespace gnss
51} // namespace drivers
52} // namespace apollo
std::shared_ptr< Node > node_
#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
class register implement
Definition arena_queue.h:37