Apollo  6.0
Open source self driving car software
global_cmd_69.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 
31  Globalcmd69();
32 
33  uint32_t GetPeriod() const override;
34 
35  void UpdateData(uint8_t* data) override;
36 
37  void Reset() override;
38 
39  // config detail: {'name': 'PACMOD_ENABLE', 'enum': {0:
40  // 'PACMOD_ENABLE_CONTROL_DISABLED', 1: 'PACMOD_ENABLE_CONTROL_ENABLED'},
41  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'offset': 0.0,
42  // 'physical_range': '[0|1]', 'bit': 0, 'type': 'enum', 'order': 'motorola',
43  // 'physical_unit': ''}
45  Global_cmd_69::Pacmod_enableType pacmod_enable);
46 
47  // config detail: {'name': 'CLEAR_OVERRIDE', 'enum': {0:
48  // 'CLEAR_OVERRIDE_DON_T_CLEAR_ACTIVE_OVERRIDES', 1:
49  // 'CLEAR_OVERRIDE_CLEAR_ACTIVE_OVERRIDES'}, 'precision': 1.0, 'len': 1,
50  // 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 1,
51  // 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
53  Global_cmd_69::Clear_overrideType clear_override);
54 
55  // config detail: {'name': 'IGNORE_OVERRIDE', 'enum': {0:
56  // 'IGNORE_OVERRIDE_DON_T_IGNORE_USER_OVERRIDES', 1:
57  // 'IGNORE_OVERRIDE_IGNORE_USER_OVERRIDES'}, 'precision': 1.0, 'len': 1,
58  // 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 2,
59  // 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
61  Global_cmd_69::Ignore_overrideType ignore_override);
62 
63  private:
64  // config detail: {'name': 'PACMOD_ENABLE', 'enum': {0:
65  // 'PACMOD_ENABLE_CONTROL_DISABLED', 1: 'PACMOD_ENABLE_CONTROL_ENABLED'},
66  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'offset': 0.0,
67  // 'physical_range': '[0|1]', 'bit': 0, 'type': 'enum', 'order': 'motorola',
68  // 'physical_unit': ''}
69  void set_p_pacmod_enable(uint8_t* data,
70  Global_cmd_69::Pacmod_enableType pacmod_enable);
71 
72  // config detail: {'name': 'CLEAR_OVERRIDE', 'enum': {0:
73  // 'CLEAR_OVERRIDE_DON_T_CLEAR_ACTIVE_OVERRIDES', 1:
74  // 'CLEAR_OVERRIDE_CLEAR_ACTIVE_OVERRIDES'}, 'precision': 1.0, 'len': 1,
75  // 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 1,
76  // 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
77  void set_p_clear_override(uint8_t* data,
78  Global_cmd_69::Clear_overrideType clear_override);
79 
80  // config detail: {'name': 'IGNORE_OVERRIDE', 'enum': {0:
81  // 'IGNORE_OVERRIDE_DON_T_IGNORE_USER_OVERRIDES', 1:
82  // 'IGNORE_OVERRIDE_IGNORE_USER_OVERRIDES'}, 'precision': 1.0, 'len': 1,
83  // 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 2,
84  // 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
85  void set_p_ignore_override(
86  uint8_t* data, Global_cmd_69::Ignore_overrideType ignore_override);
87 
88  private:
89  Global_cmd_69::Pacmod_enableType pacmod_enable_;
90  Global_cmd_69::Clear_overrideType clear_override_;
91  Global_cmd_69::Ignore_overrideType ignore_override_;
92 };
93 
94 } // namespace gem
95 } // namespace canbus
96 } // namespace apollo
Definition: global_cmd_69.h:26
static const int32_t ID
Definition: global_cmd_69.h:29
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
Globalcmd69 * set_pacmod_enable(Global_cmd_69::Pacmod_enableType pacmod_enable)
uint32_t GetPeriod() const override
Globalcmd69 * set_clear_override(Global_cmd_69::Clear_overrideType clear_override)
Globalcmd69 * set_ignore_override(Global_cmd_69::Ignore_overrideType ignore_override)
The class of ProtocolData.
void UpdateData(uint8_t *data) override