Apollo  6.0
Open source self driving car software
pc_eps_204.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  Pceps204();
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': 'Steer speed request', 'offset': 0.0,
40  // 'precision': 1.0, 'len': 16, 'name': 'PC_SteerSpdReq', 'is_signed_var':
41  // False, 'physical_range': '[0|500]', 'bit': 31, 'type': 'int', 'order':
42  // 'motorola', 'physical_unit': 'deg/s'}
43  Pceps204* set_pc_steerspdreq(int pc_steerspdreq);
44 
45  // config detail: {'description': 'Steer control enable', 'enum': {0:
46  // 'PC_STEERENABLE_DISABLE', 1: 'PC_STEERENABLE_ENABLE'}, 'precision': 1.0,
47  // 'len': 1, 'name': 'PC_SteerEnable', 'is_signed_var': False, 'offset': 0.0,
48  // 'physical_range': '[0|1]', 'bit': 7, 'type': 'enum', 'order': 'motorola',
49  // 'physical_unit': ''}
50  Pceps204* set_pc_steerenable(Pc_eps_204::Pc_steerenableType pc_steerenable);
51 
52  // config detail: {'description': 'Steer angle request', 'offset': -500.0,
53  // 'precision': 0.1, 'len': 16, 'name': 'PC_SteerAngReq', 'is_signed_var':
54  // False, 'physical_range': '[-500|500]', 'bit': 15, 'type': 'double',
55  // 'order': 'motorola', 'physical_unit': 'deg'}
56  Pceps204* set_pc_steerangreq(double pc_steerangreq);
57 
58  private:
59  // config detail: {'description': 'Steer speed request', 'offset': 0.0,
60  // 'precision': 1.0, 'len': 16, 'name': 'PC_SteerSpdReq', 'is_signed_var':
61  // False, 'physical_range': '[0|500]', 'bit': 31, 'type': 'int', 'order':
62  // 'motorola', 'physical_unit': 'deg/s'}
63  void set_p_pc_steerspdreq(uint8_t* data, int pc_steerspdreq);
64 
65  // config detail: {'description': 'Steer control enable', 'enum': {0:
66  // 'PC_STEERENABLE_DISABLE', 1: 'PC_STEERENABLE_ENABLE'}, 'precision': 1.0,
67  // 'len': 1, 'name': 'PC_SteerEnable', 'is_signed_var': False, 'offset': 0.0,
68  // 'physical_range': '[0|1]', 'bit': 7, 'type': 'enum', 'order': 'motorola',
69  // 'physical_unit': ''}
70  void set_p_pc_steerenable(uint8_t* data,
71  Pc_eps_204::Pc_steerenableType pc_steerenable);
72 
73  // config detail: {'description': 'Steer angle request', 'offset': -500.0,
74  // 'precision': 0.1, 'len': 16, 'name': 'PC_SteerAngReq', 'is_signed_var':
75  // False, 'physical_range': '[-500|500]', 'bit': 15, 'type': 'double',
76  // 'order': 'motorola', 'physical_unit': 'deg'}
77  void set_p_pc_steerangreq(uint8_t* data, double pc_steerangreq);
78 
79  private:
80  int pc_steerspdreq_;
81  Pc_eps_204::Pc_steerenableType pc_steerenable_;
82  double pc_steerangreq_;
83 };
84 
85 } // namespace ge3
86 } // namespace canbus
87 } // namespace apollo
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
This is the base class of protocol data.
Definition: protocol_data.h:44
void UpdateData(uint8_t *data) override
uint32_t GetPeriod() const override
Definition: pc_eps_204.h:26
static const int32_t ID
Definition: pc_eps_204.h:29
The class of ProtocolData.
Pceps204 * set_pc_steerenable(Pc_eps_204::Pc_steerenableType pc_steerenable)
Pceps204 * set_pc_steerangreq(double pc_steerangreq)
Pceps204 * set_pc_steerspdreq(int pc_steerspdreq)