Apollo 10.0
自动驾驶开放平台
wiper_rpt_91.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 gem {
27
28using ::apollo::drivers::canbus::Byte;
29
31const int32_t Wiperrpt91::ID = 0x91;
32
33void Wiperrpt91::Parse(const std::uint8_t* bytes, int32_t length,
34 Gem* chassis) const {
35 chassis->mutable_wiper_rpt_91()->set_output_value(
36 output_value(bytes, length));
37 chassis->mutable_wiper_rpt_91()->set_commanded_value(
38 commanded_value(bytes, length));
39 chassis->mutable_wiper_rpt_91()->set_manual_input(
40 manual_input(bytes, length));
41}
42
43// config detail: {'name': 'output_value', 'enum': {0:
44// 'OUTPUT_VALUE_WIPERS_OFF', 1: 'OUTPUT_VALUE_INTERMITTENT_1', 2:
45// 'OUTPUT_VALUE_INTERMITTENT_2', 3: 'OUTPUT_VALUE_INTERMITTENT_3', 4:
46// 'OUTPUT_VALUE_INTERMITTENT_4', 5: 'OUTPUT_VALUE_INTERMITTENT_5', 6:
47// 'OUTPUT_VALUE_LOW', 7: 'OUTPUT_VALUE_HIGH'}, 'precision': 1.0, 'len': 8,
48// 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|7]', 'bit': 23,
49// 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
50Wiper_rpt_91::Output_valueType Wiperrpt91::output_value(
51 const std::uint8_t* bytes, int32_t length) const {
52 Byte t0(bytes + 2);
53 int32_t x = t0.get_byte(0, 8);
54
56 static_cast<Wiper_rpt_91::Output_valueType>(x);
57 return ret;
58}
59
60// config detail: {'name': 'commanded_value', 'enum': {0:
61// 'COMMANDED_VALUE_WIPERS_OFF', 1: 'COMMANDED_VALUE_INTERMITTENT_1', 2:
62// 'COMMANDED_VALUE_INTERMITTENT_2', 3: 'COMMANDED_VALUE_INTERMITTENT_3', 4:
63// 'COMMANDED_VALUE_INTERMITTENT_4', 5: 'COMMANDED_VALUE_INTERMITTENT_5', 6:
64// 'COMMANDED_VALUE_LOW', 7: 'COMMANDED_VALUE_HIGH'}, 'precision': 1.0, 'len':
65// 8, 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|7]', 'bit':
66// 15, 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
67Wiper_rpt_91::Commanded_valueType Wiperrpt91::commanded_value(
68 const std::uint8_t* bytes, int32_t length) const {
69 Byte t0(bytes + 1);
70 int32_t x = t0.get_byte(0, 8);
71
74 return ret;
75}
76
77// config detail: {'name': 'manual_input', 'enum': {0:
78// 'MANUAL_INPUT_WIPERS_OFF', 1: 'MANUAL_INPUT_INTERMITTENT_1', 2:
79// 'MANUAL_INPUT_INTERMITTENT_2', 3: 'MANUAL_INPUT_INTERMITTENT_3', 4:
80// 'MANUAL_INPUT_INTERMITTENT_4', 5: 'MANUAL_INPUT_INTERMITTENT_5', 6:
81// 'MANUAL_INPUT_LOW', 7: 'MANUAL_INPUT_HIGH'}, 'precision': 1.0, 'len': 8,
82// 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|7]', 'bit': 7,
83// 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
84Wiper_rpt_91::Manual_inputType Wiperrpt91::manual_input(
85 const std::uint8_t* bytes, int32_t length) const {
86 Byte t0(bytes + 0);
87 int32_t x = t0.get_byte(0, 8);
88
90 static_cast<Wiper_rpt_91::Manual_inputType>(x);
91 return ret;
92}
93} // namespace gem
94} // namespace canbus
95} // namespace apollo
Defines the Byte class.
void Parse(const std::uint8_t *bytes, int32_t length, Gem *chassis) const override
class register implement
Definition arena_queue.h:37