Apollo 10.0
自动驾驶开放平台
gps_6e.h
浏览该文件的文档.
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 *****************************************************************************/
16
22#pragma once
23
24#include "modules/canbus_vehicle/lincoln/proto/lincoln.pb.h"
26
31namespace apollo {
32namespace canbus {
33namespace lincoln {
34
41 ::apollo::canbus::Lincoln> {
42 public:
43 static const int32_t ID;
44
45 /*
46 * @brief parse received data
47 * @param bytes a pointer to the input bytes
48 * @param length the length of the input bytes
49 * @param timestamp the timestamp of input data
50 * @param chassis_detail the parsed chassis_detail
51 */
52 virtual void Parse(const std::uint8_t *bytes, int32_t length,
53 Lincoln *chassis_detail) const;
54
64 int32_t year(const std::uint8_t *bytes, int32_t length) const;
65
75 int32_t month(const std::uint8_t *bytes, int32_t length) const;
76
86 int32_t day(const std::uint8_t *bytes, int32_t length) const;
87
97 int32_t hours(const std::uint8_t *bytes, int32_t length) const;
98
108 int32_t minutes(const std::uint8_t *bytes, int32_t length) const;
109
119 int32_t seconds(const std::uint8_t *bytes, int32_t length) const;
120
131 double compass_direction(const std::uint8_t *bytes, int32_t length) const;
132
142 double pdop(const std::uint8_t *bytes, int32_t length) const;
143
153 bool is_gps_fault(const std::uint8_t *bytes, int32_t length) const;
154
164 bool is_inferred_position(const std::uint8_t *bytes, int32_t length) const;
165};
166
167} // namespace lincoln
168} // namespace canbus
169} // namespace apollo
one of the protocol data of lincoln vehicle
Definition gps_6e.h:41
virtual void Parse(const std::uint8_t *bytes, int32_t length, Lincoln *chassis_detail) const
Definition gps_6e.cc:29
bool is_inferred_position(const std::uint8_t *bytes, int32_t length) const
get inferred position from byte array config detail: {'name': 'inf', 'offset': 0.0,...
Definition gps_6e.cc:100
int32_t minutes(const std::uint8_t *bytes, int32_t length) const
get minutes from byte array config detail: {'name': 'minutes', 'offset': 0.0, 'precision': 1....
Definition gps_6e.cc:70
int32_t day(const std::uint8_t *bytes, int32_t length) const
get day from byte array config detail: {'name': 'day', 'offset': 0.0, 'precision': 1....
Definition gps_6e.cc:58
static const int32_t ID
Definition gps_6e.h:43
int32_t month(const std::uint8_t *bytes, int32_t length) const
get month from byte array config detail: {'name': 'month', 'offset': 0.0, 'precision': 1....
Definition gps_6e.cc:52
int32_t seconds(const std::uint8_t *bytes, int32_t length) const
get year from byte array config detail: {'name': 'seconds', 'offset': 0.0, 'precision': 1....
Definition gps_6e.cc:76
bool is_gps_fault(const std::uint8_t *bytes, int32_t length) const
check gps fault from byte array config detail: {'name': 'fltgps', 'offset': 0.0, 'precision': 1....
Definition gps_6e.cc:95
double compass_direction(const std::uint8_t *bytes, int32_t length) const
get compass direction from byte array config detail: {'name': 'compass', 'offset': 0....
Definition gps_6e.cc:82
int32_t hours(const std::uint8_t *bytes, int32_t length) const
get hours from byte array config detail: {'name': 'hours', 'offset': 0.0, 'precision': 1....
Definition gps_6e.cc:64
int32_t year(const std::uint8_t *bytes, int32_t length) const
get year from byte array config detail: {'name': 'year', 'offset': 0.0, 'precision': 1....
Definition gps_6e.cc:46
double pdop(const std::uint8_t *bytes, int32_t length) const
get pdop from byte array config detail: {'name': 'pdop', 'offset': 0.0, 'precision': 0....
Definition gps_6e.cc:89
This is the base class of protocol data.
class register implement
Definition arena_queue.h:37
The class of ProtocolData