Apollo  6.0
Open source self driving car software
headlight_aux_rpt_318.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': 'HEADLIGHTS_MODE_IS_VALID', 'offset': 0.0,
36  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
37  // '[0|1]', 'bit': 19, 'type': 'bool', 'order': 'motorola', 'physical_unit':
38  // ''}
39  bool headlights_mode_is_valid(const std::uint8_t* bytes,
40  const int32_t length) const;
41 
42  // config detail: {'name': 'HEADLIGHTS_MODE', 'enum': {0:
43  // 'HEADLIGHTS_MODE_HEADLIGHTS_OFF', 1: 'HEADLIGHTS_MODE_PARKING_LIGHTS_ONLY',
44  // 2: 'HEADLIGHTS_MODE_HEADLIGHTS_ON_MANUAL_MODE', 3:
45  // 'HEADLIGHTS_MODE_HEADLIGHTS_ON_AUTO_MODE'}, 'precision': 1.0, 'len': 8,
46  // 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|3]', 'bit':
47  // 15, 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
48  Headlight_aux_rpt_318::Headlights_modeType headlights_mode(
49  const std::uint8_t* bytes, const int32_t length) const;
50 
51  // config detail: {'name': 'FOG_LIGHTS_ON_IS_VALID', 'offset': 0.0,
52  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
53  // '[0|1]', 'bit': 18, 'type': 'bool', 'order': 'motorola', 'physical_unit':
54  // ''}
55  bool fog_lights_on_is_valid(const std::uint8_t* bytes,
56  const int32_t length) const;
57 
58  // config detail: {'name': 'FOG_LIGHTS_ON', 'offset': 0.0, 'precision': 1.0,
59  // 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 2,
60  // 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
61  bool fog_lights_on(const std::uint8_t* bytes, const int32_t length) const;
62 
63  // config detail: {'name': 'HEADLIGHTS_ON_BRIGHT_IS_VALID', 'offset': 0.0,
64  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
65  // '[0|1]', 'bit': 17, 'type': 'bool', 'order': 'motorola', 'physical_unit':
66  // ''}
67  bool headlights_on_bright_is_valid(const std::uint8_t* bytes,
68  const int32_t length) const;
69 
70  // config detail: {'name': 'HEADLIGHTS_ON_BRIGHT', 'offset': 0.0,
71  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
72  // '[0|1]', 'bit': 1, 'type': 'bool', 'order': 'motorola', 'physical_unit':
73  // ''}
74  bool headlights_on_bright(const std::uint8_t* bytes,
75  const int32_t length) const;
76 
77  // config detail: {'name': 'HEADLIGHTS_ON_IS_VALID', 'offset': 0.0,
78  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
79  // '[0|1]', 'bit': 16, 'type': 'bool', 'order': 'motorola', 'physical_unit':
80  // ''}
81  bool headlights_on_is_valid(const std::uint8_t* bytes,
82  const int32_t length) const;
83 
84  // config detail: {'name': 'HEADLIGHTS_ON', 'offset': 0.0, 'precision': 1.0,
85  // 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 0,
86  // 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
87  bool headlights_on(const std::uint8_t* bytes, const int32_t length) const;
88 };
89 
90 } // namespace lexus
91 } // namespace canbus
92 } // namespace apollo
Definition: headlight_aux_rpt_318.h:26
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
This is the base class of protocol data.
Definition: protocol_data.h:44
void Parse(const std::uint8_t *bytes, int32_t length, ChassisDetail *chassis) const override
The class of ProtocolData.
static const int32_t ID
Definition: headlight_aux_rpt_318.h:29