Apollo
10.0
自动驾驶开放平台
scu_eps_311.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
Scueps311
:
public
::apollo::drivers::canbus::ProtocolData
<
27
::apollo::canbus::Ge3> {
28
public
:
29
static
const
int32_t
ID
;
30
Scueps311
();
31
void
Parse
(
const
std::uint8_t* bytes, int32_t length,
32
Ge3
* chassis)
const override
;
33
34
private
:
35
// config detail: {'description': 'EPS interrupt index', 'enum': {0:
36
// 'EPS_INTIDX_NOINT', 1: 'EPS_INTIDX_OVERFLOW', 2: 'EPS_INTIDX_TIMEOUT', 3:
37
// 'EPS_INTIDX_STEERINT'}, 'precision': 1.0, 'len': 3, 'name': 'EPS_IntIdx',
38
// 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|7]', 'bit': 6,
39
// 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
40
Scu_eps_311::Eps_intidxType
eps_intidx(
const
std::uint8_t* bytes,
41
const
int32_t length)
const
;
42
43
// config detail: {'description': 'Steer angle speed', 'offset': 0.0,
44
// 'precision': 4.0, 'len': 8, 'name': 'EPS_SteerAngleSpd', 'is_signed_var':
45
// False, 'physical_range': '[0|1016]', 'bit': 15, 'type': 'double', 'order':
46
// 'motorola', 'physical_unit': 'deg/s'}
47
double
eps_steeranglespd(
const
std::uint8_t* bytes,
48
const
int32_t length)
const
;
49
50
// config detail: {'description': 'Steer angle Left + right -', 'offset':
51
// -780.0, 'precision': 0.1, 'len': 16, 'name': 'EPS_SteerAngle',
52
// 'is_signed_var': False, 'physical_range': '[-780|779.9]', 'bit': 23,
53
// 'type': 'double', 'order': 'motorola', 'physical_unit': 'deg'}
54
double
eps_steerangle(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
55
56
// config detail: {'description': 'EPS fault status', 'enum': {0:
57
// 'EPS_FAULTST_NORMAL', 1: 'EPS_FAULTST_FAULT'}, 'precision': 1.0, 'len': 1,
58
// 'name': 'EPS_FaultSt', 'is_signed_var': False, 'offset': 0.0,
59
// 'physical_range': '[0|1]', 'bit': 7, 'type': 'enum', 'order': 'motorola',
60
// 'physical_unit': ''}
61
Scu_eps_311::Eps_faultstType
eps_faultst(
const
std::uint8_t* bytes,
62
const
int32_t length)
const
;
63
64
// config detail: {'description': 'EPS drive mode', 'enum': {0:
65
// 'EPS_DRVMODE_INVALID', 1: 'EPS_DRVMODE_MANUAL', 2: 'EPS_DRVMODE_INTERRUPT',
66
// 3: 'EPS_DRVMODE_AUTO'}, 'precision': 1.0, 'len': 2, 'name': 'EPS_DrvMode',
67
// 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|3]', 'bit': 1,
68
// 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
69
Scu_eps_311::Eps_drvmodeType
eps_drvmode(
const
std::uint8_t* bytes,
70
const
int32_t length)
const
;
71
};
72
73
}
// namespace ge3
74
}
// namespace canbus
75
}
// namespace apollo
apollo::canbus::ge3::Scueps311
Definition
scu_eps_311.h:27
apollo::canbus::ge3::Scueps311::ID
static const int32_t ID
Definition
scu_eps_311.h:29
apollo::canbus::ge3::Scueps311::Scueps311
Scueps311()
Definition
scu_eps_311.cc:28
apollo::canbus::ge3::Scueps311::Parse
void Parse(const std::uint8_t *bytes, int32_t length, Ge3 *chassis) const override
Definition
scu_eps_311.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_eps_311::Eps_intidxType
Eps_intidxType
Definition
ge3.proto:587
apollo::canbus::Scu_eps_311::Eps_drvmodeType
Eps_drvmodeType
Definition
ge3.proto:597
apollo::canbus::Scu_eps_311::Eps_faultstType
Eps_faultstType
Definition
ge3.proto:593
modules
canbus_vehicle
ge3
protocol
scu_eps_311.h