Apollo  6.0
Open source self driving car software
pc_epb_203.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 
31  Pcepb203();
32 
33  uint32_t GetPeriod() const override;
34 
35  void UpdateData(uint8_t* data) override;
36 
37  void Reset() override;
38 
39  // config detail: {'description': 'EPB request', 'enum': {0:
40  // 'PC_EPBREQ_INVALID', 1: 'PC_EPBREQ_RELEASE', 2: 'PC_EPBREQ_APPLY'},
41  // 'precision': 1.0, 'len': 2, 'name': 'PC_EpbReq', 'is_signed_var': False,
42  // 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 1, 'type': 'enum',
43  // 'order': 'motorola', 'physical_unit': ''}
44  Pcepb203* set_pc_epbreq(Pc_epb_203::Pc_epbreqType pc_epbreq);
45 
46  // config detail: {'description': 'EPB control enable', 'enum': {0:
47  // 'PC_EPBENABLE_DISABLE', 1: 'PC_EPBENABLE_ENABLE'}, 'precision': 1.0, 'len':
48  // 1, 'name': 'PC_EpbEnable', 'is_signed_var': False, 'offset': 0.0,
49  // 'physical_range': '[0|1]', 'bit': 7, 'type': 'enum', 'order': 'motorola',
50  // 'physical_unit': ''}
51  Pcepb203* set_pc_epbenable(Pc_epb_203::Pc_epbenableType pc_epbenable);
52 
53  private:
54  // config detail: {'description': 'EPB request', 'enum': {0:
55  // 'PC_EPBREQ_INVALID', 1: 'PC_EPBREQ_RELEASE', 2: 'PC_EPBREQ_APPLY'},
56  // 'precision': 1.0, 'len': 2, 'name': 'PC_EpbReq', 'is_signed_var': False,
57  // 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 1, 'type': 'enum',
58  // 'order': 'motorola', 'physical_unit': ''}
59  void set_p_pc_epbreq(uint8_t* data, Pc_epb_203::Pc_epbreqType pc_epbreq);
60 
61  // config detail: {'description': 'EPB control enable', 'enum': {0:
62  // 'PC_EPBENABLE_DISABLE', 1: 'PC_EPBENABLE_ENABLE'}, 'precision': 1.0, 'len':
63  // 1, 'name': 'PC_EpbEnable', 'is_signed_var': False, 'offset': 0.0,
64  // 'physical_range': '[0|1]', 'bit': 7, 'type': 'enum', 'order': 'motorola',
65  // 'physical_unit': ''}
66  void set_p_pc_epbenable(uint8_t* data,
67  Pc_epb_203::Pc_epbenableType pc_epbenable);
68 
69  private:
70  Pc_epb_203::Pc_epbreqType pc_epbreq_;
71  Pc_epb_203::Pc_epbenableType pc_epbenable_;
72 };
73 
74 } // namespace ge3
75 } // namespace canbus
76 } // namespace apollo
Pcepb203 * set_pc_epbreq(Pc_epb_203::Pc_epbreqType pc_epbreq)
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: pc_epb_203.h:29
uint32_t GetPeriod() const override
void UpdateData(uint8_t *data) override
Definition: pc_epb_203.h:26
The class of ProtocolData.
Pcepb203 * set_pc_epbenable(Pc_epb_203::Pc_epbenableType pc_epbenable)