Apollo  6.0
Open source self driving car software
steering_report_502.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2020 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 devkit {
25 
27  ::apollo::canbus::ChassisDetail> {
28  public:
29  static const int32_t ID;
31  void Parse(const std::uint8_t* bytes, int32_t length,
32  ChassisDetail* chassis) const override;
33 
34  private:
35  // config detail: {'bit': 55, 'is_signed_var': False, 'len': 8, 'name':
36  // 'Steer_ANGLE_SPD_Actual', 'offset': 0.0, 'order': 'motorola',
37  // 'physical_range': '[0|0]', 'physical_unit': 'deg/s', 'precision': 1.0,
38  // 'type': 'int'}
39  int steer_angle_spd_actual(const std::uint8_t* bytes,
40  const int32_t length) const;
41 
42  // config detail: {'bit': 23, 'description': 'Steer system communication
43  // fault', 'enum': {0: 'STEER_FLT2_NO_FAULT', 1:
44  // 'STEER_FLT2_STEER_SYSTEM_COMUNICATION_FAULT'}, 'is_signed_var': False,
45  // 'len': 8, 'name': 'Steer_FLT2', 'offset': 0.0, 'order': 'motorola',
46  // 'physical_range': '[0|255]', 'physical_unit': '', 'precision': 1.0, 'type':
47  // 'enum'}
48  Steering_report_502::Steer_flt2Type steer_flt2(const std::uint8_t* bytes,
49  const int32_t length) const;
50 
51  // config detail: {'bit': 15, 'description': 'Steer system hardware fault',
52  // 'enum': {0: 'STEER_FLT1_NO_FAULT', 1:
53  // 'STEER_FLT1_STEER_SYSTEM_HARDWARE_FAULT'}, 'is_signed_var': False, 'len':
54  // 8, 'name': 'Steer_FLT1', 'offset': 0.0, 'order': 'motorola',
55  // 'physical_range': '[0|255]', 'physical_unit': '', 'precision': 1.0, 'type':
56  // 'enum'}
57  Steering_report_502::Steer_flt1Type steer_flt1(const std::uint8_t* bytes,
58  const int32_t length) const;
59 
60  // config detail: {'bit': 1, 'enum': {0: 'STEER_EN_STATE_MANUAL', 1:
61  // 'STEER_EN_STATE_AUTO', 2: 'STEER_EN_STATE_TAKEOVER', 3:
62  // 'STEER_EN_STATE_STANDBY'}, 'is_signed_var': False, 'len': 2, 'name':
63  // 'Steer_EN_state', 'offset': 0.0, 'order': 'motorola', 'physical_range':
64  // '[0|2]', 'physical_unit': '', 'precision': 1.0, 'type': 'enum'}
65  Steering_report_502::Steer_en_stateType steer_en_state(
66  const std::uint8_t* bytes, const int32_t length) const;
67 
68  // config detail: {'bit': 31, 'is_signed_var': False, 'len': 16, 'name':
69  // 'Steer_ANGLE_Actual', 'offset': -500.0, 'order': 'motorola',
70  // 'physical_range': '[-500|500]', 'physical_unit': 'deg', 'precision': 1.0,
71  // 'type': 'int'}
72  int steer_angle_actual(const std::uint8_t* bytes, const int32_t length) const;
73 };
74 
75 } // namespace devkit
76 } // namespace canbus
77 } // namespace apollo
Definition: steering_report_502.h:26
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
void Parse(const std::uint8_t *bytes, int32_t length, ChassisDetail *chassis) const override
static const int32_t ID
Definition: steering_report_502.h:29
This is the base class of protocol data.
Definition: protocol_data.h:44
The class of ProtocolData.