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"
20
#include "
modules/drivers/canbus/can_comm/protocol_data.h
"
21
22
namespace
apollo
{
23
namespace
canbus {
24
namespace
ge3 {
25
26
class
Pcepb203
:
public
::apollo::drivers::canbus::ProtocolData
<
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': ''}
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
apollo::canbus::ge3::Pcepb203
Definition
pc_epb_203.h:27
apollo::canbus::ge3::Pcepb203::UpdateData
void UpdateData(uint8_t *data) override
Definition
pc_epb_203.cc:37
apollo::canbus::ge3::Pcepb203::set_pc_epbenable
Pcepb203 * set_pc_epbenable(Pc_epb_203::Pc_epbenableType pc_epbenable)
Definition
pc_epb_203.cc:66
apollo::canbus::ge3::Pcepb203::Pcepb203
Pcepb203()
Definition
pc_epb_203.cc:29
apollo::canbus::ge3::Pcepb203::Reset
void Reset() override
Definition
pc_epb_203.cc:42
apollo::canbus::ge3::Pcepb203::GetPeriod
uint32_t GetPeriod() const override
Definition
pc_epb_203.cc:31
apollo::canbus::ge3::Pcepb203::ID
static const int32_t ID
Definition
pc_epb_203.h:29
apollo::canbus::ge3::Pcepb203::set_pc_epbreq
Pcepb203 * set_pc_epbreq(Pc_epb_203::Pc_epbreqType pc_epbreq)
Definition
pc_epb_203.cc:48
apollo::drivers::canbus::ProtocolData
This is the base class of protocol data.
Definition
protocol_data.h:44
apollo
class register implement
Definition
arena_queue.h:37
protocol_data.h
The class of ProtocolData
apollo::canbus::Pc_epb_203::Pc_epbenableType
Pc_epbenableType
Definition
ge3.proto:142
apollo::canbus::Pc_epb_203::Pc_epbreqType
Pc_epbreqType
Definition
ge3.proto:137
modules
canbus_vehicle
ge3
protocol
pc_epb_203.h