Apollo  6.0
Open source self driving car software
scu_bcs_1_306.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  Scubcs1306();
31  void Parse(const std::uint8_t* bytes, int32_t length,
32  ChassisDetail* chassis) const override;
33 
34  private:
35  // config detail: {'description': 'VDC active status', 'enum': {0:
36  // 'BCS_AEBAVAILABLE_UNAVAILABLE', 1: 'BCS_AEBAVAILABLE_AVAILABLE'},
37  // 'precision': 1.0, 'len': 1, 'name': 'BCS_AEBAvailable', 'is_signed_var':
38  // False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 17, 'type': 'enum',
39  // 'order': 'motorola', 'physical_unit': ''}
40  Scu_bcs_1_306::Bcs_aebavailableType bcs_aebavailable(
41  const std::uint8_t* bytes, const int32_t length) const;
42 
43  // config detail: {'description': 'VDC active status', 'enum': {0:
44  // 'BCS_CDDAVAILABLE_UNAVAILABLE', 1: 'BCS_CDDAVAILABLE_AVAILABLE'},
45  // 'precision': 1.0, 'len': 1, 'name': 'BCS_CDDAvailable', 'is_signed_var':
46  // False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 16, 'type': 'enum',
47  // 'order': 'motorola', 'physical_unit': ''}
48  Scu_bcs_1_306::Bcs_cddavailableType bcs_cddavailable(
49  const std::uint8_t* bytes, const int32_t length) const;
50 
51  // config detail: {'description': 'Actual brake pedal position', 'offset':
52  // 0.0, 'precision': 0.1, 'len': 10, 'name': 'BCS_BrkPedAct', 'is_signed_var':
53  // False, 'physical_range': '[0|100]', 'bit': 15, 'type': 'double', 'order':
54  // 'motorola', 'physical_unit': '%'}
55  double bcs_brkpedact(const std::uint8_t* bytes, const int32_t length) const;
56 
57  // config detail: {'description': 'BCS interrupt index', 'enum': {0:
58  // 'BCS_INTIDX_NOINT', 1: 'BCS_INTIDX_OVERFLOW', 2: 'BCS_INTIDX_TIMEOUT', 3:
59  // 'BCS_INTIDX_ACCPEDINT', 4: 'BCS_INTIDX_BRKPEDINT', 5:
60  // 'BCS_INTIDX_GEARINT'}, 'precision': 1.0, 'len': 3, 'name': 'BCS_IntIdx',
61  // 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|7]', 'bit':
62  // 21, 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
63  Scu_bcs_1_306::Bcs_intidxType bcs_intidx(const std::uint8_t* bytes,
64  const int32_t length) const;
65 
66  // config detail: {'description': 'VDC fault status', 'enum': {0:
67  // 'BCS_VDCFAULTST_NORMAL', 1: 'BCS_VDCFAULTST_FAULT'}, 'precision': 1.0,
68  // 'len': 1, 'name': 'BCS_VDCFaultSt', 'is_signed_var': False, 'offset': 0.0,
69  // 'physical_range': '[0|1]', 'bit': 1, 'type': 'enum', 'order': 'motorola',
70  // 'physical_unit': ''}
71  Scu_bcs_1_306::Bcs_vdcfaultstType bcs_vdcfaultst(const std::uint8_t* bytes,
72  const int32_t length) const;
73 
74  // config detail: {'description': 'VDC active status', 'enum': {0:
75  // 'BCS_VDCACTIVEST_INACTIVE', 1: 'BCS_VDCACTIVEST_ACTIVE'}, 'precision': 1.0,
76  // 'len': 1, 'name': 'BCS_VDCActiveSt', 'is_signed_var': False, 'offset': 0.0,
77  // 'physical_range': '[0|1]', 'bit': 2, 'type': 'enum', 'order': 'motorola',
78  // 'physical_unit': ''}
79  Scu_bcs_1_306::Bcs_vdcactivestType bcs_vdcactivest(
80  const std::uint8_t* bytes, const int32_t length) const;
81 
82  // config detail: {'description': 'ABS fault status', 'enum': {0:
83  // 'BCS_ABSFAULTST_NORMAL', 1: 'BCS_ABSFAULTST_FAULT'}, 'precision': 1.0,
84  // 'len': 1, 'name': 'BCS_ABSFaultSt', 'is_signed_var': False, 'offset': 0.0,
85  // 'physical_range': '[0|1]', 'bit': 3, 'type': 'enum', 'order': 'motorola',
86  // 'physical_unit': ''}
87  Scu_bcs_1_306::Bcs_absfaultstType bcs_absfaultst(const std::uint8_t* bytes,
88  const int32_t length) const;
89 
90  // config detail: {'description': 'ABS active status', 'enum': {0:
91  // 'BCS_ABSACTIVEST_INACTIVE', 1: 'BCS_ABSACTIVEST_ACTIVE'}, 'precision': 1.0,
92  // 'len': 1, 'name': 'BCS_ABSActiveSt', 'is_signed_var': False, 'offset': 0.0,
93  // 'physical_range': '[0|1]', 'bit': 4, 'type': 'enum', 'order': 'motorola',
94  // 'physical_unit': ''}
95  Scu_bcs_1_306::Bcs_absactivestType bcs_absactivest(
96  const std::uint8_t* bytes, const int32_t length) const;
97 
98  // config detail: {'description': 'BCS fault status', 'enum': {0:
99  // 'BCS_FAULTST_NORMAL', 1: 'BCS_FAULTST_FAULT'}, 'precision': 1.0, 'len': 1,
100  // 'name': 'BCS_FaultSt', 'is_signed_var': False, 'offset': 0.0,
101  // 'physical_range': '[0|1]', 'bit': 5, 'type': 'enum', 'order': 'motorola',
102  // 'physical_unit': ''}
103  Scu_bcs_1_306::Bcs_faultstType bcs_faultst(const std::uint8_t* bytes,
104  const int32_t length) const;
105 
106  // config detail: {'description': 'BCS drive mode', 'enum': {0:
107  // 'BCS_DRVMODE_INVALID', 1: 'BCS_DRVMODE_MANUAL', 2: 'BCS_DRVMODE_INTERRUPT',
108  // 3: 'BCS_DRVMODE_AUTO'}, 'precision': 1.0, 'len': 2, 'name': 'BCS_DrvMode',
109  // 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|3]', 'bit': 7,
110  // 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
111  Scu_bcs_1_306::Bcs_drvmodeType bcs_drvmode(const std::uint8_t* bytes,
112  const int32_t length) const;
113 };
114 
115 } // namespace ge3
116 } // namespace canbus
117 } // namespace apollo
static const int32_t ID
Definition: scu_bcs_1_306.h:29
void Parse(const std::uint8_t *bytes, int32_t length, ChassisDetail *chassis) const override
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
Definition: scu_bcs_1_306.h:26
The class of ProtocolData.