Apollo 10.0
自动驾驶开放平台
pc_epb_203.h
浏览该文件的文档.
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_vehicle/ge3/proto/ge3.pb.h"
21
22namespace apollo {
23namespace canbus {
24namespace ge3 {
25
27 ::apollo::canbus::Ge3> {
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': ''}
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': ''}
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:
71 Pc_epb_203::Pc_epbenableType pc_epbenable_;
72};
73
74} // namespace ge3
75} // namespace canbus
76} // namespace apollo
void UpdateData(uint8_t *data) override
Definition pc_epb_203.cc:37
Pcepb203 * set_pc_epbenable(Pc_epb_203::Pc_epbenableType pc_epbenable)
Definition pc_epb_203.cc:66
uint32_t GetPeriod() const override
Definition pc_epb_203.cc:31
static const int32_t ID
Definition pc_epb_203.h:29
Pcepb203 * set_pc_epbreq(Pc_epb_203::Pc_epbreqType pc_epbreq)
Definition pc_epb_203.cc:48
This is the base class of protocol data.
class register implement
Definition arena_queue.h:37
The class of ProtocolData