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"
20
#include "
modules/drivers/canbus/can_comm/protocol_data.h
"
21
22
namespace
apollo
{
23
namespace
canbus {
24
namespace
ge3 {
25
26
class
Scu1301
:
public
::apollo::drivers::canbus::ProtocolData
<
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
apollo::canbus::ge3::Scu1301
Definition
scu_1_301.h:27
apollo::canbus::ge3::Scu1301::Scu1301
Scu1301()
Definition
scu_1_301.cc:28
apollo::canbus::ge3::Scu1301::ID
static const int32_t ID
Definition
scu_1_301.h:29
apollo::canbus::ge3::Scu1301::Parse
void Parse(const std::uint8_t *bytes, int32_t length, Ge3 *chassis) const override
Definition
scu_1_301.cc:31
apollo::drivers::canbus::ProtocolData
This is the base class of protocol data.
Definition
protocol_data.h:44
apollo
class register implement
Definition
arena_queue.h:37
protocol_data.h
The class of ProtocolData
apollo::canbus::Ge3
Definition
ge3.proto:615
apollo::canbus::Scu_1_301::Scu_stopbutstType
Scu_stopbutstType
Definition
ge3.proto:227
apollo::canbus::Scu_1_301::Scu_faultstType
Scu_faultstType
Definition
ge3.proto:237
apollo::canbus::Scu_1_301::Scu_drvmodeType
Scu_drvmodeType
Definition
ge3.proto:231
modules
canbus_vehicle
ge3
protocol
scu_1_301.h