Apollo
10.0
自动驾驶开放平台
hazard_lights_rpt_214.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
Hazardlightsrpt214
:
public
::apollo::drivers::canbus::ProtocolData
<
27
::apollo::canbus::Lexus> {
28
public
:
29
static
const
int32_t
ID
;
30
Hazardlightsrpt214
();
31
void
Parse
(
const
std::uint8_t* bytes, int32_t length,
32
Lexus
* chassis)
const override
;
33
34
private
:
35
// config detail: {'name': 'OUTPUT_VALUE', 'offset': 0.0, 'precision': 1.0,
36
// 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 24,
37
// 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
38
bool
output_value(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
39
40
// config detail: {'name': 'COMMANDED_VALUE', 'offset': 0.0, 'precision': 1.0,
41
// 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 16,
42
// 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
43
bool
commanded_value(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
44
45
// config detail: {'name': 'MANUAL_INPUT', 'offset': 0.0, 'precision': 1.0,
46
// 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 8,
47
// 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
48
bool
manual_input(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
49
50
// config detail: {'name': 'VEHICLE_FAULT', 'offset': 0.0, 'precision': 1.0,
51
// 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 6,
52
// 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
53
bool
vehicle_fault(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
54
55
// config detail: {'name': 'PACMOD_FAULT', 'offset': 0.0, 'precision': 1.0,
56
// 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 5,
57
// 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
58
bool
pacmod_fault(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
59
60
// config detail: {'name': 'OVERRIDE_ACTIVE', 'offset': 0.0, 'precision': 1.0,
61
// 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 1,
62
// 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
63
bool
override_active(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
64
65
// config detail: {'name': 'OUTPUT_REPORTED_FAULT', 'offset': 0.0,
66
// 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
67
// '[0|1]', 'bit': 4, 'type': 'bool', 'order': 'motorola', 'physical_unit':
68
// ''}
69
bool
output_reported_fault(
const
std::uint8_t* bytes,
70
const
int32_t length)
const
;
71
72
// config detail: {'name': 'INPUT_OUTPUT_FAULT', 'offset': 0.0,
73
// 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
74
// '[0|1]', 'bit': 3, 'type': 'bool', 'order': 'motorola', 'physical_unit':
75
// ''}
76
bool
input_output_fault(
const
std::uint8_t* bytes,
77
const
int32_t length)
const
;
78
79
// config detail: {'name': 'ENABLED', 'offset': 0.0, 'precision': 1.0, 'len':
80
// 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 0, 'type':
81
// 'bool', 'order': 'motorola', 'physical_unit': ''}
82
bool
enabled(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
83
84
// config detail: {'name': 'COMMAND_OUTPUT_FAULT', 'offset': 0.0,
85
// 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
86
// '[0|1]', 'bit': 2, 'type': 'bool', 'order': 'motorola', 'physical_unit':
87
// ''}
88
bool
command_output_fault(
const
std::uint8_t* bytes,
89
const
int32_t length)
const
;
90
};
91
92
}
// namespace lexus
93
}
// namespace canbus
94
}
// namespace apollo
apollo::canbus::lexus::Hazardlightsrpt214
Definition
hazard_lights_rpt_214.h:27
apollo::canbus::lexus::Hazardlightsrpt214::ID
static const int32_t ID
Definition
hazard_lights_rpt_214.h:29
apollo::canbus::lexus::Hazardlightsrpt214::Parse
void Parse(const std::uint8_t *bytes, int32_t length, Lexus *chassis) const override
Definition
hazard_lights_rpt_214.cc:33
apollo::canbus::lexus::Hazardlightsrpt214::Hazardlightsrpt214
Hazardlightsrpt214()
Definition
hazard_lights_rpt_214.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
modules
canbus_vehicle
lexus
protocol
hazard_lights_rpt_214.h