Apollo  6.0
Open source self driving car software
shift_cmd_65.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  Shiftcmd65();
32 
33  uint32_t GetPeriod() const override;
34 
35  void UpdateData(uint8_t* data) override;
36 
37  void Reset() override;
38 
39  // config detail: {'description':
40  // 'FORWARD_is_also_LOW_on_vehicles_with_LOW/HIGH,_PARK_and_HIGH_only_available_on_certain_Vehicles',
41  // 'enum': {0: 'SHIFT_CMD_PARK', 1: 'SHIFT_CMD_REVERSE', 2:
42  // 'SHIFT_CMD_NEUTRAL', 3: 'SHIFT_CMD_FORWARD', 4: 'SHIFT_CMD_LOW'},
43  // 'precision': 1.0, 'len': 8, 'name': 'SHIFT_CMD', 'is_signed_var': False,
44  // 'offset': 0.0, 'physical_range': '[0|4]', 'bit': 7, 'type': 'enum',
45  // 'order': 'motorola', 'physical_unit': ''}
46  Shiftcmd65* set_shift_cmd(Shift_cmd_65::Shift_cmdType shift_cmd);
47 
48  private:
49  // config detail: {'description':
50  // 'FORWARD_is_also_LOW_on_vehicles_with_LOW/HIGH,_PARK_and_HIGH_only_available_on_certain_Vehicles',
51  // 'enum': {0: 'SHIFT_CMD_PARK', 1: 'SHIFT_CMD_REVERSE', 2:
52  // 'SHIFT_CMD_NEUTRAL', 3: 'SHIFT_CMD_FORWARD', 4: 'SHIFT_CMD_LOW'},
53  // 'precision': 1.0, 'len': 8, 'name': 'SHIFT_CMD', 'is_signed_var': False,
54  // 'offset': 0.0, 'physical_range': '[0|4]', 'bit': 7, 'type': 'enum',
55  // 'order': 'motorola', 'physical_unit': ''}
56  void set_p_shift_cmd(uint8_t* data, Shift_cmd_65::Shift_cmdType shift_cmd);
57 
58  private:
59  Shift_cmd_65::Shift_cmdType shift_cmd_;
60 };
61 
62 } // namespace gem
63 } // namespace canbus
64 } // 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
uint32_t GetPeriod() const override
static const int32_t ID
Definition: shift_cmd_65.h:29
Definition: shift_cmd_65.h:26
void UpdateData(uint8_t *data) override
The class of ProtocolData.
Shiftcmd65 * set_shift_cmd(Shift_cmd_65::Shift_cmdType shift_cmd)