Apollo 10.0
自动驾驶开放平台
vcu_drive_report_52.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 "modules/canbus_vehicle/neolix_edu/proto/neolix_edu.pb.h"
21
22namespace apollo {
23namespace canbus {
24namespace neolix_edu {
25
27 ::apollo::canbus::Neolix_edu> {
28 public:
29 static const int32_t ID;
31 void Parse(const std::uint8_t* bytes, int32_t length,
32 Neolix_edu* chassis) const override;
33
34 private:
35 // config detail: {'description': '0x0:disable;0x1:enable', 'offset': 0.0,
36 // 'precision': 1.0, 'len': 1, 'name': 'Drive_Enable_Resp', 'is_signed_var':
37 // False, 'physical_range': '[0|0]', 'bit': 0, 'type': 'bool', 'order':
38 // 'motorola', 'physical_unit': ''}
39 bool drive_enable_resp(const std::uint8_t* bytes, const int32_t length) const;
40
41 // config detail: {'description': '0x0:Standby;0x1:auto drive;0x2:net
42 // drive;0x3:remote control;0x4:emergency brake;0x5~0x7:Reserved', 'enum': {0:
43 // 'CONTROL_MODE_RESP_STANDBY', 1: 'CONTROL_MODE_RESP_AUTO_DRIVE', 2:
44 // 'CONTROL_MODE_RESP_NET_DRIVE', 3: 'CONTROL_MODE_RESP_REMOTE_CONTROL', 4:
45 // 'CONTROL_MODE_RESP_EMERGENCY_BRAKE'}, 'precision': 1.0, 'len': 3, 'name':
46 // 'Control_Mode_Resp', 'is_signed_var': False, 'offset': 0.0,
47 // 'physical_range': '[0|7]', 'bit': 6, 'type': 'enum', 'order': 'motorola',
48 // 'physical_unit': ''}
50 const std::uint8_t* bytes, const int32_t length) const;
51
52 // config detail: {'description':
53 // '0x0:N\xe6\xa1\xa3;0x1:D\xe6\xa1\xa3;0x2:R\xe6\xa1\xa3;0x3:Reserved',
54 // 'enum': {0: 'VCU_REAL_SHIFT_N', 1: 'VCU_REAL_SHIFT_D', 2:
55 // 'VCU_REAL_SHIFT_R', 3: 'VCU_REAL_SHIFT_RESERVED'}, 'precision': 1.0, 'len':
56 // 2, 'name': 'VCU_Real_Shift', 'is_signed_var': False, 'offset': 0.0,
57 // 'physical_range': '[0|3]', 'bit': 9, 'type': 'enum', 'order': 'motorola',
58 // 'physical_unit': ''}
60 const std::uint8_t* bytes, const int32_t length) const;
61
62 // config detail: {'description': '0x0:disable;0x1:enable', 'offset': 0.0,
63 // 'precision': 1.0, 'len': 1, 'name': 'VCU_Real_Shift_Valid',
64 // 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 10, 'type':
65 // 'bool', 'order': 'motorola', 'physical_unit': ''}
66 bool vcu_real_shift_valid(const std::uint8_t* bytes,
67 const int32_t length) const;
68
69 // config detail: {'description': '0x0:disable;0x1:enable', 'offset': 0.0,
70 // 'precision': 1.0, 'len': 1, 'name': 'VCU_Real_Torque_Valid',
71 // 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 11, 'type':
72 // 'bool', 'order': 'motorola', 'physical_unit': ''}
73 bool vcu_real_torque_valid(const std::uint8_t* bytes,
74 const int32_t length) const;
75
76 // config detail: {'name': 'VCU_Real_Torque', 'offset': -665.0, 'precision':
77 // 0.02, 'len': 16, 'is_signed_var': False, 'physical_range': '[0|0]', 'bit':
78 // 23, 'type': 'double', 'order': 'motorola', 'physical_unit': 'Nm'}
79 double vcu_real_torque(const std::uint8_t* bytes, const int32_t length) const;
80
81 // config detail: {'description': '0x0:disable;0x1:enable', 'offset': 0.0,
82 // 'precision': 1.0, 'len': 1, 'name': 'VCU_LimitedTorqueMode',
83 // 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 32, 'type':
84 // 'bool', 'order': 'motorola', 'physical_unit': ''}
85 bool vcu_limitedtorquemode(const std::uint8_t* bytes,
86 const int32_t length) const;
87
88 // config detail: {'name': 'VCU_DriveRept_AliveCounter', 'offset': 0.0,
89 // 'precision': 1.0, 'len': 4, 'is_signed_var': False, 'physical_range':
90 // '[0|0]', 'bit': 51, 'type': 'int', 'order': 'motorola', 'physical_unit':
91 // ''}
92 int vcu_driverept_alivecounter(const std::uint8_t* bytes,
93 const int32_t length) const;
94
95 // config detail: {'name': 'VCU_DriveRept_CheckSum', 'offset': 0.0,
96 // 'precision': 1.0, 'len': 8, 'is_signed_var': False, 'physical_range':
97 // '[0|0]', 'bit': 63, 'type': 'int', 'order': 'motorola', 'physical_unit':
98 // ''}
99 int vcu_driverept_checksum(const std::uint8_t* bytes,
100 const int32_t length) const;
101};
102
103} // namespace neolix_edu
104} // namespace canbus
105} // namespace apollo
void Parse(const std::uint8_t *bytes, int32_t length, Neolix_edu *chassis) const override
This is the base class of protocol data.
class register implement
Definition arena_queue.h:37
The class of ProtocolData