Apollo  6.0
Open source self driving car software
llc_diag_fault_620.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 "gtest/gtest_prod.h"
20 #include "modules/canbus/proto/chassis_detail.pb.h"
22 
23 namespace apollo {
24 namespace canbus {
25 namespace transit {
26 
28  ::apollo::canbus::ChassisDetail> {
29  public:
30  static const int32_t ID;
32  void Parse(const std::uint8_t* bytes, int32_t length,
33  ChassisDetail* chassis) const override;
34  FRIEND_TEST(Diag_fault_620_test, General);
35 
36  private:
37  // config detail: {'description': 'Counts the number of times that the driver
38  // has disengaged autonomy by applying the brakes since system reset..',
39  // 'offset': 0.0, 'precision': 1.0, 'len': 8, 'name':
40  // 'LLC_DisengageCounter_Brake', 'is_signed_var': False, 'physical_range':
41  // '[0|255]', 'bit': 32, 'type': 'int', 'order': 'intel', 'physical_unit': ''}
42  int llc_disengagecounter_brake(const std::uint8_t* bytes,
43  const int32_t length) const;
44 
45  // config detail: {'description': 'Counts the number of times that the driver
46  // has disengaged autonomy by moving the steering wheel since system reset.',
47  // 'offset': 0.0, 'precision': 1.0, 'len': 8, 'name':
48  // 'LLC_DisengageCounter_Steer', 'is_signed_var': False, 'physical_range':
49  // '[0|255]', 'bit': 16, 'type': 'int', 'order': 'intel', 'physical_unit': ''}
50  int llc_disengagecounter_steer(const std::uint8_t* bytes,
51  const int32_t length) const;
52 
53  // config detail: {'description': 'Counts the number of times that the driver
54  // has disengaged autonomy by applying throttle since system reset.',
55  // 'offset': 0.0, 'precision': 1.0, 'len': 8, 'name':
56  // 'LLC_DisengageCounter_Throttle', 'is_signed_var': False, 'physical_range':
57  // '[0|255]', 'bit': 24, 'type': 'int', 'order': 'intel', 'physical_unit': ''}
58  int llc_disengagecounter_throttle(const std::uint8_t* bytes,
59  const int32_t length) const;
60 
61  // config detail: {'description': 'Counts the number of faults that have
62  // occurred since system reset.', 'offset': 0.0, 'precision': 1.0, 'len': 8,
63  // 'name': 'LLC_FBK_FaultCounter', 'is_signed_var': False, 'physical_range':
64  // '[0|255]', 'bit': 0, 'type': 'int', 'order': 'intel', 'physical_unit': ''}
65  int llc_fbk_faultcounter(const std::uint8_t* bytes,
66  const int32_t length) const;
67 
68  // config detail: {'description': 'Counts the number of times that the driver
69  // has disengaged autonomy by applying the brakes since system reset..',
70  // 'offset': 0.0, 'precision': 1.0, 'len': 8, 'name':
71  // 'LLC_DisengageCounter_Button', 'is_signed_var': False, 'physical_range':
72  // '[0|255]', 'bit': 8, 'type': 'int', 'order': 'intel', 'physical_unit': ''}
73  int llc_disengagecounter_button(const std::uint8_t* bytes,
74  const int32_t length) const;
75 
76  // config detail: {'description': 'Firmware version', 'offset': 2017.0,
77  // 'precision': 1.0, 'len': 7, 'name': 'LLC_FBK_Version_Year',
78  // 'is_signed_var': False, 'physical_range': '[2017|2144]', 'bit': 40, 'type':
79  // 'int', 'order': 'intel', 'physical_unit': 'g'}
80  int llc_fbk_version_year(const std::uint8_t* bytes,
81  const int32_t length) const;
82 
83  // config detail: {'description': 'Firmware version', 'offset': 0.0,
84  // 'precision': 1.0, 'len': 4, 'name': 'LLC_FBK_Version_Month',
85  // 'is_signed_var': False, 'physical_range': '[0|15]', 'bit': 47, 'type':
86  // 'int', 'order': 'intel', 'physical_unit': 'Month'}
87  int llc_fbk_version_month(const std::uint8_t* bytes,
88  const int32_t length) const;
89 
90  // config detail: {'description': 'Firmware version', 'offset': 0.0,
91  // 'precision': 1.0, 'len': 5, 'name': 'LLC_FBK_Version_Day', 'is_signed_var':
92  // False, 'physical_range': '[0|31]', 'bit': 51, 'type': 'int', 'order':
93  // 'intel', 'physical_unit': 'Day'}
94  int llc_fbk_version_day(const std::uint8_t* bytes,
95  const int32_t length) const;
96 
97  // config detail: {'description': 'Firmware version', 'offset': 0.0,
98  // 'precision': 1.0, 'len': 5, 'name': 'LLC_FBK_Version_Hour',
99  // 'is_signed_var': False, 'physical_range': '[0|31]', 'bit': 56, 'type':
100  // 'int', 'order': 'intel', 'physical_unit': 'Hour'}
101  int llc_fbk_version_hour(const std::uint8_t* bytes,
102  const int32_t length) const;
103 };
104 
105 } // namespace transit
106 } // namespace canbus
107 } // namespace apollo
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
Definition: llc_diag_fault_620.h:27
void Parse(const std::uint8_t *bytes, int32_t length, ChassisDetail *chassis) const override
static const int32_t ID
Definition: llc_diag_fault_620.h:30
The class of ProtocolData.
FRIEND_TEST(Diag_fault_620_test, General)