Apollo
10.0
自动驾驶开放平台
fuellevel_72.h
浏览该文件的文档.
1
/******************************************************************************
2
* Copyright 2017 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
22
#pragma once
23
24
#include "modules/canbus_vehicle/lincoln/proto/lincoln.pb.h"
25
#include "
modules/drivers/canbus/can_comm/protocol_data.h
"
26
31
namespace
apollo
{
32
namespace
canbus {
33
namespace
lincoln {
34
40
class
Fuellevel72
:
public
::apollo::drivers::canbus::ProtocolData
<
41
::apollo::canbus::Lincoln> {
42
public
:
43
static
const
int32_t
ID
;
44
45
/*
46
* @brief parse received data
47
* @param bytes a pointer to the input bytes
48
* @param length the length of the input bytes
49
* @param timestamp the timestamp of input data
50
* @param chassis_detail the parsed chassis_detail
51
*/
52
virtual
void
Parse
(
const
std::uint8_t *bytes, int32_t length,
53
Lincoln
*chassis_detail)
const
;
54
55
private
:
66
double
fuel_level(
const
std::uint8_t *bytes, int32_t length)
const
;
67
};
68
69
}
// namespace lincoln
70
}
// namespace canbus
71
}
// namespace apollo
apollo::canbus::lincoln::Fuellevel72
one of the protocol data of lincoln vehicle
Definition
fuellevel_72.h:41
apollo::canbus::lincoln::Fuellevel72::ID
static const int32_t ID
Definition
fuellevel_72.h:43
apollo::canbus::lincoln::Fuellevel72::Parse
virtual void Parse(const std::uint8_t *bytes, int32_t length, Lincoln *chassis_detail) const
Definition
fuellevel_72.cc: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::Lincoln
Definition
lincoln.proto:9
modules
canbus_vehicle
lincoln
protocol
fuellevel_72.h