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