Apollo  6.0
Open source self driving car software
global_rpt_6a.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 gem {
25 
27  ::apollo::canbus::ChassisDetail> {
28  public:
29  static const int32_t ID;
30  Globalrpt6a();
31  void Parse(const std::uint8_t* bytes, int32_t length,
32  ChassisDetail* chassis) const override;
33 
34  private:
35  // config detail: {'name': 'PACMOD_STATUS', 'enum': {0:
36  // 'PACMOD_STATUS_CONTROL_DISABLED', 1: 'PACMOD_STATUS_CONTROL_ENABLED'},
37  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'offset': 0.0,
38  // 'physical_range': '[0|1]', 'bit': 0, 'type': 'enum', 'order': 'motorola',
39  // 'physical_unit': ''}
40  Global_rpt_6a::Pacmod_statusType pacmod_status(const std::uint8_t* bytes,
41  const int32_t length) const;
42 
43  // config detail: {'name': 'OVERRIDE_STATUS', 'enum': {0:
44  // 'OVERRIDE_STATUS_NOT_OVERRIDDEN', 1: 'OVERRIDE_STATUS_OVERRIDDEN'},
45  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'offset': 0.0,
46  // 'physical_range': '[0|1]', 'bit': 1, 'type': 'enum', 'order': 'motorola',
47  // 'physical_unit': ''}
48  Global_rpt_6a::Override_statusType override_status(
49  const std::uint8_t* bytes, const int32_t length) const;
50 
51  // config detail: {'name': 'VEH_CAN_TIMEOUT', 'offset': 0.0, 'precision': 1.0,
52  // 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 2,
53  // 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
54  bool veh_can_timeout(const std::uint8_t* bytes, const int32_t length) const;
55 
56  // config detail: {'name': 'STR_CAN_TIMEOUT', 'offset': 0.0, 'precision': 1.0,
57  // 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 3,
58  // 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
59  bool str_can_timeout(const std::uint8_t* bytes, const int32_t length) const;
60 
61  // config detail: {'name': 'BRK_CAN_TIMEOUT', 'enum': {0:
62  // 'BRK_CAN_TIMEOUT_NO_ACTIVE_CAN_TIMEOUT', 1:
63  // 'BRK_CAN_TIMEOUT_ACTIVE_CAN_TIMEOUT'}, 'precision': 1.0, 'len': 1,
64  // 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 4,
65  // 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
66  Global_rpt_6a::Brk_can_timeoutType brk_can_timeout(
67  const std::uint8_t* bytes, const int32_t length) const;
68 
69  // config detail: {'name': 'USR_CAN_TIMEOUT', 'offset': 0.0, 'precision': 1.0,
70  // 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 5,
71  // 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
72  bool usr_can_timeout(const std::uint8_t* bytes, const int32_t length) const;
73 
74  // config detail: {'name': 'USR_CAN_READ_ERRORS', 'offset': 0.0,
75  // 'precision': 1.0, 'len': 16, 'is_signed_var': False, 'physical_range':
76  // '[0|65535]', 'bit': 55, 'type': 'int', 'order': 'motorola',
77  // 'physical_unit': ''}
78  int usr_can_read_errors(const std::uint8_t* bytes,
79  const int32_t length) const;
80 };
81 
82 } // namespace gem
83 } // namespace canbus
84 } // namespace apollo
static const int32_t ID
Definition: global_rpt_6a.h:29
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
void Parse(const std::uint8_t *bytes, int32_t length, ChassisDetail *chassis) const override
This is the base class of protocol data.
Definition: protocol_data.h:44
Definition: global_rpt_6a.h:26
The class of ProtocolData.