Apollo 10.0
自动驾驶开放平台
park_command_104.h
浏览该文件的文档.
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_vehicle/devkit/proto/devkit.pb.h"
21
22namespace apollo {
23namespace canbus {
24namespace devkit {
25
27 ::apollo::canbus::Devkit> {
28 public:
29 static const int32_t ID;
30
32
33 uint32_t GetPeriod() const override;
34
35 void Parse(const std::uint8_t* bytes, int32_t length,
36 Devkit* chassis) const override;
37
38 void UpdateData(uint8_t* data) override;
39
40 void Reset() override;
41
42 // config detail: {'name': 'CheckSum_104', 'offset': 0.0, 'precision': 1.0,
43 // 'len': 8, 'is_signed_var': False, 'physical_range': '[0|255]', 'bit': 63,
44 // 'type': 'int', 'order': 'motorola', 'physical_unit': ''}
45 Parkcommand104* set_checksum_104(int checksum_104);
46
47 // config detail: {'name': 'Park_Target', 'enum': {0: 'PARK_TARGET_RELEASE',
48 // 1: 'PARK_TARGET_PARKING_TRIGGER'}, 'precision': 1.0, 'len': 1,
49 // 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 8,
50 // 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
53
54 // config detail: {'name': 'Park_EN_CTRL', 'enum': {0: 'PARK_EN_CTRL_DISABLE',
55 // 1: 'PARK_EN_CTRL_ENABLE'}, 'precision': 1.0, 'len': 1, 'is_signed_var':
56 // False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 0, 'type': 'enum',
57 // 'order': 'motorola', 'physical_unit': ''}
60
61 private:
62 // config detail: {'name': 'CheckSum_104', 'offset': 0.0, 'precision': 1.0,
63 // 'len': 8, 'is_signed_var': False, 'physical_range': '[0|255]', 'bit': 63,
64 // 'type': 'int', 'order': 'motorola', 'physical_unit': ''}
65 void set_p_checksum_104(uint8_t* data, int checksum_104);
66
67 // config detail: {'name': 'Park_Target', 'enum': {0: 'PARK_TARGET_RELEASE',
68 // 1: 'PARK_TARGET_PARKING_TRIGGER'}, 'precision': 1.0, 'len': 1,
69 // 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 8,
70 // 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
71 void set_p_park_target(uint8_t* data,
73
74 // config detail: {'name': 'Park_EN_CTRL', 'enum': {0: 'PARK_EN_CTRL_DISABLE',
75 // 1: 'PARK_EN_CTRL_ENABLE'}, 'precision': 1.0, 'len': 1, 'is_signed_var':
76 // False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 0, 'type': 'enum',
77 // 'order': 'motorola', 'physical_unit': ''}
78 void set_p_park_en_ctrl(uint8_t* data,
80
81 // report the command
82 Park_command_104::Park_targetType park_target(const std::uint8_t* bytes,
83 const int32_t length) const;
84
85 Park_command_104::Park_en_ctrlType park_en_ctrl(const std::uint8_t* bytes,
86 const int32_t length) const;
87
88 int checksum_104(const std::uint8_t* bytes, const int32_t length) const;
89
90 private:
91 int checksum_104_;
94};
95
96} // namespace devkit
97} // namespace canbus
98} // namespace apollo
Parkcommand104 * set_park_en_ctrl(Park_command_104::Park_en_ctrlType park_en_ctrl)
void UpdateData(uint8_t *data) override
Parkcommand104 * set_checksum_104(int checksum_104)
void Parse(const std::uint8_t *bytes, int32_t length, Devkit *chassis) const override
Parkcommand104 * set_park_target(Park_command_104::Park_targetType park_target)
This is the base class of protocol data.
class register implement
Definition arena_queue.h:37
The class of ProtocolData