Apollo 10.0
自动驾驶开放平台
llc_diag_brakecontrol_721.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2018 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/transit/proto/transit.pb.h"
21
22#include "gtest/gtest_prod.h"
23
24namespace apollo {
25namespace canbus {
26namespace transit {
27
29 ::apollo::canbus::Transit> {
30 public:
31 static const int32_t ID;
32
34
35 uint32_t GetPeriod() const override;
36
37 void UpdateData(uint8_t* data) override;
38
39 void Reset() override;
40
41 // config detail: {'description': 'Brake control loop P contribution',
42 // 'offset': 0.0, 'precision': 0.1, 'len': 10, 'name':
43 // 'LLC_DBG_BrakePidContribution_P', 'is_signed_var': True, 'physical_range':
44 // '[-51.2|51.1]', 'bit': 34, 'type': 'double', 'order': 'intel',
45 // 'physical_unit': 'mrev'}
47 double llc_dbg_brakepidcontribution_p);
48
49 // config detail: {'description': 'Brake control loop I contribution',
50 // 'offset': 0.0, 'precision': 0.1, 'len': 10, 'name':
51 // 'LLC_DBG_BrakePidContribution_I', 'is_signed_var': True, 'physical_range':
52 // '[-51.2|51.1]', 'bit': 44, 'type': 'double', 'order': 'intel',
53 // 'physical_unit': 'mrev'}
55 double llc_dbg_brakepidcontribution_i);
56
57 // config detail: {'description': 'Brake control loop D contribution',
58 // 'offset': 0.0, 'precision': 0.1, 'len': 10, 'name':
59 // 'LLC_DBG_BrakePidContribution_D', 'is_signed_var': True, 'physical_range':
60 // '[-51.2|51.1]', 'bit': 54, 'type': 'double', 'order': 'intel',
61 // 'physical_unit': 'mrev'}
63 double llc_dbg_brakepidcontribution_d);
64
65 // config detail: {'description': 'Brake control loop output', 'offset': 0.0,
66 // 'precision': 0.1, 'len': 10, 'name': 'LLC_DBG_BrakePID_Output',
67 // 'is_signed_var': True, 'physical_range': '[-51.2|51.1]', 'bit': 12, 'type':
68 // 'double', 'order': 'intel', 'physical_unit': 'mrev'}
70 double llc_dbg_brakepid_output);
71
72 // config detail: {'description': 'Brake control loop error', 'offset': 0.0,
73 // 'precision': 1.0, 'len': 12, 'name': 'LLC_DBG_BrakePID_Error',
74 // 'is_signed_var': True, 'physical_range': '[-2048|2047]', 'bit': 0, 'type':
75 // 'int', 'order': 'intel', 'physical_unit': 'psi'}
77 int llc_dbg_brakepid_error);
78
79 // config detail: {'description': 'Brake control feedforward contribution',
80 // 'offset': 0.0, 'precision': 0.5, 'len': 12, 'name':
81 // 'LLC_DBG_BrakeFeedforward', 'is_signed_var': True, 'physical_range':
82 // '[-1024|1023.5]', 'bit': 22, 'type': 'double', 'order': 'intel',
83 // 'physical_unit': 'mrev'}
85 double llc_dbg_brakefeedforward);
86
87 FRIEND_TEST(llc_diag_brakecontrol_721Test, part1);
88 FRIEND_TEST(llc_diag_brakecontrol_721Test, part2);
89
90 private:
91 // config detail: {'description': 'Brake control loop P contribution',
92 // 'offset': 0.0, 'precision': 0.1, 'len': 10, 'name':
93 // 'LLC_DBG_BrakePidContribution_P', 'is_signed_var': True, 'physical_range':
94 // '[-51.2|51.1]', 'bit': 34, 'type': 'double', 'order': 'intel',
95 // 'physical_unit': 'mrev'}
96 void set_p_llc_dbg_brakepidcontribution_p(
97 uint8_t* data, double llc_dbg_brakepidcontribution_p);
98
99 // config detail: {'description': 'Brake control loop I contribution',
100 // 'offset': 0.0, 'precision': 0.1, 'len': 10, 'name':
101 // 'LLC_DBG_BrakePidContribution_I', 'is_signed_var': True, 'physical_range':
102 // '[-51.2|51.1]', 'bit': 44, 'type': 'double', 'order': 'intel',
103 // 'physical_unit': 'mrev'}
104 void set_p_llc_dbg_brakepidcontribution_i(
105 uint8_t* data, double llc_dbg_brakepidcontribution_i);
106
107 // config detail: {'description': 'Brake control loop D contribution',
108 // 'offset': 0.0, 'precision': 0.1, 'len': 10, 'name':
109 // 'LLC_DBG_BrakePidContribution_D', 'is_signed_var': True, 'physical_range':
110 // '[-51.2|51.1]', 'bit': 54, 'type': 'double', 'order': 'intel',
111 // 'physical_unit': 'mrev'}
112 void set_p_llc_dbg_brakepidcontribution_d(
113 uint8_t* data, double llc_dbg_brakepidcontribution_d);
114
115 // config detail: {'description': 'Brake control loop output', 'offset': 0.0,
116 // 'precision': 0.1, 'len': 10, 'name': 'LLC_DBG_BrakePID_Output',
117 // 'is_signed_var': True, 'physical_range': '[-51.2|51.1]', 'bit': 12, 'type':
118 // 'double', 'order': 'intel', 'physical_unit': 'mrev'}
119 void set_p_llc_dbg_brakepid_output(uint8_t* data,
120 double llc_dbg_brakepid_output);
121
122 // config detail: {'description': 'Brake control loop error', 'offset': 0.0,
123 // 'precision': 1.0, 'len': 12, 'name': 'LLC_DBG_BrakePID_Error',
124 // 'is_signed_var': True, 'physical_range': '[-2048|2047]', 'bit': 0, 'type':
125 // 'int', 'order': 'intel', 'physical_unit': 'psi'}
126 void set_p_llc_dbg_brakepid_error(uint8_t* data, int llc_dbg_brakepid_error);
127
128 // config detail: {'description': 'Brake control feedforward contribution',
129 // 'offset': 0.0, 'precision': 0.5, 'len': 12, 'name':
130 // 'LLC_DBG_BrakeFeedforward', 'is_signed_var': True, 'physical_range':
131 // '[-1024|1023.5]', 'bit': 22, 'type': 'double', 'order': 'intel',
132 // 'physical_unit': 'mrev'}
133 void set_p_llc_dbg_brakefeedforward(uint8_t* data,
134 double llc_dbg_brakefeedforward);
135
136 private:
137 double llc_dbg_brakepidcontribution_p_;
138 double llc_dbg_brakepidcontribution_i_;
139 double llc_dbg_brakepidcontribution_d_;
140 double llc_dbg_brakepid_output_;
141 int llc_dbg_brakepid_error_;
142 double llc_dbg_brakefeedforward_;
143};
144
145} // namespace transit
146} // namespace canbus
147} // namespace apollo
FRIEND_TEST(llc_diag_brakecontrol_721Test, part1)
Llcdiagbrakecontrol721 * set_llc_dbg_brakepid_output(double llc_dbg_brakepid_output)
FRIEND_TEST(llc_diag_brakecontrol_721Test, part2)
Llcdiagbrakecontrol721 * set_llc_dbg_brakepid_error(int llc_dbg_brakepid_error)
Llcdiagbrakecontrol721 * set_llc_dbg_brakepidcontribution_p(double llc_dbg_brakepidcontribution_p)
Llcdiagbrakecontrol721 * set_llc_dbg_brakefeedforward(double llc_dbg_brakefeedforward)
Llcdiagbrakecontrol721 * set_llc_dbg_brakepidcontribution_i(double llc_dbg_brakepidcontribution_i)
Llcdiagbrakecontrol721 * set_llc_dbg_brakepidcontribution_d(double llc_dbg_brakepidcontribution_d)
This is the base class of protocol data.
class register implement
Definition arena_queue.h:37
The class of ProtocolData