Apollo
10.0
自动驾驶开放平台
pas_2nd_data_312.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/neolix_edu/proto/neolix_edu.pb.h"
20
#include "
modules/drivers/canbus/can_comm/protocol_data.h
"
21
22
namespace
apollo
{
23
namespace
canbus {
24
namespace
neolix_edu {
25
26
class
Pas2nddata312
:
public
::apollo::drivers::canbus::ProtocolData
<
27
::apollo::canbus::Neolix_edu> {
28
public
:
29
static
const
int32_t
ID
;
30
Pas2nddata312
();
31
void
Parse
(
const
std::uint8_t* bytes, int32_t length,
32
Neolix_edu
* chassis)
const override
;
33
34
private
:
35
// config detail: {'description': '0x0:Invalid;0x1:Valid', 'offset': 0.0,
36
// 'precision': 1.0, 'len': 1, 'name': 'PAS_B1_Status', 'is_signed_var':
37
// False, 'physical_range': '[0|1]', 'bit': 0, 'type': 'bool', 'order':
38
// 'motorola', 'physical_unit': 'bit'}
39
bool
pas_b1_status(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
40
41
// config detail: {'description': '0x0:Invalid;0x1:Valid', 'offset': 0.0,
42
// 'precision': 1.0, 'len': 1, 'name': 'PAS_B2_Status', 'is_signed_var':
43
// False, 'physical_range': '[0|1]', 'bit': 1, 'type': 'bool', 'order':
44
// 'motorola', 'physical_unit': 'bit'}
45
bool
pas_b2_status(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
46
47
// config detail: {'description': '0x0:Invalid;0x1:Valid', 'offset': 0.0,
48
// 'precision': 1.0, 'len': 1, 'name': 'PAS_B3_Status', 'is_signed_var':
49
// False, 'physical_range': '[0|1]', 'bit': 2, 'type': 'bool', 'order':
50
// 'motorola', 'physical_unit': 'bit'}
51
bool
pas_b3_status(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
52
53
// config detail: {'description': '0x0:Invalid;0x1:Valid', 'offset': 0.0,
54
// 'precision': 1.0, 'len': 1, 'name': 'PAS_B4_Status', 'is_signed_var':
55
// False, 'physical_range': '[0|1]', 'bit': 3, 'type': 'bool', 'order':
56
// 'motorola', 'physical_unit': 'bit'}
57
bool
pas_b4_status(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
58
59
// config detail: {'description': 'phy=int*2;0xFF:no obstacle', 'offset': 0.0,
60
// 'precision': 2.0, 'len': 8, 'name': 'PASDistance1', 'is_signed_var': False,
61
// 'physical_range': '[0|510]', 'bit': 15, 'type': 'double', 'order':
62
// 'motorola', 'physical_unit': 'cm'}
63
double
pasdistance1(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
64
65
// config detail: {'description': 'phy=int*2;0xFF:no obstacle', 'offset': 0.0,
66
// 'precision': 2.0, 'len': 8, 'name': 'PASDistance2', 'is_signed_var': False,
67
// 'physical_range': '[0|510]', 'bit': 23, 'type': 'double', 'order':
68
// 'motorola', 'physical_unit': 'cm'}
69
double
pasdistance2(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
70
71
// config detail: {'description': 'phy=int*2;0xFF:no obstacle', 'offset': 0.0,
72
// 'precision': 2.0, 'len': 8, 'name': 'PASDistance3', 'is_signed_var': False,
73
// 'physical_range': '[0|510]', 'bit': 31, 'type': 'double', 'order':
74
// 'motorola', 'physical_unit': 'cm'}
75
double
pasdistance3(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
76
77
// config detail: {'description': 'phy=int*2;0xFF:no obstacle', 'offset': 0.0,
78
// 'precision': 2.0, 'len': 8, 'name': 'PASDistance4', 'is_signed_var': False,
79
// 'physical_range': '[0|510]', 'bit': 39, 'type': 'double', 'order':
80
// 'motorola', 'physical_unit': 'cm'}
81
double
pasdistance4(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
82
};
83
84
}
// namespace neolix_edu
85
}
// namespace canbus
86
}
// namespace apollo
apollo::canbus::neolix_edu::Pas2nddata312
Definition
pas_2nd_data_312.h:27
apollo::canbus::neolix_edu::Pas2nddata312::Pas2nddata312
Pas2nddata312()
Definition
pas_2nd_data_312.cc:30
apollo::canbus::neolix_edu::Pas2nddata312::Parse
void Parse(const std::uint8_t *bytes, int32_t length, Neolix_edu *chassis) const override
Definition
pas_2nd_data_312.cc:33
apollo::canbus::neolix_edu::Pas2nddata312::ID
static const int32_t ID
Definition
pas_2nd_data_312.h:29
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::Neolix_edu
Definition
neolix_edu.proto:512
modules
canbus_vehicle
neolix_edu
protocol
pas_2nd_data_312.h