Apollo
10.0
自动驾驶开放平台
global_rpt_6a.h
浏览该文件的文档.
1
/******************************************************************************
2
* Copyright 2018 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/gem/proto/gem.pb.h"
20
#include "
modules/drivers/canbus/can_comm/protocol_data.h
"
21
22
namespace
apollo
{
23
namespace
canbus {
24
namespace
gem {
25
26
class
Globalrpt6a
:
public
::apollo::drivers::canbus::ProtocolData
<
27
::apollo::canbus::Gem> {
28
public
:
29
static
const
int32_t
ID
;
30
Globalrpt6a
();
31
void
Parse
(
const
std::uint8_t* bytes, int32_t length,
32
Gem
* chassis)
const override
;
33
34
private
:
35
// config detail: {'name': 'PACMOD_STATUS', 'enum': {0:
36
// 'PACMOD_STATUS_CONTROL_DISABLED', 1: 'PACMOD_STATUS_CONTROL_ENABLED'},
37
// 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'offset': 0.0,
38
// 'physical_range': '[0|1]', 'bit': 0, 'type': 'enum', 'order': 'motorola',
39
// 'physical_unit': ''}
40
Global_rpt_6a::Pacmod_statusType
pacmod_status(
const
std::uint8_t* bytes,
41
const
int32_t length)
const
;
42
43
// config detail: {'name': 'OVERRIDE_STATUS', 'enum': {0:
44
// 'OVERRIDE_STATUS_NOT_OVERRIDDEN', 1: 'OVERRIDE_STATUS_OVERRIDDEN'},
45
// 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'offset': 0.0,
46
// 'physical_range': '[0|1]', 'bit': 1, 'type': 'enum', 'order': 'motorola',
47
// 'physical_unit': ''}
48
Global_rpt_6a::Override_statusType
override_status(
49
const
std::uint8_t* bytes,
const
int32_t length)
const
;
50
51
// config detail: {'name': 'VEH_CAN_TIMEOUT', 'offset': 0.0, 'precision': 1.0,
52
// 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 2,
53
// 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
54
bool
veh_can_timeout(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
55
56
// config detail: {'name': 'STR_CAN_TIMEOUT', 'offset': 0.0, 'precision': 1.0,
57
// 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 3,
58
// 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
59
bool
str_can_timeout(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
60
61
// config detail: {'name': 'BRK_CAN_TIMEOUT', 'enum': {0:
62
// 'BRK_CAN_TIMEOUT_NO_ACTIVE_CAN_TIMEOUT', 1:
63
// 'BRK_CAN_TIMEOUT_ACTIVE_CAN_TIMEOUT'}, 'precision': 1.0, 'len': 1,
64
// 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 4,
65
// 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
66
Global_rpt_6a::Brk_can_timeoutType
brk_can_timeout(
67
const
std::uint8_t* bytes,
const
int32_t length)
const
;
68
69
// config detail: {'name': 'USR_CAN_TIMEOUT', 'offset': 0.0, 'precision': 1.0,
70
// 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 5,
71
// 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
72
bool
usr_can_timeout(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
73
74
// config detail: {'name': 'USR_CAN_READ_ERRORS', 'offset': 0.0,
75
// 'precision': 1.0, 'len': 16, 'is_signed_var': False, 'physical_range':
76
// '[0|65535]', 'bit': 55, 'type': 'int', 'order': 'motorola',
77
// 'physical_unit': ''}
78
int
usr_can_read_errors(
const
std::uint8_t* bytes,
79
const
int32_t length)
const
;
80
};
81
82
}
// namespace gem
83
}
// namespace canbus
84
}
// namespace apollo
apollo::canbus::gem::Globalrpt6a
Definition
global_rpt_6a.h:27
apollo::canbus::gem::Globalrpt6a::Parse
void Parse(const std::uint8_t *bytes, int32_t length, Gem *chassis) const override
Definition
global_rpt_6a.cc:33
apollo::canbus::gem::Globalrpt6a::Globalrpt6a
Globalrpt6a()
Definition
global_rpt_6a.cc:30
apollo::canbus::gem::Globalrpt6a::ID
static const int32_t ID
Definition
global_rpt_6a.h:29
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::Gem
Definition
gem.proto:470
apollo::canbus::Global_rpt_6a::Pacmod_statusType
Pacmod_statusType
Definition
gem.proto:10
apollo::canbus::Global_rpt_6a::Brk_can_timeoutType
Brk_can_timeoutType
Definition
gem.proto:18
apollo::canbus::Global_rpt_6a::Override_statusType
Override_statusType
Definition
gem.proto:14
modules
canbus_vehicle
gem
protocol
global_rpt_6a.h