Apollo
10.0
自动驾驶开放平台
shift_rpt_228.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/lexus/proto/lexus.pb.h"
20
#include "
modules/drivers/canbus/can_comm/protocol_data.h
"
21
22
namespace
apollo
{
23
namespace
canbus {
24
namespace
lexus {
25
26
class
Shiftrpt228
:
public
::apollo::drivers::canbus::ProtocolData
<
27
::apollo::canbus::Lexus> {
28
public
:
29
static
const
int32_t
ID
;
30
Shiftrpt228
();
31
void
Parse
(
const
std::uint8_t* bytes, int32_t length,
32
Lexus
* chassis)
const override
;
33
34
private
:
35
// config detail: {'name': 'VEHICLE_FAULT', 'offset': 0.0, 'precision': 1.0,
36
// 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 6,
37
// 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
38
bool
vehicle_fault(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
39
40
// config detail: {'name': 'PACMOD_FAULT', 'offset': 0.0, 'precision': 1.0,
41
// 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 5,
42
// 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
43
bool
pacmod_fault(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
44
45
// config detail: {'name': 'OVERRIDE_ACTIVE', 'offset': 0.0, 'precision': 1.0,
46
// 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 1,
47
// 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
48
bool
override_active(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
49
50
// config detail: {'name': 'OUTPUT_REPORTED_FAULT', 'offset': 0.0,
51
// 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
52
// '[0|1]', 'bit': 4, 'type': 'bool', 'order': 'motorola', 'physical_unit':
53
// ''}
54
bool
output_reported_fault(
const
std::uint8_t* bytes,
55
const
int32_t length)
const
;
56
57
// config detail: {'name': 'INPUT_OUTPUT_FAULT', 'offset': 0.0,
58
// 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
59
// '[0|1]', 'bit': 3, 'type': 'bool', 'order': 'motorola', 'physical_unit':
60
// ''}
61
bool
input_output_fault(
const
std::uint8_t* bytes,
62
const
int32_t length)
const
;
63
64
// config detail: {'name': 'ENABLED', 'offset': 0.0, 'precision': 1.0, 'len':
65
// 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 0, 'type':
66
// 'bool', 'order': 'motorola', 'physical_unit': ''}
67
bool
enabled(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
68
69
// config detail: {'name': 'COMMAND_OUTPUT_FAULT', 'offset': 0.0,
70
// 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
71
// '[0|1]', 'bit': 2, 'type': 'bool', 'order': 'motorola', 'physical_unit':
72
// ''}
73
bool
command_output_fault(
const
std::uint8_t* bytes,
74
const
int32_t length)
const
;
75
76
// config detail: {'name': 'MANUAL_INPUT', 'enum': {0: 'MANUAL_INPUT_PARK', 1:
77
// 'MANUAL_INPUT_REVERSE', 2: 'MANUAL_INPUT_NEUTRAL', 3:
78
// 'MANUAL_INPUT_FORWARD_HIGH', 4: 'MANUAL_INPUT_LOW', 5:
79
// 'MANUAL_INPUT_BETWEEN_GEARS', 6: 'MANUAL_INPUT_ERROR', 7:
80
// 'MANUAL_INPUT_NONE'}, 'precision': 1.0, 'len': 8, 'is_signed_var': False,
81
// 'offset': 0.0, 'physical_range': '[0|4]', 'bit': 15, 'type': 'enum',
82
// 'order': 'motorola', 'physical_unit': ''}
83
Shift_rpt_228::Manual_inputType
manual_input(
const
std::uint8_t* bytes,
84
const
int32_t length)
const
;
85
86
// config detail: {'name': 'COMMANDED_VALUE', 'enum': {0:
87
// 'COMMANDED_VALUE_PARK', 1: 'COMMANDED_VALUE_REVERSE', 2:
88
// 'COMMANDED_VALUE_NEUTRAL', 3: 'COMMANDED_VALUE_FORWARD_HIGH', 4:
89
// 'COMMANDED_VALUE_LOW', 7: 'COMMANDED_VALUE_NONE'}, 'precision': 1.0, 'len':
90
// 8, 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|4]', 'bit':
91
// 23, 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
92
Shift_rpt_228::Commanded_valueType
commanded_value(
93
const
std::uint8_t* bytes,
const
int32_t length)
const
;
94
95
// config detail: {'name': 'OUTPUT_VALUE', 'enum': {0: 'OUTPUT_VALUE_PARK', 1:
96
// 'OUTPUT_VALUE_REVERSE', 2: 'OUTPUT_VALUE_NEUTRAL', 3:
97
// 'OUTPUT_VALUE_FORWARD_HIGH', 4: 'OUTPUT_VALUE_LOW', 5:
98
// 'OUTPUT_VALUE_BETWEEN_GEARS', 6: 'OUTPUT_VALUE_ERROR', 7:
99
// 'OUTPUT_VALUE_NONE'}, 'precision': 1.0, 'len': 8, 'is_signed_var': False,
100
// 'offset': 0.0, 'physical_range': '[0|4]', 'bit': 31, 'type': 'enum',
101
// 'order': 'motorola', 'physical_unit': ''}
102
Shift_rpt_228::Output_valueType
output_value(
const
std::uint8_t* bytes,
103
const
int32_t length)
const
;
104
};
105
106
}
// namespace lexus
107
}
// namespace canbus
108
}
// namespace apollo
apollo::canbus::lexus::Shiftrpt228
Definition
shift_rpt_228.h:27
apollo::canbus::lexus::Shiftrpt228::ID
static const int32_t ID
Definition
shift_rpt_228.h:29
apollo::canbus::lexus::Shiftrpt228::Parse
void Parse(const std::uint8_t *bytes, int32_t length, Lexus *chassis) const override
Definition
shift_rpt_228.cc:33
apollo::canbus::lexus::Shiftrpt228::Shiftrpt228
Shiftrpt228()
Definition
shift_rpt_228.cc:30
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::Lexus
Definition
lexus.proto:1278
apollo::canbus::Shift_rpt_228::Output_valueType
Output_valueType
Definition
lexus.proto:933
apollo::canbus::Shift_rpt_228::Manual_inputType
Manual_inputType
Definition
lexus.proto:915
apollo::canbus::Shift_rpt_228::Commanded_valueType
Commanded_valueType
Definition
lexus.proto:925
modules
canbus_vehicle
lexus
protocol
shift_rpt_228.h