Apollo 10.0
自动驾驶开放平台
llc_auxiliaryfeedback_120.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 "gtest/gtest_prod.h"
20
21#include "modules/canbus_vehicle/transit/proto/transit.pb.h"
23
24namespace apollo {
25namespace canbus {
26namespace transit {
27
29 ::apollo::canbus::Transit> {
30 public:
31 static const int32_t ID;
33 void Parse(const std::uint8_t* bytes, int32_t length,
34 Transit* chassis) const override;
35
36 FRIEND_TEST(llc_auxiliaryfeedback_120Test, General);
37
38 private:
39 // config detail: {'description': 'Inverter enabled', 'offset': 0.0,
40 // 'precision': 1.0, 'len': 1, 'name': 'LLC_FBK_Inverter', 'is_signed_var':
41 // False, 'physical_range': '[0|1]', 'bit': 2, 'type': 'bool', 'order':
42 // 'intel', 'physical_unit': 'T/F'}
43 bool llc_fbk_inverter(const std::uint8_t* bytes, const int32_t length) const;
44
45 // config detail: {'description': 'PDU Channel 8 enabled', 'offset': 0.0,
46 // 'precision': 1.0, 'len': 1, 'name': 'LLC_FBK_PDU_Ch8', 'is_signed_var':
47 // False, 'physical_range': '[0|1]', 'bit': 15, 'type': 'bool', 'order':
48 // 'intel', 'physical_unit': 'T/F'}
49 bool llc_fbk_pdu_ch8(const std::uint8_t* bytes, const int32_t length) const;
50
51 // config detail: {'description': 'PDU Channel 7 enabled', 'offset': 0.0,
52 // 'precision': 1.0, 'len': 1, 'name': 'LLC_FBK_PDU_Ch7', 'is_signed_var':
53 // False, 'physical_range': '[0|1]', 'bit': 14, 'type': 'bool', 'order':
54 // 'intel', 'physical_unit': 'T/F'}
55 bool llc_fbk_pdu_ch7(const std::uint8_t* bytes, const int32_t length) const;
56
57 // config detail: {'description': 'PDU Channel 6 enabled', 'offset': 0.0,
58 // 'precision': 1.0, 'len': 1, 'name': 'LLC_FBK_PDU_Ch6', 'is_signed_var':
59 // False, 'physical_range': '[0|1]', 'bit': 13, 'type': 'bool', 'order':
60 // 'intel', 'physical_unit': 'T/F'}
61 bool llc_fbk_pdu_ch6(const std::uint8_t* bytes, const int32_t length) const;
62
63 // config detail: {'description': 'PDU Channel 5 enabled', 'offset': 0.0,
64 // 'precision': 1.0, 'len': 1, 'name': 'LLC_FBK_PDU_Ch5', 'is_signed_var':
65 // False, 'physical_range': '[0|1]', 'bit': 12, 'type': 'bool', 'order':
66 // 'intel', 'physical_unit': 'T/F'}
67 bool llc_fbk_pdu_ch5(const std::uint8_t* bytes, const int32_t length) const;
68
69 // config detail: {'description': 'PDU Channel 4 enabled', 'offset': 0.0,
70 // 'precision': 1.0, 'len': 1, 'name': 'LLC_FBK_PDU_Ch4', 'is_signed_var':
71 // False, 'physical_range': '[0|1]', 'bit': 11, 'type': 'bool', 'order':
72 // 'intel', 'physical_unit': 'T/F'}
73 bool llc_fbk_pdu_ch4(const std::uint8_t* bytes, const int32_t length) const;
74
75 // config detail: {'description': 'PDU Channel 3 enabled', 'offset': 0.0,
76 // 'precision': 1.0, 'len': 1, 'name': 'LLC_FBK_PDU_Ch3', 'is_signed_var':
77 // False, 'physical_range': '[0|1]', 'bit': 10, 'type': 'bool', 'order':
78 // 'intel', 'physical_unit': 'T/F'}
79 bool llc_fbk_pdu_ch3(const std::uint8_t* bytes, const int32_t length) const;
80
81 // config detail: {'description': 'PDU Channel 2 enabled', 'offset': 0.0,
82 // 'precision': 1.0, 'len': 1, 'name': 'LLC_FBK_PDU_Ch2', 'is_signed_var':
83 // False, 'physical_range': '[0|1]', 'bit': 9, 'type': 'bool', 'order':
84 // 'intel', 'physical_unit': 'T/F'}
85 bool llc_fbk_pdu_ch2(const std::uint8_t* bytes, const int32_t length) const;
86
87 // config detail: {'description': 'PDU Channel 1 enabled', 'offset': 0.0,
88 // 'precision': 1.0, 'len': 1, 'name': 'LLC_FBK_PDU_Ch1', 'is_signed_var':
89 // False, 'physical_range': '[0|1]', 'bit': 8, 'type': 'bool', 'order':
90 // 'intel', 'physical_unit': 'T/F'}
91 bool llc_fbk_pdu_ch1(const std::uint8_t* bytes, const int32_t length) const;
92
93 // config detail: {'description': 'Hazard lights enabled', 'offset': 0.0,
94 // 'precision': 1.0, 'len': 1, 'name': 'LLC_FBK_HazardLights',
95 // 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 28, 'type':
96 // 'bool', 'order': 'intel', 'physical_unit': 'T/F'}
97 bool llc_fbk_hazardlights(const std::uint8_t* bytes,
98 const int32_t length) const;
99
100 // config detail: {'description': 'Autonomy indicator green LED on', 'offset':
101 // 0.0, 'precision': 1.0, 'len': 1, 'name': 'LLC_FBK_LedGreenOn',
102 // 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 17, 'type':
103 // 'bool', 'order': 'intel', 'physical_unit': 'T/F'}
104 bool llc_fbk_ledgreenon(const std::uint8_t* bytes,
105 const int32_t length) const;
106
107 // config detail: {'description': 'Horn enabled', 'offset': 0.0,
108 // 'precision': 1.0, 'len': 1, 'name': 'LLC_FBK_Horn', 'is_signed_var': False,
109 // 'physical_range': '[0|1]', 'bit': 3, 'type': 'bool', 'order': 'intel',
110 // 'physical_unit': 'T/F'}
111 bool llc_fbk_horn(const std::uint8_t* bytes, const int32_t length) const;
112
113 // config detail: {'description': 'Buzzer enabled', 'offset': 0.0,
114 // 'precision': 1.0, 'len': 1, 'name': 'LLC_FBK_BuzzerOn', 'is_signed_var':
115 // False, 'physical_range': '[0|1]', 'bit': 19, 'type': 'bool', 'order':
116 // 'intel', 'physical_unit': 'T/F'}
117 bool llc_fbk_buzzeron(const std::uint8_t* bytes, const int32_t length) const;
118
119 // config detail: {'description': 'Current turn signal status', 'enum': {0:
120 // 'LLC_FBK_TURNSIGNAL_NONE', 1: 'LLC_FBK_TURNSIGNAL_LEFT', 2:
121 // 'LLC_FBK_TURNSIGNAL_RIGHT', 3: 'LLC_FBK_TURNSIGNAL_RESERVE'},
122 // 'precision': 1.0, 'len': 2, 'name': 'LLC_FBK_TurnSignal', 'is_signed_var':
123 // False, 'offset': 0.0, 'physical_range': '[0|3]', 'bit': 24, 'type': 'enum',
124 // 'order': 'intel', 'physical_unit': ''}
126 const std::uint8_t* bytes, const int32_t length) const;
127
128 // config detail: {'description': 'Low beam enabled', 'offset': 0.0,
129 // 'precision': 1.0, 'len': 1, 'name': 'LLC_FBK_LowBeam', 'is_signed_var':
130 // False, 'physical_range': '[0|1]', 'bit': 26, 'type': 'bool', 'order':
131 // 'intel', 'physical_unit': 'T/F'}
132 bool llc_fbk_lowbeam(const std::uint8_t* bytes, const int32_t length) const;
133
134 // config detail: {'description': 'High beam enabled', 'offset': 0.0,
135 // 'precision': 1.0, 'len': 1, 'name': 'LLC_FBK_HighBeam', 'is_signed_var':
136 // False, 'physical_range': '[0|1]', 'bit': 27, 'type': 'bool', 'order':
137 // 'intel', 'physical_unit': 'T/F'}
138 bool llc_fbk_highbeam(const std::uint8_t* bytes, const int32_t length) const;
139
140 // config detail: {'description': 'Autonomy indicator red LED on', 'offset':
141 // 0.0, 'precision': 1.0, 'len': 1, 'name': 'LLC_FBK_LedRedOn',
142 // 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 18, 'type':
143 // 'bool', 'order': 'intel', 'physical_unit': 'T/F'}
144 bool llc_fbk_ledredon(const std::uint8_t* bytes, const int32_t length) const;
145
146 // config detail: {'description': 'Autonomy button is pressed', 'offset': 0.0,
147 // 'precision': 1.0, 'len': 1, 'name': 'LLC_FBK_AutonomyButtonPressed',
148 // 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 16, 'type':
149 // 'bool', 'order': 'intel', 'physical_unit': 'T/F'}
150 bool llc_fbk_autonomybuttonpressed(const std::uint8_t* bytes,
151 const int32_t length) const;
152};
153
154} // namespace transit
155} // namespace canbus
156} // namespace apollo
FRIEND_TEST(llc_auxiliaryfeedback_120Test, General)
void Parse(const std::uint8_t *bytes, int32_t length, Transit *chassis) const override
This is the base class of protocol data.
class register implement
Definition arena_queue.h:37
The class of ProtocolData