Apollo  6.0
Open source self driving car software
park_command_104.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2020 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 devkit {
25 
27  ::apollo::canbus::ChassisDetail> {
28  public:
29  static const int32_t ID;
30 
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': 'CheckSum_104', 'offset': 0.0, 'precision': 1.0,
40  // 'len': 8, 'is_signed_var': False, 'physical_range': '[0|255]', 'bit': 63,
41  // 'type': 'int', 'order': 'motorola', 'physical_unit': ''}
42  Parkcommand104* set_checksum_104(int checksum_104);
43 
44  // config detail: {'name': 'Park_Target', 'enum': {0: 'PARK_TARGET_RELEASE',
45  // 1: 'PARK_TARGET_PARKING_TRIGGER'}, 'precision': 1.0, 'len': 1,
46  // 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 8,
47  // 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
49  Park_command_104::Park_targetType park_target);
50 
51  // config detail: {'name': 'Park_EN_CTRL', 'enum': {0: 'PARK_EN_CTRL_DISABLE',
52  // 1: 'PARK_EN_CTRL_ENABLE'}, 'precision': 1.0, 'len': 1, 'is_signed_var':
53  // False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 0, 'type': 'enum',
54  // 'order': 'motorola', 'physical_unit': ''}
56  Park_command_104::Park_en_ctrlType park_en_ctrl);
57 
58  private:
59  // config detail: {'name': 'CheckSum_104', 'offset': 0.0, 'precision': 1.0,
60  // 'len': 8, 'is_signed_var': False, 'physical_range': '[0|255]', 'bit': 63,
61  // 'type': 'int', 'order': 'motorola', 'physical_unit': ''}
62  void set_p_checksum_104(uint8_t* data, int checksum_104);
63 
64  // config detail: {'name': 'Park_Target', 'enum': {0: 'PARK_TARGET_RELEASE',
65  // 1: 'PARK_TARGET_PARKING_TRIGGER'}, 'precision': 1.0, 'len': 1,
66  // 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 8,
67  // 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
68  void set_p_park_target(uint8_t* data,
69  Park_command_104::Park_targetType park_target);
70 
71  // config detail: {'name': 'Park_EN_CTRL', 'enum': {0: 'PARK_EN_CTRL_DISABLE',
72  // 1: 'PARK_EN_CTRL_ENABLE'}, 'precision': 1.0, 'len': 1, 'is_signed_var':
73  // False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 0, 'type': 'enum',
74  // 'order': 'motorola', 'physical_unit': ''}
75  void set_p_park_en_ctrl(uint8_t* data,
76  Park_command_104::Park_en_ctrlType park_en_ctrl);
77 
78  private:
79  int checksum_104_;
80  Park_command_104::Park_targetType park_target_;
81  Park_command_104::Park_en_ctrlType park_en_ctrl_;
82 };
83 
84 } // namespace devkit
85 } // namespace canbus
86 } // namespace apollo
Parkcommand104 * set_park_target(Park_command_104::Park_targetType park_target)
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
static const int32_t ID
Definition: park_command_104.h:29
uint32_t GetPeriod() const override
void UpdateData(uint8_t *data) override
Definition: park_command_104.h:26
Parkcommand104 * set_park_en_ctrl(Park_command_104::Park_en_ctrlType park_en_ctrl)
The class of ProtocolData.
Parkcommand104 * set_checksum_104(int checksum_104)