Apollo  6.0
Open source self driving car software
scu_bcs_3_308.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  Scubcs3308();
31  void Parse(const std::uint8_t* bytes, int32_t length,
32  ChassisDetail* chassis) const override;
33 
34  private:
35  // config detail: {'description': 'Rear right wheel speed valid data', 'enum':
36  // {0: 'BCS_RRWHEELSPDVD_INVALID', 1: 'BCS_RRWHEELSPDVD_VALID'},
37  // 'precision': 1.0, 'len': 1, 'name': 'BCS_RRWheelSpdVD', 'is_signed_var':
38  // False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 57, 'type': 'enum',
39  // 'order': 'motorola', 'physical_unit': '-'}
40  Scu_bcs_3_308::Bcs_rrwheelspdvdType bcs_rrwheelspdvd(
41  const std::uint8_t* bytes, const int32_t length) const;
42 
43  // config detail: {'description': 'Rear right wheel speed direction valid
44  // data', 'enum': {0: 'BCS_RRWHEELDIRECTIONVD_INVALID', 1:
45  // 'BCS_RRWHEELDIRECTIONVD_VALID'}, 'precision': 1.0, 'len': 1, 'name':
46  // 'BCS_RRWheelDirectionVD', 'is_signed_var': False, 'offset': 0.0,
47  // 'physical_range': '[0|1]', 'bit': 58, 'type': 'enum', 'order': 'motorola',
48  // 'physical_unit': '-'}
49  Scu_bcs_3_308::Bcs_rrwheeldirectionvdType bcs_rrwheeldirectionvd(
50  const std::uint8_t* bytes, const int32_t length) const;
51 
52  // config detail: {'description': 'Rear left wheel speed valid data', 'enum':
53  // {0: 'BCS_RLWHEELSPDVD_INVALID', 1: 'BCS_RLWHEELSPDVD_VALID'},
54  // 'precision': 1.0, 'len': 1, 'name': 'BCS_RLWheelSpdVD', 'is_signed_var':
55  // False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 41, 'type': 'enum',
56  // 'order': 'motorola', 'physical_unit': '-'}
57  Scu_bcs_3_308::Bcs_rlwheelspdvdType bcs_rlwheelspdvd(
58  const std::uint8_t* bytes, const int32_t length) const;
59 
60  // config detail: {'description': 'Rear left wheel speed direction valid
61  // data', 'enum': {0: 'BCS_RLWHEELDIRECTIONVD_INVALID', 1:
62  // 'BCS_RLWHEELDIRECTIONVD_VALID'}, 'precision': 1.0, 'len': 1, 'name':
63  // 'BCS_RLWheelDirectionVD', 'is_signed_var': False, 'offset': 0.0,
64  // 'physical_range': '[0|1]', 'bit': 42, 'type': 'enum', 'order': 'motorola',
65  // 'physical_unit': '-'}
66  Scu_bcs_3_308::Bcs_rlwheeldirectionvdType bcs_rlwheeldirectionvd(
67  const std::uint8_t* bytes, const int32_t length) const;
68 
69  // config detail: {'description': 'Front right wheel speed valid data',
70  // 'enum': {0: 'BCS_FRWHEELSPDVD_INVALID', 1: 'BCS_FRWHEELSPDVD_VALID'},
71  // 'precision': 1.0, 'len': 1, 'name': 'BCS_FRWheelSpdVD', 'is_signed_var':
72  // False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 25, 'type': 'enum',
73  // 'order': 'motorola', 'physical_unit': '-'}
74  Scu_bcs_3_308::Bcs_frwheelspdvdType bcs_frwheelspdvd(
75  const std::uint8_t* bytes, const int32_t length) const;
76 
77  // config detail: {'description': 'Front right wheel speed direction valid
78  // data', 'enum': {0: 'BCS_FRWHEELDIRECTIONVD_INVALID', 1:
79  // 'BCS_FRWHEELDIRECTIONVD_VALID'}, 'precision': 1.0, 'len': 1, 'name':
80  // 'BCS_FRWheelDirectionVD', 'is_signed_var': False, 'offset': 0.0,
81  // 'physical_range': '[0|1]', 'bit': 26, 'type': 'enum', 'order': 'motorola',
82  // 'physical_unit': '-'}
83  Scu_bcs_3_308::Bcs_frwheeldirectionvdType bcs_frwheeldirectionvd(
84  const std::uint8_t* bytes, const int32_t length) const;
85 
86  // config detail: {'description': 'Front left wheel speed valid data', 'enum':
87  // {0: 'BCS_FLWHEELSPDVD_INVALID', 1: 'BCS_FLWHEELSPDVD_VALID'},
88  // 'precision': 1.0, 'len': 1, 'name': 'BCS_FLWheelSpdVD', 'is_signed_var':
89  // False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 9, 'type': 'enum',
90  // 'order': 'motorola', 'physical_unit': '-'}
91  Scu_bcs_3_308::Bcs_flwheelspdvdType bcs_flwheelspdvd(
92  const std::uint8_t* bytes, const int32_t length) const;
93 
94  // config detail: {'description': 'Front left wheel speed direction valid
95  // data', 'enum': {0: 'BCS_FLWHEELDIRECTIONVD_INVALID', 1:
96  // 'BCS_FLWHEELDIRECTIONVD_VALID'}, 'precision': 1.0, 'len': 1, 'name':
97  // 'BCS_FLWheelDirectionVD', 'is_signed_var': False, 'offset': 0.0,
98  // 'physical_range': '[0|1]', 'bit': 10, 'type': 'enum', 'order': 'motorola',
99  // 'physical_unit': '-'}
100  Scu_bcs_3_308::Bcs_flwheeldirectionvdType bcs_flwheeldirectionvd(
101  const std::uint8_t* bytes, const int32_t length) const;
102 
103  // config detail: {'description': 'Rear right wheel speed', 'offset': 0.0,
104  // 'precision': 0.05625, 'len': 13, 'name': 'BCS_RRWheelSpd', 'is_signed_var':
105  // False, 'physical_range': '[0|240]', 'bit': 55, 'type': 'double', 'order':
106  // 'motorola', 'physical_unit': 'km/h'}
107  double bcs_rrwheelspd(const std::uint8_t* bytes, const int32_t length) const;
108 
109  // config detail: {'description': 'Rear right wheel speed direction', 'enum':
110  // {0: 'BCS_RRWHEELDIRECTION_FORWARD', 1: 'BCS_RRWHEELDIRECTION_BACKWARD'},
111  // 'precision': 1.0, 'len': 1, 'name': 'BCS_RRWheelDirection',
112  // 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit':
113  // 56, 'type': 'enum', 'order': 'motorola', 'physical_unit': '-'}
114  Scu_bcs_3_308::Bcs_rrwheeldirectionType bcs_rrwheeldirection(
115  const std::uint8_t* bytes, const int32_t length) const;
116 
117  // config detail: {'description': 'Rear left wheel speed', 'offset': 0.0,
118  // 'precision': 0.05625, 'len': 13, 'name': 'BCS_RLWheelSpd', 'is_signed_var':
119  // False, 'physical_range': '[0|240]', 'bit': 39, 'type': 'double', 'order':
120  // 'motorola', 'physical_unit': 'km/h'}
121  double bcs_rlwheelspd(const std::uint8_t* bytes, const int32_t length) const;
122 
123  // config detail: {'description': 'Rear left wheel speed direction', 'enum':
124  // {0: 'BCS_RLWHEELDIRECTION_FORWARD', 1: 'BCS_RLWHEELDIRECTION_BACKWARD'},
125  // 'precision': 1.0, 'len': 1, 'name': 'BCS_RLWheelDirection',
126  // 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit':
127  // 40, 'type': 'enum', 'order': 'motorola', 'physical_unit': '-'}
128  Scu_bcs_3_308::Bcs_rlwheeldirectionType bcs_rlwheeldirection(
129  const std::uint8_t* bytes, const int32_t length) const;
130 
131  // config detail: {'description': 'Front right wheel speed', 'offset': 0.0,
132  // 'precision': 0.05625, 'len': 13, 'name': 'BCS_FRWheelSpd', 'is_signed_var':
133  // False, 'physical_range': '[0|240]', 'bit': 23, 'type': 'double', 'order':
134  // 'motorola', 'physical_unit': 'km/h'}
135  double bcs_frwheelspd(const std::uint8_t* bytes, const int32_t length) const;
136 
137  // config detail: {'description': 'Front right wheel speed direction', 'enum':
138  // {0: 'BCS_FRWHEELDIRECTION_FORWARD', 1: 'BCS_FRWHEELDIRECTION_BACKWARD'},
139  // 'precision': 1.0, 'len': 1, 'name': 'BCS_FRWheelDirection',
140  // 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit':
141  // 24, 'type': 'enum', 'order': 'motorola', 'physical_unit': '-'}
142  Scu_bcs_3_308::Bcs_frwheeldirectionType bcs_frwheeldirection(
143  const std::uint8_t* bytes, const int32_t length) const;
144 
145  // config detail: {'description': 'Front left wheel speed', 'offset': 0.0,
146  // 'precision': 0.05625, 'len': 13, 'name': 'BCS_FLWheelSpd', 'is_signed_var':
147  // False, 'physical_range': '[0|240]', 'bit': 7, 'type': 'double', 'order':
148  // 'motorola', 'physical_unit': 'km/h'}
149  double bcs_flwheelspd(const std::uint8_t* bytes, const int32_t length) const;
150 
151  // config detail: {'description': 'Front left wheel speed direction', 'enum':
152  // {0: 'BCS_FLWHEELDIRECTION_FORWARD', 1: 'BCS_FLWHEELDIRECTION_BACKWARD'},
153  // 'precision': 1.0, 'len': 1, 'name': 'BCS_FLWheelDirection',
154  // 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 8,
155  // 'type': 'enum', 'order': 'motorola', 'physical_unit': '-'}
156  Scu_bcs_3_308::Bcs_flwheeldirectionType bcs_flwheeldirection(
157  const std::uint8_t* bytes, const int32_t length) const;
158 };
159 
160 } // namespace ge3
161 } // namespace canbus
162 } // namespace apollo
Definition: scu_bcs_3_308.h:26
static const int32_t ID
Definition: scu_bcs_3_308.h:29
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
The class of ProtocolData.
void Parse(const std::uint8_t *bytes, int32_t length, ChassisDetail *chassis) const override