Apollo 10.0
自动驾驶开放平台
pc_bcs_202.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
31 Pcbcs202();
32
33 uint32_t GetPeriod() const override;
34
35 void UpdateData(uint8_t* data) override;
36
37 void Reset() override;
38
39 // config detail: {'description': 'Brake pedal request', 'offset': 0.0,
40 // 'precision': 0.1, 'len': 10, 'name': 'PC_BrkPedReq', 'is_signed_var':
41 // False, 'physical_range': '[0|100]', 'bit': 1, 'type': 'double', 'order':
42 // 'motorola', 'physical_unit': '%'}
43 Pcbcs202* set_pc_brkpedreq(double pc_brkpedreq);
44
45 // config detail: {'description': 'Brake pedal control enable', 'enum': {0:
46 // 'PC_BRKPEDENABLE_DISABLE', 1: 'PC_BRKPEDENABLE_ENABLE'}, 'precision': 1.0,
47 // 'len': 1, 'name': 'PC_BrkPedEnable', 'is_signed_var': False, 'offset': 0.0,
48 // 'physical_range': '[0|1]', 'bit': 7, 'type': 'enum', 'order': 'motorola',
49 // 'physical_unit': ''}
51 Pc_bcs_202::Pc_brkpedenableType pc_brkpedenable);
52
53 private:
54 // config detail: {'description': 'Brake pedal request', 'offset': 0.0,
55 // 'precision': 0.1, 'len': 10, 'name': 'PC_BrkPedReq', 'is_signed_var':
56 // False, 'physical_range': '[0|100]', 'bit': 1, 'type': 'double', 'order':
57 // 'motorola', 'physical_unit': '%'}
58 void set_p_pc_brkpedreq(uint8_t* data, double pc_brkpedreq);
59
60 // config detail: {'description': 'Brake pedal control enable', 'enum': {0:
61 // 'PC_BRKPEDENABLE_DISABLE', 1: 'PC_BRKPEDENABLE_ENABLE'}, 'precision': 1.0,
62 // 'len': 1, 'name': 'PC_BrkPedEnable', 'is_signed_var': False, 'offset': 0.0,
63 // 'physical_range': '[0|1]', 'bit': 7, 'type': 'enum', 'order': 'motorola',
64 // 'physical_unit': ''}
65 void set_p_pc_brkpedenable(uint8_t* data,
66 Pc_bcs_202::Pc_brkpedenableType pc_brkpedenable);
67
68 private:
69 double pc_brkpedreq_;
70 Pc_bcs_202::Pc_brkpedenableType pc_brkpedenable_;
71};
72
73} // namespace ge3
74} // namespace canbus
75} // namespace apollo
Pcbcs202 * set_pc_brkpedenable(Pc_bcs_202::Pc_brkpedenableType pc_brkpedenable)
Definition pc_bcs_202.cc:72
Pcbcs202 * set_pc_brkpedreq(double pc_brkpedreq)
Definition pc_bcs_202.cc:48
void UpdateData(uint8_t *data) override
Definition pc_bcs_202.cc:37
static const int32_t ID
Definition pc_bcs_202.h:29
uint32_t GetPeriod() const override
Definition pc_bcs_202.cc:31
This is the base class of protocol data.
class register implement
Definition arena_queue.h:37
The class of ProtocolData