Apollo 10.0
自动驾驶开放平台
media_controls_cmd_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 "modules/canbus_vehicle/lexus/proto/lexus.pb.h"
21
22namespace apollo {
23namespace canbus {
24namespace lexus {
25
27 ::apollo::canbus::Lexus> {
28 public:
29 static const int32_t ID;
31 void Parse(const std::uint8_t* bytes, int32_t length,
32 Lexus* chassis) const override;
33
34 private:
35 // config detail: {'name': 'MEDIA_CONTROLS_CMD', 'enum': {0:
36 // 'MEDIA_CONTROLS_CMD_MEDIA_CONTROL_NONE', 1:
37 // 'MEDIA_CONTROLS_CMD_MEDIA_CONTROL_VOICE_COMMAND', 2:
38 // 'MEDIA_CONTROLS_CMD_MEDIA_CONTROL_MUTE', 3:
39 // 'MEDIA_CONTROLS_CMD_MEDIA_CONTROL_PREV_TRACK_ANSWER', 4:
40 // 'MEDIA_CONTROLS_CMD_MEDIA_CONTROL_NEXT_TRACK_HANG_UP', 5:
41 // 'MEDIA_CONTROLS_CMD_MEDIA_CONTROL_VOL_UP', 6:
42 // 'MEDIA_CONTROLS_CMD_MEDIA_CONTROL_VOL_DOWN'}, 'precision': 1.0, 'len': 8,
43 // 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|255]', 'bit':
44 // 15, 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
46 const std::uint8_t* bytes, const int32_t length) const;
47
48 // config detail: {'name': 'IGNORE_OVERRIDES', 'offset': 0.0,
49 // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
50 // '[0|1]', 'bit': 1, 'type': 'bool', 'order': 'motorola', 'physical_unit':
51 // ''}
52 bool ignore_overrides(const std::uint8_t* bytes, const int32_t length) const;
53
54 // config detail: {'name': 'CLEAR_OVERRIDE', 'offset': 0.0, 'precision': 1.0,
55 // 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 2,
56 // 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
57 bool clear_override(const std::uint8_t* bytes, const int32_t length) const;
58
59 // config detail: {'name': 'CLEAR_FAULTS', 'offset': 0.0, 'precision': 1.0,
60 // 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 3,
61 // 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
62 bool clear_faults(const std::uint8_t* bytes, const int32_t length) const;
63
64 // config detail: {'name': 'ENABLE', 'offset': 0.0, 'precision': 1.0, 'len':
65 // 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 0, 'type':
66 // 'bool', 'order': 'motorola', 'physical_unit': ''}
67 bool enable(const std::uint8_t* bytes, const int32_t length) const;
68};
69
70} // namespace lexus
71} // namespace canbus
72} // namespace apollo
void Parse(const std::uint8_t *bytes, int32_t length, Lexus *chassis) const override
This is the base class of protocol data.
class register implement
Definition arena_queue.h:37
The class of ProtocolData