Apollo
10.0
自动驾驶开放平台
headlight_cmd_76.h
浏览该文件的文档.
1
/******************************************************************************
2
* Copyright 2018 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/gem/proto/gem.pb.h"
20
#include "
modules/drivers/canbus/can_comm/protocol_data.h
"
21
22
namespace
apollo
{
23
namespace
canbus {
24
namespace
gem {
25
26
class
Headlightcmd76
:
public
::apollo::drivers::canbus::ProtocolData
<
27
::apollo::canbus::Gem> {
28
public
:
29
static
const
int32_t
ID
;
30
31
Headlightcmd76
();
32
33
uint32_t
GetPeriod
()
const override
;
34
35
void
UpdateData
(uint8_t* data)
override
;
36
37
void
Reset
()
override
;
38
39
// config detail: {'name': 'HEADLIGHT_CMD', 'enum': {0:
40
// 'HEADLIGHT_CMD_HEADLIGHTS_OFF', 1: 'HEADLIGHT_CMD_LOW_BEAMS', 2:
41
// 'HEADLIGHT_CMD_HIGH_BEAMS'}, 'precision': 1.0, 'len': 8, 'is_signed_var':
42
// False, 'offset': 0.0, 'physical_range': '[0|2]', 'bit': 7, 'type': 'enum',
43
// 'order': 'motorola', 'physical_unit': ''}
44
Headlightcmd76
*
set_headlight_cmd
(
45
Headlight_cmd_76::Headlight_cmdType
headlight_cmd);
46
47
private
:
48
// config detail: {'name': 'HEADLIGHT_CMD', 'enum': {0:
49
// 'HEADLIGHT_CMD_HEADLIGHTS_OFF', 1: 'HEADLIGHT_CMD_LOW_BEAMS', 2:
50
// 'HEADLIGHT_CMD_HIGH_BEAMS'}, 'precision': 1.0, 'len': 8, 'is_signed_var':
51
// False, 'offset': 0.0, 'physical_range': '[0|2]', 'bit': 7, 'type': 'enum',
52
// 'order': 'motorola', 'physical_unit': ''}
53
void
set_p_headlight_cmd(uint8_t* data,
54
Headlight_cmd_76::Headlight_cmdType
headlight_cmd);
55
56
private
:
57
Headlight_cmd_76::Headlight_cmdType
headlight_cmd_;
58
};
59
60
}
// namespace gem
61
}
// namespace canbus
62
}
// namespace apollo
apollo::canbus::gem::Headlightcmd76
Definition
headlight_cmd_76.h:27
apollo::canbus::gem::Headlightcmd76::set_headlight_cmd
Headlightcmd76 * set_headlight_cmd(Headlight_cmd_76::Headlight_cmdType headlight_cmd)
Definition
headlight_cmd_76.cc:47
apollo::canbus::gem::Headlightcmd76::GetPeriod
uint32_t GetPeriod() const override
Definition
headlight_cmd_76.cc:32
apollo::canbus::gem::Headlightcmd76::ID
static const int32_t ID
Definition
headlight_cmd_76.h:29
apollo::canbus::gem::Headlightcmd76::UpdateData
void UpdateData(uint8_t *data) override
Definition
headlight_cmd_76.cc:38
apollo::canbus::gem::Headlightcmd76::Reset
void Reset() override
Definition
headlight_cmd_76.cc:42
apollo::canbus::gem::Headlightcmd76::Headlightcmd76
Headlightcmd76()
Definition
headlight_cmd_76.cc:30
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::Headlight_cmd_76::Headlight_cmdType
Headlight_cmdType
Definition
gem.proto:390
modules
canbus_vehicle
gem
protocol
headlight_cmd_76.h