Apollo 10.0
自动驾驶开放平台
scu_1_301.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2019 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/ge3/proto/ge3.pb.h"
21
22namespace apollo {
23namespace canbus {
24namespace ge3 {
25
27 ::apollo::canbus::Ge3> {
28 public:
29 static const int32_t ID;
30 Scu1301();
31 void Parse(const std::uint8_t* bytes, int32_t length,
32 Ge3* chassis) const override;
33
34 private:
35 // config detail: {'description': 'VIN string character 16', 'offset': 0.0,
36 // 'precision': 1.0, 'len': 8, 'name': 'VIN16', 'is_signed_var': False,
37 // 'physical_range': '[0|255]', 'bit': 15, 'type': 'int', 'order': 'motorola',
38 // 'physical_unit': '-'}
39 int vin16(const std::uint8_t* bytes, const int32_t length) const;
40
41 // config detail: {'description': 'Brake pedal position', 'enum': {0:
42 // 'SCU_STOPBUTST_UNPRESSED', 1: 'SCU_STOPBUTST_PRESSED'}, 'precision': 1.0,
43 // 'len': 1, 'name': 'SCU_StopButSt', 'is_signed_var': False, 'offset': 0.0,
44 // 'physical_range': '[0|1]', 'bit': 0, 'type': 'enum', 'order': 'motorola',
45 // 'physical_unit': ''}
46 Scu_1_301::Scu_stopbutstType scu_stopbutst(const std::uint8_t* bytes,
47 const int32_t length) const;
48
49 // config detail: {'description': 'SCU drive mode', 'enum': {0:
50 // 'SCU_DRVMODE_INVALID', 1: 'SCU_DRVMODE_MANUAL', 2: 'SCU_DRVMODE_INTERRUPT',
51 // 3: 'SCU_DRVMODE_AUTO'}, 'precision': 1.0, 'len': 2, 'name': 'SCU_DrvMode',
52 // 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|3]', 'bit': 3,
53 // 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
54 Scu_1_301::Scu_drvmodeType scu_drvmode(const std::uint8_t* bytes,
55 const int32_t length) const;
56
57 // config detail: {'description': 'SCU fault status', 'enum': {0:
58 // 'SCU_FAULTST_NORMAL', 1: 'SCU_FAULTST_FAULT'}, 'precision': 1.0, 'len': 4,
59 // 'name': 'SCU_FaultSt', 'is_signed_var': False, 'offset': 0.0,
60 // 'physical_range': '[0|15]', 'bit': 7, 'type': 'enum', 'order': 'motorola',
61 // 'physical_unit': ''}
62 Scu_1_301::Scu_faultstType scu_faultst(const std::uint8_t* bytes,
63 const int32_t length) const;
64};
65
66} // namespace ge3
67} // namespace canbus
68} // namespace apollo
static const int32_t ID
Definition scu_1_301.h:29
void Parse(const std::uint8_t *bytes, int32_t length, Ge3 *chassis) const override
Definition scu_1_301.cc:31
This is the base class of protocol data.
class register implement
Definition arena_queue.h:37
The class of ProtocolData