Apollo
10.0
自动驾驶开放平台
packet_msg.h
浏览该文件的文档.
1
/*********************************************************************************************************************
2
Copyright (c) 2020 RoboSense
3
All rights reserved
4
5
By downloading, copying, installing or using the software you agree to this license. If you do not agree to this
6
license, do not download, install, copy or use the software.
7
8
License Agreement
9
For RoboSense LiDAR SDK Library
10
(3-clause BSD License)
11
12
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
13
following conditions are met:
14
15
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
16
disclaimer.
17
18
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
19
disclaimer in the documentation and/or other materials provided with the distribution.
20
21
3. Neither the names of the RoboSense, nor Suteng Innovation Technology, nor the names of other contributors may be used
22
to endorse or promote products derived from this software without specific prior written permission.
23
24
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
25
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
29
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
*********************************************************************************************************************/
32
33
#pragma once
34
#include "modules/drivers/lidar/rslidar/common/common_header.h"
35
36
namespace
apollo
{
37
namespace
drivers {
38
namespace
robosense {
39
40
enum
PktType
41
{
42
MSOP
= 0,
43
DIFOP
44
};
45
#ifdef _MSC_VER
46
struct
__declspec(align(16))
PacketMsg
47
#elif __GNUC__
48
struct __attribute__((aligned(16)))
PacketMsg
49
#endif
50
{
51
std::vector<uint8_t> packet;
52
PacketMsg
()
53
{
54
}
55
PacketMsg
(
const
PacketMsg& msg)
56
{
57
this->packet.assign(msg.packet.begin(), msg.packet.end());
58
}
59
PacketMsg
(
const
size_t
& pkt_length)
60
{
61
packet.resize(pkt_length);
62
}
63
};
64
65
}
// namespace robosense
66
}
// namespace drivers
67
}
// namespace apollo
apollo::drivers::robosense::PacketMsg
PacketMsg()
Definition
packet_msg.h:52
apollo::drivers::robosense::PktType
PktType
Definition
packet_msg.h:41
apollo::drivers::robosense::MSOP
@ MSOP
Definition
packet_msg.h:42
apollo::drivers::robosense::DIFOP
@ DIFOP
Definition
packet_msg.h:43
apollo
class register implement
Definition
arena_queue.h:37
modules
drivers
lidar
rslidar
msg
packet_msg.h