Apollo  6.0
Open source self driving car software
adc_motioncontrollimits1_12.h
Go to the documentation of this file.
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 "gtest/gtest.h"
20 #include "modules/canbus/proto/chassis_detail.pb.h"
22 
23 namespace apollo {
24 namespace canbus {
25 namespace transit {
26 
29  ::apollo::canbus::ChassisDetail> {
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  FRIEND_TEST(Motioncontrollimits1_12_test, General);
42 
43  // config detail: {'description': 'Set limit for throttle position', 'offset':
44  // 0.0, 'precision': 0.5, 'len': 8, 'name': 'ADC_CMD_ThrottleCommandLimit',
45  // 'is_signed_var': False, 'physical_range': '[0|100]', 'bit': 24, 'type':
46  // 'double', 'order': 'intel', 'physical_unit': '%'}
48  double adc_cmd_throttlecommandlimit);
49 
50  // config detail: {'description': 'Set steering rate', 'offset': 0.0,
51  // 'precision': 0.05, 'len': 16, 'name': 'ADC_CMD_SteeringRate',
52  // 'is_signed_var': False, 'physical_range': '[0|3276.75]', 'bit': 0, 'type':
53  // 'double', 'order': 'intel', 'physical_unit': 'deg/s'}
55  double adc_cmd_steeringrate);
56 
57  // config detail: {'description': 'Set limit for steering wheel angle. Applies
58  // in both positive and negative', 'offset': 0.0, 'precision': 5.0, 'len': 8,
59  // 'name': 'ADC_CMD_SteerWheelAngleLimit', 'is_signed_var': False,
60  // 'physical_range': '[0|1275]', 'bit': 16, 'type': 'double', 'order':
61  // 'intel', 'physical_unit': 'deg'}
63  double adc_cmd_steerwheelanglelimit);
64 
65  private:
66  // config detail: {'description': 'Set limit for throttle position', 'offset':
67  // 0.0, 'precision': 0.5, 'len': 8, 'name': 'ADC_CMD_ThrottleCommandLimit',
68  // 'is_signed_var': False, 'physical_range': '[0|100]', 'bit': 24, 'type':
69  // 'double', 'order': 'intel', 'physical_unit': '%'}
70  void set_p_adc_cmd_throttlecommandlimit(uint8_t* data,
71  double adc_cmd_throttlecommandlimit);
72 
73  // config detail: {'description': 'Set steering rate', 'offset': 0.0,
74  // 'precision': 0.05, 'len': 16, 'name': 'ADC_CMD_SteeringRate',
75  // 'is_signed_var': False, 'physical_range': '[0|3276.75]', 'bit': 0, 'type':
76  // 'double', 'order': 'intel', 'physical_unit': 'deg/s'}
77  void set_p_adc_cmd_steeringrate(uint8_t* data, double adc_cmd_steeringrate);
78 
79  // config detail: {'description': 'Set limit for steering wheel angle. Applies
80  // in both positive and negative', 'offset': 0.0, 'precision': 5.0, 'len': 8,
81  // 'name': 'ADC_CMD_SteerWheelAngleLimit', 'is_signed_var': False,
82  // 'physical_range': '[0|1275]', 'bit': 16, 'type': 'double', 'order':
83  // 'intel', 'physical_unit': 'deg'}
84  void set_p_adc_cmd_steerwheelanglelimit(uint8_t* data,
85  double adc_cmd_steerwheelanglelimit);
86 
87  private:
88  double adc_cmd_throttlecommandlimit_;
89  double adc_cmd_steeringrate_;
90  double adc_cmd_steerwheelanglelimit_;
91 };
92 
93 } // namespace transit
94 } // namespace canbus
95 } // 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
static const int32_t ID
Definition: adc_motioncontrollimits1_12.h:31
Definition: adc_motioncontrollimits1_12.h:27
FRIEND_TEST(Motioncontrollimits1_12_test, General)
Adcmotioncontrollimits112 * set_adc_cmd_steerwheelanglelimit(double adc_cmd_steerwheelanglelimit)
Adcmotioncontrollimits112 * set_adc_cmd_throttlecommandlimit(double adc_cmd_throttlecommandlimit)
Adcmotioncontrollimits112 * set_adc_cmd_steeringrate(double adc_cmd_steeringrate)
The class of ProtocolData.