Apollo  6.0
Open source self driving car software
media_controls_rpt_220.h
Go to the documentation of this file.
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/proto/chassis_detail.pb.h"
21 
22 namespace apollo {
23 namespace canbus {
24 namespace lexus {
25 
27  ::apollo::canbus::ChassisDetail> {
28  public:
29  static const int32_t ID;
31  void Parse(const std::uint8_t* bytes, int32_t length,
32  ChassisDetail* chassis) const override;
33 
34  private:
35  // config detail: {'name': 'OUTPUT_VALUE', 'enum': {0:
36  // 'OUTPUT_VALUE_MEDIA_CONTROL_NONE', 1:
37  // 'OUTPUT_VALUE_MEDIA_CONTROL_VOICE_COMMAND', 2:
38  // 'OUTPUT_VALUE_MEDIA_CONTROL_MUTE', 3:
39  // 'OUTPUT_VALUE_MEDIA_CONTROL_PREV_TRACK_ANSWER', 4:
40  // 'OUTPUT_VALUE_MEDIA_CONTROL_NEXT_TRACK_HANG_UP', 5:
41  // 'OUTPUT_VALUE_MEDIA_CONTROL_VOL_UP', 6:
42  // 'OUTPUT_VALUE_MEDIA_CONTROL_VOL_DOWN'}, 'precision': 1.0, 'len': 8,
43  // 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|255]', 'bit':
44  // 31, 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
45  Media_controls_rpt_220::Output_valueType output_value(
46  const std::uint8_t* bytes, const int32_t length) const;
47 
48  // config detail: {'name': 'COMMANDED_VALUE', 'enum': {0:
49  // 'COMMANDED_VALUE_MEDIA_CONTROL_NONE', 1:
50  // 'COMMANDED_VALUE_MEDIA_CONTROL_VOICE_COMMAND', 2:
51  // 'COMMANDED_VALUE_MEDIA_CONTROL_MUTE', 3:
52  // 'COMMANDED_VALUE_MEDIA_CONTROL_PREV_TRACK_ANSWER', 4:
53  // 'COMMANDED_VALUE_MEDIA_CONTROL_NEXT_TRACK_HANG_UP', 5:
54  // 'COMMANDED_VALUE_MEDIA_CONTROL_VOL_UP', 6:
55  // 'COMMANDED_VALUE_MEDIA_CONTROL_VOL_DOWN'}, 'precision': 1.0, 'len': 8,
56  // 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|255]', 'bit':
57  // 23, 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
58  Media_controls_rpt_220::Commanded_valueType commanded_value(
59  const std::uint8_t* bytes, const int32_t length) const;
60 
61  // config detail: {'name': 'MANUAL_INPUT', 'enum': {0:
62  // 'MANUAL_INPUT_MEDIA_CONTROL_NONE', 1:
63  // 'MANUAL_INPUT_MEDIA_CONTROL_VOICE_COMMAND', 2:
64  // 'MANUAL_INPUT_MEDIA_CONTROL_MUTE', 3:
65  // 'MANUAL_INPUT_MEDIA_CONTROL_PREV_TRACK_ANSWER', 4:
66  // 'MANUAL_INPUT_MEDIA_CONTROL_NEXT_TRACK_HANG_UP', 5:
67  // 'MANUAL_INPUT_MEDIA_CONTROL_VOL_UP', 6:
68  // 'MANUAL_INPUT_MEDIA_CONTROL_VOL_DOWN'}, 'precision': 1.0, 'len': 8,
69  // 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|255]', 'bit':
70  // 15, 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
71  Media_controls_rpt_220::Manual_inputType manual_input(
72  const std::uint8_t* bytes, const int32_t length) const;
73 
74  // config detail: {'name': 'VEHICLE_FAULT', 'offset': 0.0, 'precision': 1.0,
75  // 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 6,
76  // 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
77  bool vehicle_fault(const std::uint8_t* bytes, const int32_t length) const;
78 
79  // config detail: {'name': 'PACMOD_FAULT', 'offset': 0.0, 'precision': 1.0,
80  // 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 5,
81  // 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
82  bool pacmod_fault(const std::uint8_t* bytes, const int32_t length) const;
83 
84  // config detail: {'name': 'OVERRIDE_ACTIVE', 'offset': 0.0, 'precision': 1.0,
85  // 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 1,
86  // 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
87  bool override_active(const std::uint8_t* bytes, const int32_t length) const;
88 
89  // config detail: {'name': 'OUTPUT_REPORTED_FAULT', 'offset': 0.0,
90  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
91  // '[0|1]', 'bit': 4, 'type': 'bool', 'order': 'motorola', 'physical_unit':
92  // ''}
93  bool output_reported_fault(const std::uint8_t* bytes,
94  const int32_t length) const;
95 
96  // config detail: {'name': 'INPUT_OUTPUT_FAULT', 'offset': 0.0,
97  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
98  // '[0|1]', 'bit': 3, 'type': 'bool', 'order': 'motorola', 'physical_unit':
99  // ''}
100  bool input_output_fault(const std::uint8_t* bytes,
101  const int32_t length) const;
102 
103  // config detail: {'name': 'ENABLED', 'offset': 0.0, 'precision': 1.0, 'len':
104  // 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 0, 'type':
105  // 'bool', 'order': 'motorola', 'physical_unit': ''}
106  bool enabled(const std::uint8_t* bytes, const int32_t length) const;
107 
108  // config detail: {'name': 'COMMAND_OUTPUT_FAULT', 'offset': 0.0,
109  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
110  // '[0|1]', 'bit': 2, 'type': 'bool', 'order': 'motorola', 'physical_unit':
111  // ''}
112  bool command_output_fault(const std::uint8_t* bytes,
113  const int32_t length) const;
114 };
115 
116 } // namespace lexus
117 } // namespace canbus
118 } // namespace apollo
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
Definition: media_controls_rpt_220.h:26
This is the base class of protocol data.
Definition: protocol_data.h:44
The class of ProtocolData.
static const int32_t ID
Definition: media_controls_rpt_220.h:29
void Parse(const std::uint8_t *bytes, int32_t length, ChassisDetail *chassis) const override