Apollo 10.0
自动驾驶开放平台
headlight_rpt_77.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 Headlightrpt77::ID = 0x77;
32
33void Headlightrpt77::Parse(const std::uint8_t* bytes, int32_t length,
34 Gem* chassis) const {
35 chassis->mutable_headlight_rpt_77()->set_output_value(
36 output_value(bytes, length));
37 chassis->mutable_headlight_rpt_77()->set_manual_input(
38 manual_input(bytes, length));
39 chassis->mutable_headlight_rpt_77()->set_commanded_value(
40 commanded_value(bytes, length));
41}
42
43// config detail: {'name': 'output_value', 'enum': {0:
44// 'OUTPUT_VALUE_HEADLIGHTS_OFF', 1: 'OUTPUT_VALUE_LOW_BEAMS', 2:
45// 'OUTPUT_VALUE_HIGH_BEAMS'}, 'precision': 1.0, 'len': 8, 'is_signed_var':
46// False, 'offset': 0.0, 'physical_range': '[0|2]', 'bit': 23, 'type': 'enum',
47// 'order': 'motorola', 'physical_unit': ''}
48Headlight_rpt_77::Output_valueType Headlightrpt77::output_value(
49 const std::uint8_t* bytes, int32_t length) const {
50 Byte t0(bytes + 2);
51 int32_t x = t0.get_byte(0, 8);
52
55 return ret;
56}
57
58// config detail: {'name': 'manual_input', 'enum': {0:
59// 'MANUAL_INPUT_HEADLIGHTS_OFF', 1: 'MANUAL_INPUT_LOW_BEAMS', 2:
60// 'MANUAL_INPUT_HIGH_BEAMS'}, 'precision': 1.0, 'len': 8, 'is_signed_var':
61// False, 'offset': 0.0, 'physical_range': '[0|2]', 'bit': 7, 'type': 'enum',
62// 'order': 'motorola', 'physical_unit': ''}
63Headlight_rpt_77::Manual_inputType Headlightrpt77::manual_input(
64 const std::uint8_t* bytes, int32_t length) const {
65 Byte t0(bytes + 0);
66 int32_t x = t0.get_byte(0, 8);
67
70 return ret;
71}
72
73// config detail: {'name': 'commanded_value', 'enum': {0:
74// 'COMMANDED_VALUE_HEADLIGHTS_OFF', 1: 'COMMANDED_VALUE_LOW_BEAMS', 2:
75// 'COMMANDED_VALUE_HIGH_BEAMS'}, 'precision': 1.0, 'len': 8, 'is_signed_var':
76// False, 'offset': 0.0, 'physical_range': '[0|2]', 'bit': 15, 'type': 'enum',
77// 'order': 'motorola', 'physical_unit': ''}
78Headlight_rpt_77::Commanded_valueType Headlightrpt77::commanded_value(
79 const std::uint8_t* bytes, int32_t length) const {
80 Byte t0(bytes + 1);
81 int32_t x = t0.get_byte(0, 8);
82
85 return ret;
86}
87} // namespace gem
88} // namespace canbus
89} // 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