Apollo  6.0
Open source self driving car software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pc_bcm_201.h
Go to the documentation of this file.
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/proto/chassis_detail.pb.h"
21 
22 namespace apollo {
23 namespace canbus {
24 namespace ge3 {
25 
27  ::apollo::canbus::ChassisDetail> {
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': ''}
52  Pcbcm201* set_pc_lowbeamreq(Pc_bcm_201::Pc_lowbeamreqType pc_lowbeamreq);
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': ''}
59  Pcbcm201* set_pc_highbeamreq(Pc_bcm_201::Pc_highbeamreqType pc_highbeamreq);
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': ''}
82  Pcbcm201* set_pc_hornreq(Pc_bcm_201::Pc_hornreqType pc_hornreq);
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)
Pcbcm201 * set_pc_lowbeamreq(Pc_bcm_201::Pc_lowbeamreqType pc_lowbeamreq)
Pcbcm201 * set_pc_reverselampreq(Pc_bcm_201::Pc_reverselampreqType pc_reverselampreq)
Pcbcm201 * set_pc_hornreq(Pc_bcm_201::Pc_hornreqType pc_hornreq)
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
void UpdateData(uint8_t *data) override
This is the base class of protocol data.
Definition: protocol_data.h:44
uint32_t GetPeriod() const override
Pcbcm201 * set_pc_leftturnlampreq(Pc_bcm_201::Pc_leftturnlampreqType pc_leftturnlampreq)
Pcbcm201 * set_pc_hazardlampreq(Pc_bcm_201::Pc_hazardlampreqType pc_hazardlampreq)
Pcbcm201 * set_pc_rightturnlampreq(Pc_bcm_201::Pc_rightturnlampreqType pc_rightturnlampreq)
The class of ProtocolData.
Definition: pc_bcm_201.h:26
static const int32_t ID
Definition: pc_bcm_201.h:29