Apollo 10.0
自动驾驶开放平台
scu_bcs_2_307.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2019 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 "modules/canbus_vehicle/ge3/proto/ge3.pb.h"
21
22namespace apollo {
23namespace canbus {
24namespace ge3 {
25
27 ::apollo::canbus::Ge3> {
28 public:
29 static const int32_t ID;
30 Scubcs2307();
31 void Parse(const std::uint8_t* bytes, int32_t length,
32 Ge3* chassis) const override;
33
34 private:
35 // config detail: {'description': 'Vehicle speed valid data', 'enum': {0:
36 // 'BCS_VEHSPDVD_INVALID', 1: 'BCS_VEHSPDVD_VALID'}, 'precision': 1.0, 'len':
37 // 1, 'name': 'BCS_VehSpdVD', 'is_signed_var': False, 'offset': 0.0,
38 // 'physical_range': '[0|1]', 'bit': 40, 'type': 'enum', 'order': 'motorola',
39 // 'physical_unit': '-'}
40 Scu_bcs_2_307::Bcs_vehspdvdType bcs_vehspdvd(const std::uint8_t* bytes,
41 const int32_t length) const;
42
43 // config detail: {'description': 'Yaw rate', 'offset': -2.2243, 'precision':
44 // 0.0021326, 'len': 12, 'name': 'BCS_YawRate', 'is_signed_var': False,
45 // 'physical_range': '[-2.2243|2.2243]', 'bit': 55, 'type': 'double', 'order':
46 // 'motorola', 'physical_unit': 'rad/s'}
47 double bcs_yawrate(const std::uint8_t* bytes, const int32_t length) const;
48
49 // config detail: {'description': 'Vehicle speed', 'offset': 0.0, 'precision':
50 // 0.05625, 'len': 13, 'name': 'BCS_VehSpd', 'is_signed_var': False,
51 // 'physical_range': '[0|240]', 'bit': 39, 'type': 'double', 'order':
52 // 'motorola', 'physical_unit': 'km/h'}
53 double bcs_vehspd(const std::uint8_t* bytes, const int32_t length) const;
54
55 // config detail: {'description': 'Vehicle longitudinal acceleration',
56 // 'offset': -21.593, 'precision': 0.027126736, 'len': 12, 'name':
57 // 'BCS_VehLongAccel', 'is_signed_var': False, 'physical_range':
58 // '[-21.593|21.593]', 'bit': 23, 'type': 'double', 'order': 'motorola',
59 // 'physical_unit': 'm/s^2'}
60 double bcs_vehlongaccel(const std::uint8_t* bytes,
61 const int32_t length) const;
62
63 // config detail: {'description': 'Vehicle lateral acceleration', 'offset':
64 // -21.593, 'precision': 0.027126736, 'len': 12, 'name': 'BCS_VehLatAccel',
65 // 'is_signed_var': False, 'physical_range': '[-21.593|21.593]', 'bit': 7,
66 // 'type': 'double', 'order': 'motorola', 'physical_unit': 'm/s^2'}
67 double bcs_vehlataccel(const std::uint8_t* bytes, const int32_t length) const;
68};
69
70} // namespace ge3
71} // namespace canbus
72} // namespace apollo
void Parse(const std::uint8_t *bytes, int32_t length, Ge3 *chassis) const override
This is the base class of protocol data.
class register implement
Definition arena_queue.h:37
The class of ProtocolData