Apollo  6.0
Open source self driving car software
scu_epb_310.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  Scuepb310();
31  void Parse(const std::uint8_t* bytes, int32_t length,
32  ChassisDetail* chassis) const override;
33 
34  private:
35  // config detail: {'description': 'EPS interrupt index', 'enum': {0:
36  // 'EPB_INTIDX_NOINT', 1: 'EPB_INTIDX_OVERFLOW', 2: 'EPB_INTIDX_TIMEOUT'},
37  // 'precision': 1.0, 'len': 3, 'name': 'EPB_IntIdx', 'is_signed_var': False,
38  // 'offset': 0.0, 'physical_range': '[0|7]', 'bit': 10, 'type': 'enum',
39  // 'order': 'motorola', 'physical_unit': ''}
40  Scu_epb_310::Epb_intidxType epb_intidx(const std::uint8_t* bytes,
41  const int32_t length) const;
42 
43  // config detail: {'description': 'EPB drive mode', 'enum': {0:
44  // 'EPB_DRVMODE_INVALID', 1: 'EPB_DRVMODE_MANUAL', 2: 'EPB_DRVMODE_INTERRUPT',
45  // 3: 'EPB_DRVMODE_AUTO'}, 'precision': 1.0, 'len': 2, 'name': 'EPB_DrvMode',
46  // 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|3]', 'bit': 6,
47  // 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
48  Scu_epb_310::Epb_drvmodeType epb_drvmode(const std::uint8_t* bytes,
49  const int32_t length) const;
50 
51  // config detail: {'description': 'EPB system status', 'enum': {0:
52  // 'EPB_SYSST_RELEASED', 1: 'EPB_SYSST_APPLIED', 2: 'EPB_SYSST_RELEASING', 3:
53  // 'EPB_SYSST_FAULT', 4: 'EPB_SYSST_APPLYING', 5: 'EPB_SYSST_DISENGAGED'},
54  // 'precision': 1.0, 'len': 3, 'name': 'EPB_SysSt', 'is_signed_var': False,
55  // 'offset': 0.0, 'physical_range': '[0|7]', 'bit': 2, 'type': 'enum',
56  // 'order': 'motorola', 'physical_unit': ''}
57  Scu_epb_310::Epb_sysstType epb_sysst(const std::uint8_t* bytes,
58  const int32_t length) const;
59 
60  // config detail: {'description': 'EPB fault status', 'enum': {0:
61  // 'EPB_FAULTST_NORMAL', 1: 'EPB_FAULTST_FAULT'}, 'precision': 1.0, 'len': 1,
62  // 'name': 'EPB_FaultSt', 'is_signed_var': False, 'offset': 0.0,
63  // 'physical_range': '[0|1]', 'bit': 7, 'type': 'enum', 'order': 'motorola',
64  // 'physical_unit': ''}
65  Scu_epb_310::Epb_faultstType epb_faultst(const std::uint8_t* bytes,
66  const int32_t length) const;
67 };
68 
69 } // namespace ge3
70 } // namespace canbus
71 } // 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
Definition: scu_epb_310.h:26
static const int32_t ID
Definition: scu_epb_310.h:29
The class of ProtocolData.
void Parse(const std::uint8_t *bytes, int32_t length, ChassisDetail *chassis) const override