Apollo 10.0
自动驾驶开放平台
pc_bcm_201.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 Pcbcm201();
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': 'Left turn lamp request', 'enum': {0:
40 // 'PC_REVERSELAMPREQ_NOREQ', 1: 'PC_REVERSELAMPREQ_REQ'}, 'precision': 1.0,
41 // 'len': 1, 'name': 'PC_ReverseLampReq', 'is_signed_var': False, 'offset':
42 // 0.0, 'physical_range': '[0|1]', 'bit': 1, 'type': 'enum', 'order':
43 // 'motorola', 'physical_unit': ''}
45 Pc_bcm_201::Pc_reverselampreqType pc_reverselampreq);
46
47 // config detail: {'description': 'Left turn lamp request', 'enum': {0:
48 // 'PC_LOWBEAMREQ_NOREQ', 1: 'PC_LOWBEAMREQ_REQ'}, 'precision': 1.0, 'len': 1,
49 // 'name': 'PC_LowBeamReq', 'is_signed_var': False, 'offset': 0.0,
50 // 'physical_range': '[0|1]', 'bit': 2, 'type': 'enum', 'order': 'motorola',
51 // 'physical_unit': ''}
53
54 // config detail: {'description': 'Left turn lamp request', 'enum': {0:
55 // 'PC_HIGHBEAMREQ_NOREQ', 1: 'PC_HIGHBEAMREQ_REQ'}, 'precision': 1.0, 'len':
56 // 1, 'name': 'PC_HighBeamReq', 'is_signed_var': False, 'offset': 0.0,
57 // 'physical_range': '[0|1]', 'bit': 3, 'type': 'enum', 'order': 'motorola',
58 // 'physical_unit': ''}
60
61 // config detail: {'description': 'Right turn lamp request', 'enum': {0:
62 // 'PC_RIGHTTURNLAMPREQ_NOREQ', 1: 'PC_RIGHTTURNLAMPREQ_REQ'},
63 // 'precision': 1.0, 'len': 1, 'name': 'PC_RightTurnLampReq', 'is_signed_var':
64 // False, 'offset': 0.0, 'physical_range': '[0|3]', 'bit': 4, 'type': 'enum',
65 // 'order': 'motorola', 'physical_unit': ''}
67 Pc_bcm_201::Pc_rightturnlampreqType pc_rightturnlampreq);
68
69 // config detail: {'description': 'Left turn lamp request', 'enum': {0:
70 // 'PC_LEFTTURNLAMPREQ_NOREQ', 1: 'PC_LEFTTURNLAMPREQ_REQ'}, 'precision': 1.0,
71 // 'len': 1, 'name': 'PC_LeftTurnLampReq', 'is_signed_var': False, 'offset':
72 // 0.0, 'physical_range': '[0|1]', 'bit': 5, 'type': 'enum', 'order':
73 // 'motorola', 'physical_unit': ''}
75 Pc_bcm_201::Pc_leftturnlampreqType pc_leftturnlampreq);
76
77 // config detail: {'description': 'Horn request', 'enum': {0:
78 // 'PC_HORNREQ_NOREQ', 1: 'PC_HORNREQ_REQ'}, 'precision': 1.0, 'len': 1,
79 // 'name': 'PC_HornReq', 'is_signed_var': False, 'offset': 0.0,
80 // 'physical_range': '[0|1]', 'bit': 6, 'type': 'enum', 'order': 'motorola',
81 // 'physical_unit': ''}
83
84 // config detail: {'description': 'Hazard lamp request', 'enum': {0:
85 // 'PC_HAZARDLAMPREQ_NOREQ', 1: 'PC_HAZARDLAMPREQ_REQ'}, 'precision': 1.0,
86 // 'len': 1, 'name': 'PC_HazardLampReq', 'is_signed_var': False, 'offset':
87 // 0.0, 'physical_range': '[0|1]', 'bit': 7, 'type': 'enum', 'order':
88 // 'motorola', 'physical_unit': ''}
90 Pc_bcm_201::Pc_hazardlampreqType pc_hazardlampreq);
91
92 private:
93 // config detail: {'description': 'Left turn lamp request', 'enum': {0:
94 // 'PC_REVERSELAMPREQ_NOREQ', 1: 'PC_REVERSELAMPREQ_REQ'}, 'precision': 1.0,
95 // 'len': 1, 'name': 'PC_ReverseLampReq', 'is_signed_var': False, 'offset':
96 // 0.0, 'physical_range': '[0|1]', 'bit': 1, 'type': 'enum', 'order':
97 // 'motorola', 'physical_unit': ''}
98 void set_p_pc_reverselampreq(
99 uint8_t* data, Pc_bcm_201::Pc_reverselampreqType pc_reverselampreq);
100
101 // config detail: {'description': 'Left turn lamp request', 'enum': {0:
102 // 'PC_LOWBEAMREQ_NOREQ', 1: 'PC_LOWBEAMREQ_REQ'}, 'precision': 1.0, 'len': 1,
103 // 'name': 'PC_LowBeamReq', 'is_signed_var': False, 'offset': 0.0,
104 // 'physical_range': '[0|1]', 'bit': 2, 'type': 'enum', 'order': 'motorola',
105 // 'physical_unit': ''}
106 void set_p_pc_lowbeamreq(uint8_t* data,
107 Pc_bcm_201::Pc_lowbeamreqType pc_lowbeamreq);
108
109 // config detail: {'description': 'Left turn lamp request', 'enum': {0:
110 // 'PC_HIGHBEAMREQ_NOREQ', 1: 'PC_HIGHBEAMREQ_REQ'}, 'precision': 1.0, 'len':
111 // 1, 'name': 'PC_HighBeamReq', 'is_signed_var': False, 'offset': 0.0,
112 // 'physical_range': '[0|1]', 'bit': 3, 'type': 'enum', 'order': 'motorola',
113 // 'physical_unit': ''}
114 void set_p_pc_highbeamreq(uint8_t* data,
115 Pc_bcm_201::Pc_highbeamreqType pc_highbeamreq);
116
117 // config detail: {'description': 'Right turn lamp request', 'enum': {0:
118 // 'PC_RIGHTTURNLAMPREQ_NOREQ', 1: 'PC_RIGHTTURNLAMPREQ_REQ'},
119 // 'precision': 1.0, 'len': 1, 'name': 'PC_RightTurnLampReq', 'is_signed_var':
120 // False, 'offset': 0.0, 'physical_range': '[0|3]', 'bit': 4, 'type': 'enum',
121 // 'order': 'motorola', 'physical_unit': ''}
122 void set_p_pc_rightturnlampreq(
123 uint8_t* data, Pc_bcm_201::Pc_rightturnlampreqType pc_rightturnlampreq);
124
125 // config detail: {'description': 'Left turn lamp request', 'enum': {0:
126 // 'PC_LEFTTURNLAMPREQ_NOREQ', 1: 'PC_LEFTTURNLAMPREQ_REQ'}, 'precision': 1.0,
127 // 'len': 1, 'name': 'PC_LeftTurnLampReq', 'is_signed_var': False, 'offset':
128 // 0.0, 'physical_range': '[0|1]', 'bit': 5, 'type': 'enum', 'order':
129 // 'motorola', 'physical_unit': ''}
130 void set_p_pc_leftturnlampreq(
131 uint8_t* data, Pc_bcm_201::Pc_leftturnlampreqType pc_leftturnlampreq);
132
133 // config detail: {'description': 'Horn request', 'enum': {0:
134 // 'PC_HORNREQ_NOREQ', 1: 'PC_HORNREQ_REQ'}, 'precision': 1.0, 'len': 1,
135 // 'name': 'PC_HornReq', 'is_signed_var': False, 'offset': 0.0,
136 // 'physical_range': '[0|1]', 'bit': 6, 'type': 'enum', 'order': 'motorola',
137 // 'physical_unit': ''}
138 void set_p_pc_hornreq(uint8_t* data, Pc_bcm_201::Pc_hornreqType pc_hornreq);
139
140 // config detail: {'description': 'Hazard lamp request', 'enum': {0:
141 // 'PC_HAZARDLAMPREQ_NOREQ', 1: 'PC_HAZARDLAMPREQ_REQ'}, 'precision': 1.0,
142 // 'len': 1, 'name': 'PC_HazardLampReq', 'is_signed_var': False, 'offset':
143 // 0.0, 'physical_range': '[0|1]', 'bit': 7, 'type': 'enum', 'order':
144 // 'motorola', 'physical_unit': ''}
145 void set_p_pc_hazardlampreq(
146 uint8_t* data, Pc_bcm_201::Pc_hazardlampreqType pc_hazardlampreq);
147
148 private:
149 Pc_bcm_201::Pc_reverselampreqType pc_reverselampreq_;
150 Pc_bcm_201::Pc_lowbeamreqType pc_lowbeamreq_;
151 Pc_bcm_201::Pc_highbeamreqType pc_highbeamreq_;
152 Pc_bcm_201::Pc_rightturnlampreqType pc_rightturnlampreq_;
153 Pc_bcm_201::Pc_leftturnlampreqType pc_leftturnlampreq_;
154 Pc_bcm_201::Pc_hornreqType pc_hornreq_;
155 Pc_bcm_201::Pc_hazardlampreqType pc_hazardlampreq_;
156};
157
158} // namespace ge3
159} // namespace canbus
160} // namespace apollo
Pcbcm201 * set_pc_highbeamreq(Pc_bcm_201::Pc_highbeamreqType pc_highbeamreq)
Definition pc_bcm_201.cc:96
Pcbcm201 * set_pc_reverselampreq(Pc_bcm_201::Pc_reverselampreqType pc_reverselampreq)
Definition pc_bcm_201.cc:58
Pcbcm201 * set_pc_leftturnlampreq(Pc_bcm_201::Pc_leftturnlampreqType pc_leftturnlampreq)
static const int32_t ID
Definition pc_bcm_201.h:29
Pcbcm201 * set_pc_hazardlampreq(Pc_bcm_201::Pc_hazardlampreqType pc_hazardlampreq)
Pcbcm201 * set_pc_lowbeamreq(Pc_bcm_201::Pc_lowbeamreqType pc_lowbeamreq)
Definition pc_bcm_201.cc:77
void UpdateData(uint8_t *data) override
Definition pc_bcm_201.cc:37
Pcbcm201 * set_pc_rightturnlampreq(Pc_bcm_201::Pc_rightturnlampreqType pc_rightturnlampreq)
Pcbcm201 * set_pc_hornreq(Pc_bcm_201::Pc_hornreqType pc_hornreq)
uint32_t GetPeriod() const override
Definition pc_bcm_201.cc:31
This is the base class of protocol data.
class register implement
Definition arena_queue.h:37
The class of ProtocolData