Apollo 10.0
自动驾驶开放平台
global_rpt_6a.h
浏览该文件的文档.
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_vehicle/gem/proto/gem.pb.h"
21
22namespace apollo {
23namespace canbus {
24namespace gem {
25
27 ::apollo::canbus::Gem> {
28 public:
29 static const int32_t ID;
31 void Parse(const std::uint8_t* bytes, int32_t length,
32 Gem* 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': ''}
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': ''}
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
void Parse(const std::uint8_t *bytes, int32_t length, Gem *chassis) const override
This is the base class of protocol data.
class register implement
Definition arena_queue.h:37
The class of ProtocolData