Apollo 10.0
自动驾驶开放平台
wiper_aux_rpt_334.cc
浏览该文件的文档.
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
18
19#include "glog/logging.h"
20
23
24namespace apollo {
25namespace canbus {
26namespace lexus {
27
28using ::apollo::drivers::canbus::Byte;
29
31const int32_t Wiperauxrpt334::ID = 0x334;
32
33void Wiperauxrpt334::Parse(const std::uint8_t* bytes, int32_t length,
34 Lexus* chassis) const {
35 chassis->mutable_wiper_aux_rpt_334()->set_spray_empty_is_valid(
36 spray_empty_is_valid(bytes, length));
37 chassis->mutable_wiper_aux_rpt_334()->set_spray_empty(
38 spray_empty(bytes, length));
39 chassis->mutable_wiper_aux_rpt_334()->set_spray_near_empty_is_valid(
40 spray_near_empty_is_valid(bytes, length));
41 chassis->mutable_wiper_aux_rpt_334()->set_spray_near_empty(
42 spray_near_empty(bytes, length));
43 chassis->mutable_wiper_aux_rpt_334()->set_rear_spraying_is_valid(
44 rear_spraying_is_valid(bytes, length));
45 chassis->mutable_wiper_aux_rpt_334()->set_rear_spraying(
46 rear_spraying(bytes, length));
47 chassis->mutable_wiper_aux_rpt_334()->set_rear_wiping_is_valid(
48 rear_wiping_is_valid(bytes, length));
49 chassis->mutable_wiper_aux_rpt_334()->set_rear_wiping(
50 rear_wiping(bytes, length));
51 chassis->mutable_wiper_aux_rpt_334()->set_front_spraying_is_valid(
52 front_spraying_is_valid(bytes, length));
53 chassis->mutable_wiper_aux_rpt_334()->set_front_spraying(
54 front_spraying(bytes, length));
55 chassis->mutable_wiper_aux_rpt_334()->set_front_wiping_is_valid(
56 front_wiping_is_valid(bytes, length));
57 chassis->mutable_wiper_aux_rpt_334()->set_front_wiping(
58 front_wiping(bytes, length));
59}
60
61// config detail: {'name': 'spray_empty_is_valid', 'offset': 0.0,
62// 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
63// '[0|1]', 'bit': 13, 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
64bool Wiperauxrpt334::spray_empty_is_valid(const std::uint8_t* bytes,
65 int32_t length) const {
66 Byte t0(bytes + 1);
67 int32_t x = t0.get_byte(5, 1);
68
69 bool ret = x;
70 return ret;
71}
72
73// config detail: {'name': 'spray_empty', 'offset': 0.0, 'precision': 1.0,
74// 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 5,
75// 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
76bool Wiperauxrpt334::spray_empty(const std::uint8_t* bytes,
77 int32_t length) const {
78 Byte t0(bytes + 0);
79 int32_t x = t0.get_byte(5, 1);
80
81 bool ret = x;
82 return ret;
83}
84
85// config detail: {'name': 'spray_near_empty_is_valid', 'offset': 0.0,
86// 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
87// '[0|1]', 'bit': 12, 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
88bool Wiperauxrpt334::spray_near_empty_is_valid(const std::uint8_t* bytes,
89 int32_t length) const {
90 Byte t0(bytes + 1);
91 int32_t x = t0.get_byte(4, 1);
92
93 bool ret = x;
94 return ret;
95}
96
97// config detail: {'name': 'spray_near_empty', 'offset': 0.0, 'precision': 1.0,
98// 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 4,
99// 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
100bool Wiperauxrpt334::spray_near_empty(const std::uint8_t* bytes,
101 int32_t length) const {
102 Byte t0(bytes + 0);
103 int32_t x = t0.get_byte(4, 1);
104
105 bool ret = x;
106 return ret;
107}
108
109// config detail: {'name': 'rear_spraying_is_valid', 'offset': 0.0,
110// 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
111// '[0|1]', 'bit': 11, 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
112bool Wiperauxrpt334::rear_spraying_is_valid(const std::uint8_t* bytes,
113 int32_t length) const {
114 Byte t0(bytes + 1);
115 int32_t x = t0.get_byte(3, 1);
116
117 bool ret = x;
118 return ret;
119}
120
121// config detail: {'name': 'rear_spraying', 'offset': 0.0, 'precision': 1.0,
122// 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 3,
123// 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
124bool Wiperauxrpt334::rear_spraying(const std::uint8_t* bytes,
125 int32_t length) const {
126 Byte t0(bytes + 0);
127 int32_t x = t0.get_byte(3, 1);
128
129 bool ret = x;
130 return ret;
131}
132
133// config detail: {'name': 'rear_wiping_is_valid', 'offset': 0.0,
134// 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
135// '[0|1]', 'bit': 10, 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
136bool Wiperauxrpt334::rear_wiping_is_valid(const std::uint8_t* bytes,
137 int32_t length) const {
138 Byte t0(bytes + 1);
139 int32_t x = t0.get_byte(2, 1);
140
141 bool ret = x;
142 return ret;
143}
144
145// config detail: {'name': 'rear_wiping', 'offset': 0.0, 'precision': 1.0,
146// 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 2,
147// 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
148bool Wiperauxrpt334::rear_wiping(const std::uint8_t* bytes,
149 int32_t length) const {
150 Byte t0(bytes + 0);
151 int32_t x = t0.get_byte(2, 1);
152
153 bool ret = x;
154 return ret;
155}
156
157// config detail: {'name': 'front_spraying_is_valid', 'offset': 0.0,
158// 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
159// '[0|1]', 'bit': 9, 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
160bool Wiperauxrpt334::front_spraying_is_valid(const std::uint8_t* bytes,
161 int32_t length) const {
162 Byte t0(bytes + 1);
163 int32_t x = t0.get_byte(1, 1);
164
165 bool ret = x;
166 return ret;
167}
168
169// config detail: {'name': 'front_spraying', 'offset': 0.0, 'precision': 1.0,
170// 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 1,
171// 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
172bool Wiperauxrpt334::front_spraying(const std::uint8_t* bytes,
173 int32_t length) const {
174 Byte t0(bytes + 0);
175 int32_t x = t0.get_byte(1, 1);
176
177 bool ret = x;
178 return ret;
179}
180
181// config detail: {'name': 'front_wiping_is_valid', 'offset': 0.0,
182// 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
183// '[0|1]', 'bit': 8, 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
184bool Wiperauxrpt334::front_wiping_is_valid(const std::uint8_t* bytes,
185 int32_t length) const {
186 Byte t0(bytes + 1);
187 int32_t x = t0.get_byte(0, 1);
188
189 bool ret = x;
190 return ret;
191}
192
193// config detail: {'name': 'front_wiping', 'offset': 0.0, 'precision': 1.0,
194// 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 0,
195// 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
196bool Wiperauxrpt334::front_wiping(const std::uint8_t* bytes,
197 int32_t length) const {
198 Byte t0(bytes + 0);
199 int32_t x = t0.get_byte(0, 1);
200
201 bool ret = x;
202 return ret;
203}
204} // namespace lexus
205} // namespace canbus
206} // namespace apollo
Defines the Byte class.
void Parse(const std::uint8_t *bytes, int32_t length, Lexus *chassis) const override
class register implement
Definition arena_queue.h:37