Apollo 10.0
自动驾驶开放平台
proto_adapter.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2020 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 *****************************************************************************/
16
17#pragma once
18
19#include <memory>
20
21#include "modules/v2x/proto/v2x_car_status.pb.h"
22#include "modules/v2x/proto/v2x_junction.pb.h"
23#include "modules/v2x/proto/v2x_obu_rsi.pb.h"
24#include "modules/v2x/proto/v2x_obu_traffic_light.pb.h"
25#include "modules/v2x/proto/v2x_rsi.pb.h"
26#include "modules/common_msgs/v2x_msgs/v2x_traffic_light.pb.h"
27
30
31namespace apollo {
32namespace v2x {
52
53using OSLightColor = ::apollo::v2x::SingleTrafficLight_Color;
54using OSLightype = ::apollo::v2x::SingleTrafficLight_Type;
55using ObuLightype = ::apollo::v2x::obu::SingleTrafficLight_Type;
63class ProtoAdapter final {
64 public:
65 static OSLightype LightTypeObu2Sys(int32_t type);
66 static bool LightObu2Sys(const ObuLight &obu_light,
67 std::shared_ptr<OSLight> *os_light);
68 static bool RsiObu2Sys(const ObuRsi *obu_rsi, std::shared_ptr<OSRsi> *os_rsi);
69 static bool JunctionHd2obu(const HDJunction &hd_junction,
70 std::shared_ptr<ObuJunction> *obu_junction);
71};
72
73} // namespace v2x
74} // namespace apollo
static bool RsiObu2Sys(const ObuRsi *obu_rsi, std::shared_ptr< OSRsi > *os_rsi)
static bool LightObu2Sys(const ObuLight &obu_light, std::shared_ptr< OSLight > *os_light)
static OSLightype LightTypeObu2Sys(int32_t type)
static bool JunctionHd2obu(const HDJunction &hd_junction, std::shared_ptr< ObuJunction > *obu_junction)
std::shared_ptr< const JunctionInfo > JunctionInfoConstPtr
::apollo::v2x::SingleTrafficLight_Type OSLightype
::apollo::hdmap::JunctionInfoConstPtr HDJunction
::apollo::v2x::SingleTrafficLight_Color OSLightColor
::apollo::v2x::obu::SingleTrafficLight_Type ObuLightype
class register implement
Definition arena_queue.h:37